62
edits
m (→Obtaining The Source Files: Adding link towards language code page) |
m (→Caveats: Writing the [% %] section) |
||
| Line 252: | Line 252: | ||
==== Caveats ==== | ==== Caveats ==== | ||
<strong><nowiki>[% %]</nowiki> and <nowiki>[%+ %]</nowiki></strong><br> | |||
<nowiki>[% %]</nowiki> and <nowiki>[%+ %]</nowiki><br> | Generally, you should follow the English model, but if you need to change the order of <nowiki>[% %]</nowiki> in a line, you should be aware of those rules:<br> | ||
When two <nowiki>[% %]</nowiki> members are following each other, the second member won't be separated with a space from the first one, even if you separate them with a space: | |||
<pre> | |||
[% ELSIF message_tag == "bug_duplicate_of" %] | |||
This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [% dupe_of FILTER html %] | |||
</pre> | |||
For instance, the previous line of code will display in the browser as:<br> | |||
<pre> | |||
This bug has been marked as duplicate of bug12345 | |||
</pre> | |||
Instead you should add a "+" sign in the second member: | |||
<pre> | |||
[% ELSIF message_tag == "bug_duplicate_of" %] | |||
This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ dupe_of FILTER html %] | |||
</pre> | |||
Will then be displayed as: | |||
<pre> | |||
This bug has been marked as duplicate of bug 12345 | |||
</pre> | |||
This is the same when a <nowiki>[% %]</nowiki> member is at the beginning of a new line: | |||
<pre> | |||
[% IF groups_added_to.size %] | |||
<li> | |||
The account has been added to the | |||
[% groups_added_to.join(', ') FILTER html %] | |||
group[% 's' IF groups_added_to.size > 1 %]. | |||
</li> | |||
[% END %] | |||
</pre> | |||
The previous code will be shown as: | |||
<pre> | |||
The account has been added to thebz_sudo_protect group. | |||
</pre> | |||
You should instead put a "+" sign: | |||
<pre> | |||
[% IF groups_added_to.size %] | |||
<li> | |||
The account has been added to the | |||
[%+ groups_added_to.join(', ') FILTER html %] | |||
group[% 's' IF groups_added_to.size > 1 %]. | |||
</li> | |||
[% END %] | |||
</pre> | |||
So that the sentence is displayed as: | |||
<pre> | |||
The account has been added to thebz_sudo_protect group. | |||
</pre> | |||
<strong>Apostrophes and quotes</strong><br> | |||
${terms.bugs} , <nowiki>[% terms.bugs %]</nowiki> and $terms.bugs<br> | ${terms.bugs} , <nowiki>[% terms.bugs %]</nowiki> and $terms.bugs<br> | ||
edits