Daichi Kawahata wrote: > Here is the example of the way, telling to the translator from the > developer to avoid mistranslation in the ambiguous strings.
[...]
> # These options get passed to xgettext.
> -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8
> +XGETTEXT_OPTIONS = --add-comments=TRANS --keyword=_ --keyword=N_ \
> + --from-code=UTF-8
The prefix "TRANSLATORS:" is already used to extract comments, so you
don't need to add "TRANS".
> N_("Bitzi|Unknown"), /* UNKNOWN */
> + /* TRANS: In the translated string discard everything up to the
> + * first '|' and translate the rest only.
> + */
> The result becomes it like this:
> #. TRANS: In the translated string discard everything up to the
> #. * first '|' and translate the rest only.
> #: src/ui/gtk/bitzi.c:58
> msgid "Bitzi|Dangerous/Misleading"
> msgstr ""
The "context trick" using '|' should be considered basic knowledge
for translators, in my opinion. I wouldn't want to repeat that in
every comment. I'd think it's more useful to explain in 1-2 sentences
(e.g., ratings of file/content quality) what these strings are used
for than explaining the syntax. Of course, for this purpose the strings
should appear grouped in the PO files.
Looks like the leading '*' should be discarded for such comments.
--
Christian
Continue? [y/n]
pgpyzJ06hi05y.pgp
Description: PGP signature
