Skip to content
This repository was archived by the owner on Sep 18, 2018. It is now read-only.

Translator Tips

kemitche edited this page Feb 28, 2012 · 7 revisions

Translator Tips

Fallback Strings

Not all strings require a translation! Translations for dialects (e.g., Argentinian Spanish, [es-ar]) automatically "fall back" to the non-dialect version ("standard" Spanish, [es]), if there is one. Of course, the whole point of a dialect is to allow for creating a more precise translation, so translate away!

Note: All translations will fall back to the English [en] "translation" if neither the dialect nor non-dialect translation exist.

Some strings don't actually need a translation! Acronyms, links, etc., may be marked for translation, but look just fine in alternate languages (some have even been incorrectly marked for translation). For example, you can safely leave – untranslated:

Long-term (as time permits), these "non-translations" will be removed. If you're familiar with python and/or mako and feeling adventurous, submit a pull request on open source reddit code removing some of these "non-translations".

Translator Notes

Some msgids have "notes" in {brackets} - these are meant to provide context when a word is used (in English) in two different forms. The bracketed text should be removed from the translation.

For example: comment {verb} and comment {toolbar} simply are meant to allow for providing different translations for "comment" as an action verb and "comment" as a noun/toolbar description. The translated, English string translates them to comment.

EXCEPTION: Strings from searchform.html, and anywhere else the bracketed portion is NOT at the END of the string.

Python String Formatting

msgid strings will frequently contain python formatting code. Generally, they look like one of the following:

  • %s
  • %d
  • %(some_label)s

Though (very rarely) they'll be a little more complicated (full rules for Python formatting strings)

These portions of the phrase need to be carried over into the translation. Transifex will warn you if you're translation doesn't properly carry them over.

Good:

source "My %(animal)s ate %(number)s apples"
translation "lorem epsum %(number)s foo bar biz bang %(animal)s dim dang durn"

Bad: Leaving one out

source "My %(animal)s ate %(number)s apples"
translation "lorem epsum foo bar biz bang %(animal)s dim dang durn"

Bad: Leaving off the final "s"

source "My %(animal)s ate %(number)s apples"
translation "lorem epsum %(number) foo bar biz bang %(animal) dim dang durn"

Bad: Forgetting a parentheses or percent sign

source "My %(animal)s ate %(number)s apples"
translation "lorem epsum (number)s foo bar biz bang %animal)s dim dang durn"

Markdown

Some strings contain markdown, linking to other portions of the site. The link title can be changed, as needed, but the destination should not be translated or modified

Good:

source "Great! Now follow [this awesome link](/r/awesome)"
translation "lorem epsum foo bar biz bang [dim dang durn](/r/awesome)"

Bad: Translating the destination

source "Great! Now follow [this awesome link](/r/awesome)"
translation "lorem epsum foo bar biz bang [dim dang durn](/r/loremepsum)"

Clone this wiki locally