Follow

Which strings should I translate, and which should I leave?

 

Goobledygook

You will see translation strings like the following:

  • Answered <span class="problem-count">1 problem</span> in {{translatedExerciseDisplayName}}
  • (Last %(num)s problems)
  • {{#step "Chaos walk"}}
  • Is <var>NUM_1_VALUE</var> less than, greater than, or equal to <var>NUM_2_VALUE</var>?
  • What is <code>\\lvert <var>SIGN + INT + FRAC</var> \\rvert</code>?

Please do not translate non-language strings. You should just let them be. If you accidentally translate text that should not have been translated, you may be blocked from committing the string, or the problem it will be obvious as the sentences will contain some code.

These are a combination of normal English text with programmer tools that you should not translate.

  • <span class="problem-count"> is html markup. Do not translate it -- it's already in computer-ese.  (Crowdin will helpfully remind you not to translate it.)
  • {{translatedExerciseDisplayName}}is a variable. It will get replaced with the name of an exercise when this string is actually used. Do not translate it.  (Crowdin will helpfully remind you not to translate it.)  We did our best to name our variables so you would know what kind of content will go there.
  • %(num)s (you may also see %(num)d) is also a variable. Do not translate it. (Crowdin will helpfully remind you not to translate it.) This one's a bit more confusing because thes (or d) after the parenthesis is also part of the variable!
  • {{#step "Chaos walk"}} is, again, a variable. But this time you should translate the text in quotes ("Chaos walk" in this case). Other examples of a variables that contain text that should be translated are \\red{\\text{Area}} or \\red{\\text{ group of squirrels}}. "Area" and "group of squirrels" should in this instance be translated. This is true for all variables that contain \\text{word}.
  • Text inside <var>...</var> is also a variable, and as always you should not translate it. However, this time, Crowdin does not helpfully remind you not to translate it. So we're reminding you now. Don't translate anything between <var>and </var>!
  • Text inside <code>...</code> is math markup, and you should not translate it, as mathematics is the universal language. :-) Again, Crowdin will not remind you not to translate it, so you will have to remember yourself. Our automated systems will reject any translations made inside <code>blocks, so if you think you do need to translate something inside <code>...</code>, send us email at i18n_support@khanacademy.org.

 

Website URLs 

We should not change or edit Website URLs.

For example, there's a wikipedia article talking about Pluto, it would look like:

[Pluto](https://en.wikipedia.org/wiki/Pluto)

That link should NOT be changed with the translation work to another language, the original URL should be kept the same. For example, if we’re translating to Spanish, the translation would look like: 

[Plutón](https://en.wikipedia.org/wiki/Pluto)

In the future, we'll have the ability to allow translated links (example: https://es.wikipedia.org/wiki/Plut%C3%B3n_(planeta_enano)), but for now the Website URL must remain the same. Currently, if the link is changed the translation will be rejected.

 

Measurements and currency

We generally advise direct translations. Please do not localize measurements and currency while translating.

 

Decimals

There is no need to translate decimals or the thousand's place separator anymore. The script that downloads the translations will now automatically convert numbers into the correct format on a per language basis.

 

Computer science commands

The strings of the computer science section of our site are to be found in _high_prioirty_platform/computer_science.pot file. There are several tricky issues in translating this file as what appears to be English is actually javascript commands or commands from the processing.js library.   So you don't need to, in fact, you shouldn't translate the commands.  A command's parameters can, however, be translated.  For example, if the command is background(red, green, blue), to define the background color of a screen.  Then only "red", "green" and "blue" should be translated. Here is  a full list of the commands: Processing.js/javascript commands.

 

There are also some javascript reserved words that shouldn't be translated (if, else, for, while, etc...).  A full list of those reserved words can be found here. They lead to tricky strings such as: "Meet if's soulmate:else!"  If and else in that string should not be translated. You can add quotes around those javascript words to make it easier - for example, you could translate it by just translating what is underlined here: "Meet the soulmate of'if': 'else'"

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments