Translation Team/i18n Best Practices: Difference between revisions

Clytie (talk | contribs)
When in doubt, use translator-comments: Added brief reference to msgctxt
Clytie (talk | contribs)
Use plural forms: Added section for msgid-previous
Line 32: Line 32:
</pre>
</pre>


== Show changes in strings ==
Use the "--previous" option with msgmerge when updating PO files. This option will output strings like this:
<pre>
#, string header
#|msgid "This is the old string"
msgid "This is the new string"
msgstr "This is the old string translated"
</pre>
so translators can see what has changed. Some translation editors will highlight the changes, which is particularly helpful with complex strings, very long strings or strings with code/formatting. This option definitely improves the accuracy of translation updates.


== Use white-spaces and newlines only when you need to ==
== Use white-spaces and newlines only when you need to ==