From Fedora Project Wiki

(added alternatve part)
Line 13: Line 13:


<code>msgstr "%2$d Zeichen lang ist die Zeichenkette `%1$s'"</code>
<code>msgstr "%2$d Zeichen lang ist die Zeichenkette `%1$s'"</code>
'''Alternatives'''
In some cases, you may see a string that looks like "<code>%(var)s</code>". This variable can be moved within a string in any order.
<code>msgid "String `%(str)s' has %(char)s characters"</code>
<p>Translated: </p>
<code>msgstr "%(char)s Zeichen lang ist die Zeichenkette `%(str)s'"</code>
No other changes are required.


[[Category:Localization]]
[[Category:Localization]]

Revision as of 17:01, 26 July 2010

The Fedora Localization Project - Tips for Translators

Controlling parameters order

When translating, sometime the result of particular translated string contains different parameters order. But it usually is not allowed. There is the workaround to change the order in translation, and it can be found at 'info gettext'.

For example in German, This won't work:

msgid "String %s' has %d characters\n"
msgstr "%d Zeichen lang ist die Zeichenkette
%s'"

so that the number with $ mark can be given as below:

msgstr "%2$d Zeichen lang ist die Zeichenkette %1$s'"


Alternatives

In some cases, you may see a string that looks like "%(var)s". This variable can be moved within a string in any order.

msgid "String %(str)s' has %(char)s characters"

Translated:

msgstr "%(char)s Zeichen lang ist die Zeichenkette `%(str)s'"

No other changes are required.