wiki:doc/translation/developers

Translation process for Tor developers

To have a real impact worlwide, our software needs to break the language barriers a majority of the global population has. Localizing our software let us share it with more people, and should eventually lead to better software in itself, even if it needs a bit more work.

If you have doubts about how to localize your software, please get in touch with emmapeel@…

How to be nice to translators

Remember that if you generate better quality source strings, the translations will be better.

Translators' input

The translators find many errors on the source strings, it is important to have a look at the open issues in transifex (needs login)

After selecting a string, check the Comments section on the bottom right: there you will see the issue the translator has found:

Please read the incredibly good article 12 Commandments Of Software Localization from Zack Grossbart to get an introduction to software localization from an engineer's point of view. This are developers best practices with l10n in mind:

1. NEVER CONCATENATE STRINGS

It may sound efficient in English, but the truth is that different languages have different ways of saying things, and the order is important. Please make it so the whole sentences is up for translation at once.

2. PUNCTUATION IS PART OF THE SENTENCE

Please add all punctuation for translation, as different languages use different punctuation rules. Punctuation is part of the sentence.

3. NO HARDCODED UPPERCASES OR CAPITALIZATION

Ortographic rules change depending on a word being capitalized or not in many languages, as Greek and Russian. Other languages, like Arabic, don't even have capital letters, so your styling will not be seen.

That is why you should refrain of hardcoding this styles on CSS or other similar way, and if you want a capitalized sentence, write the actual sentence capitalized as you would like to see it, so the translator understands what you want, and translates your intention on the local rules (maybe adding exclamation signs or something else).

4. ADD COMMENTS OR EXPLANATIONS ON HOW TO TRANSLATE

Context is everything when translating, and if a string has many errors, it probably means that a developer comment explaining how to translate is needed.

When the source text is in English, as on our project, the objects on that language have no gender. But objects have gender in many languages: Spanish, Italian, French, German... So when we translate 'Published' to German, we need to know what was published, to give the correct gender to the adjective.

5. PROVIDE SCREENSHOTS AND EARLY LOCALIZED RESOURCES

The translators will translate better if they can see the effect their translations have. Try to get a staging/beta version early, so they can do a final review for the language with the real application.

Add screenshots to the translation platform to make people more aware of how the words will look on the interface.

Getting your translations added to Transifex

  • Check [Transifex] for supported file types
  • Open a ticket in the component Community/Translations with a link to your English strings, preferably in Tor Project or Tails git.
  • Contact emmapeel <at> torproject <dot> org and she will make the bot pick them up and produce two branches on the translation repository
  • Wait for strings to be added to Transifex and git

If you wish to test your strings before sending them for translation, you can join the Sandbox project where you can see clearly how the translators will see your file, we can refine the process and make sure the files are ready for translation before sending them to the translators.

Using your translations

  • Clone the translation repository
  • Check out the branch for your project (e.g. git checkout mat-gui)
  • If you only want translations that are completed, check out the _completed branch instead (e.g. git checkout mat-gui_completed). Currently this branch only provides reviewed strings as well.

NOTE: Transifex does not do any kind of input validation on the translated strings. You need to make sure that the strings you include are valid and do not contain anything malicious.

Stats

arthuredelstein is helping with some stats about translation, so they can be accessed from outside transifex:

thanks arthur!

How do we call the languages?

Call them as they call them

When we present a list of languages, we like to call them as the speakers of that language call them. Because if they don't speak English, they probably don't know how their language is spell in English (specially if they use other kind of characters).

We can easily read Spanish/English because we share a Latin alphabet. People using another kind of alphabets (Arabic, Cyrillic, Georgian, etc) will look for familiar letters before reading.

language codes: Always better to follow Mozilla

Many of our applications depend on the Tor Browser, which in turn depends on Mozilla. By making sure your apps will expect the language codes as in mozilla, you can ensure links and other things are going to work across the whole project. See here for Mozilla language codes: https://hg.mozilla.org/l10n-central/ . Check with the localization coordinator if you don't know what is the situation with your app.

Incidentally, transifex may differ from this codes, but we can correct that through our translation repo. For example, we use en-US for the Tor Browser default locale, but it is called en in Transiffex.

Actual list

tbb Lang code transifex English name Preferred name (orig)
ar Arabic عربية (ar)
ca Català (ref #31600)
cs česky
da Dansk
de Deutsch
el Ελληνικά (el)
en-US en
es-AR
es-ES es Español
fa ﻑﺍﺮﺳی
fr Français
ga-IE ga Irish Gaeilge (ga)
he Hebrew עברית
hr Croatian hrvatski
hu Hungarian Magyar nyelv (hu)
id bahasa Indonesia
is Icelandic Íslenska
it Italiano
ja 日本語
ka Georgian ქართული ენა
ko 한국어
lt Lithuanian lietuvių
mk Macedonian македонски (mk)
ml Malayalam മലയാളം
ms ms_MY Malay Bahasa Melayu
nb-NO Norsk bokmål
nl Dutch Nederlands (nl)
pl Polish polski
pt-BR Português Br.
pt-PT Português Port.
ro Romanian Română
ru Russian Русский
sv-SE Swedish Svenska
th Thai ภาษาไทย (th)
tr Türkçe
vi Tiếng Việt
uk українська
zh-CN 简体中文 (zh-CN)
zh-TW 正體字 (zh-TW)
Last modified 2 weeks ago Last modified on Nov 28, 2019, 11:04:20 AM

Attachments (1)

Download all attachments as: .zip