Translations

From Cell Lab Wiki
Jump to: navigation, search

Cell Lab is first written in English by Petter and after that volunteers have translated it to several languages.

This page has instructions for how to help translate Cell Lab to a new language or update an existing translation after cell lab has been updated.

All text resources for Cell Lab are collected in an xml file, strings.xml. This is in a format that is standard for Android development.

Here are the strings that were used in version 74 (all languages): Strings in v74
These strings in v74 have been removed for v9x: Removed strings in v9x
These strings in v74 have been changed for v9x: Changed strings in v9x
These strings not present in v74 have been added for v9x: Added strings in v9x

In the next major release, v9x, we have the following strings:


These pages simply contain the whole files, within no-wiki tags surrounding it (it is available from the wiki page edit menu, a "W" with a red line and circle). It looks like a mess on the wiki but if you open and edit it should look fine.

If you find mistakes in these files, please just edit them right here in the wiki. I will download these files (and inspect the changes, so no funny stuff ;)) and use them for the final release. If you would like to add another language then just create a new page and add it to the list above. Using the strings from previous versions might be useful in the editing process.

If you plan on adding a new language then I suggest you use some form of tool for editing. https://localise.biz is free for less than 2000 strings so this can be used for each language at a time since then we do not go over the limit. To use this site I would use the following procedure:

  1. Register with some email and create a project
  2. Import strings.xml, tutpopups.xml, level_string.xml from English from version 74 Strings in v74, use the standard import settings.
  3. Add a locale, e.g German if that is the language you are adding.
  4. If there already is a v74 translation for language you are translating to, then import those files as well, otherwise skip to step 8
  5. Now go to import again and choose the English v9x files. Before clicking import, go to the optional settings on the right and in the popup choose tab "Update"
  6. Under "Tag updated:" you can write a tag, for example "v9x". Any strings that have changed from v74 to v9x will then get this tag and you can easily find strings with small changes from v74 to v9x without reading everything. Now import the file.
  7. Now go to the "translate" tab an choose tag "v9x" and do the corresponding updates to the translation.
  8. Now add all the untranslated strings in the new language under the "translate" tab. Note that some strings in English are empty. Specifically the hints and spoilers for some challenges that do not have them.
  9. Finally go to the "Manage" tab and click the wrench on the right. Choose export project and tick your language and "all tags". Format: xml, android string resource. Settings: auto,auto, auto. Export the file and upload it here on the wiki under your language.

There are many other tools available and as long as it supports the format we use then it is no problem to use it.

Some notes about the format:
A tag like this
<string name="dialog_button_ok">OK</string>
means that a string identified by "dialog_button_ok" is "OK" in the current language. This particular string shows up on dialog boxes.
Some special characters are used and these are important to keep:

  • \n means newline
  • \' means apostrophe
  •  %d or %.3f or similar, these get replaced by numbers. You could find a string like: Mass: %.2f ng
  • Some html code might occasionally occur as well