Notice
This page show a previous version of the articleInterface Translation
This article explains how you can help us translate the website interface into other languages.
Accessing the translation platform
We use a platform called Transifex to manage the translations of the website. Here's what you have to do in order to join the translators team:
- Go to this page https://www.transifex.com/projects/p/tatoeba_website/.
- If you do not have an account on Transifex: click on "Help translate Tatoeba website" and create your account.
- If you do have an account: log in, choose the language(s) in which you would like to translate and apply to be a translator.
- You have to wait for your application to be accepted.
Once you have been accepted as a translator, here's how you can access the list of strings to translate.
From your dashboard:
Then select the "default.pot" resource:
Select "Untranslated" strings:
If you need to learn more about Transifex, you can read their documentation: http://docs.transifex.com/.
Translating strings
A "string" is the basic unit of translatable content. It may contain part of a sentence, one sentence, or more sentences.
HTML
All the strings should be encoded in HTML. It means that most of the time, it doesn’t change anything, but you may encounter HTML markup here and there, such as <strong>blah blah blah</strong>. You should keep it as-is and translate the rest.
If you want to use the characters < or > inside a translation, respectively use < or > instead. You can also insert tags to format text according to the typography rules of the language you’re translating to. For instance <em>text</em> will emphasize text, <sup>text</sup> will put text in superscript.
You’ll see the sequence here and there. Don’t be afraid, it just appears as a space character, but it can’t be used to break a line. We use it to prevent lines from being broken at awkward places such as after numbers. Keep them in your translation if it makes sense in your language.
Placeholders
Some strings include words between brackets like {0} or {user} or even {}. These words act as placeholders and are replaced by actual words when displayed on the website. For instance, in the string "{user}'s sentences", the {user} part is replaced by the name of a user, which produces something like "trang's sentences". Therefore, when translating such sentences, you must keep every word between brackets as-is inside your translation. We used to have %s as placeholder, but not anymore.
Useful information in the details
Each translation has a “More details” link that expands detailed information. A few lines contains useful information.
The “Occurrences” line shows you URLs that brings you to the source code. This is primarily used by developers, but you can try to get a grasp of what it’s about. If the link contains “/views/”, it’s possible to get to the page where the string is used by building a URL as described on the picture.
The “Context” line (underlined in red on the picture) is used to distinguish two or more translations that have the same source text. It happens that the same English string can be translated in multiple ways depending on the context, especially if it’s short. Take for instance the word “test”. Is it the verb “to test” as an action on a button, or an exam?
Plural strings
Some strings have plurals. This means they have several versions for each plural form of the language you’re translating into, depending on a number usually included in the string (usually {n}). A plural string can be recognized by the additional buttons, showed in red in that picture:
The English language always has two forms: singular and plural. The language you’re translating into may have only singular, singular and plural, singular and two of three plurals, etc. So you need to translate each plural form individually by clicking on each plural button.
Don’t pay too much attention about how the English formulates singular vs. plural, and think about all the values {n} can take. In particular, many of the English singular forms use the word “one”, like “One sentence” for the singular and “{n} sentences” for the plural. We can do that because the English singular form is only used when n = 1. When n = 0 or n > 1, it uses the plural form. French and Brazilian Portuguese use singular when n = 0 or n = 1, and plural when n > 1. Thus, these language can’t use “one” for the singular, they must use {n} for both singular and plural. You can find a complete list of all the plural formulas to verify your language’s.
Developers notes
As highlighted in green in the above picture, developers may add notes to give hints to translators. If you find a particular string to be difficult to understand, please tell us and we’ll add comments like this for other translators.
Declensions
When you include a string into another, you may run into declensions problems. English has very few declensions but the language you’re translating to may have more.
To illustrate the problem, let’s take the singular and plural in English, which is actually a declension. We translate English into English. Consider the strings:
- I have a {thing}.
- We need more {thing}.
The placeholder {thing} get its value from a translatable string: “book” (translated to “book”). So we end up with:
- I have a book.
- We need more book.
There is obviously a problem with the second sentence. Enters the sublisting feature. If you know that {thing} get its value from another translatable string, you can enter several values for that string, like this:
- original string: book
- translated string: ; singular: book; plural: books
It’s a list of key/value pairs separated by semicolons. The name of the keys are free (they can contain any character except : and ;). Any translated string that starts with a semicolon is considered as a sublist. From now on, you can pick a single value from the list, like this:
- original sentence: I have a {thing}.
- translated sentence: I have a {thing.singular}.
And for the second string:
- original sentence: We need more {thing}.
- translated sentence: We need more {thing.plural}.
The {thing.key} syntax is rather comprehensive. If it cannot find the key, or you use {thing} with a sublist, it fallbacks on the the first item of the sublist. Thus, you want to set a safe default as the first value of your sublists.
In Tatoeba, this feature can be used with language names if they decline. Enter a sublist for every language name, and then use {language.declension_foo} wherever a language name is used inside a string. When language names are not used within a translatable string, i.e. for text inside dropdown lists, flag mouseover etc., you can decline by translating the special “{language}” string. If you want to see a working example of language name declensions, check the French translation.
Checking how your translation renders online
If you know the page your translated string is supposed to appear, you can check how it renders by going to the development website. Translations are automatically pulled from Transifex and installed there every ten minutes.