Etoys Translations

From OLPC

Revision as of 18:37, 28 November 2010 by Bert (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

General Introduction

Etoys uses "gettext"-style translations. Basically, the Etoys "POT" translation template files are translated into "PO" files. These are just plain text files. They are then compiled into machine-readable "MO" files for use by Etoys.

How to translate

Etoys translations are hosted on the Pootle server by Sugar Labs:

http://translate.sugarlabs.org/projects/etoys_new/

You can edit them right on the server. Or download a PO file and and upload it once it is translated.

Everyone can submit "suggestions" on Pootle. To actually commit the suggestions for Etoys, you need to ask the "language admin". For this, please subscribe to the localization mailing list.

Getting Help

Please subscribe to the localization mailing list and send your questions there.

Translation tips

Prioritize translation work

Etoys is a very capable system, and consequently has a huge number of translatable phrases (more than 3000). It will take a while to complete the translation. It is wise to prioritize the work.

Here is the suggested order for translations, more important first:

  1. Sugar.po
  2. Etoys-Tiles.po
  3. Etoys.po
  4. Protocols.po
  5. MorphicExtras.po
  6. Morphic.po
  7. System.po
  8. Sound.po
  9. WS-Sound.po
  10. Connectors.po
  11. DrGeoII-Core.po
  12. ST80.po
  13. Files.po
  14. Network.po
  15. Kernel.po
  16. Graphics.po
  17. ... and then the rest

Migrate legacy translation dictionary

If you have been using old version of Squeak and have legacy translation dictionary in image or external file, you can migrate it and reuse as start of populating for OLPC Etoys.

  • prepare OLPC Etoys developer image, apply all updates
  • load legacy translation data
  • export to PO

Read context for phrases on PO source file

With context comment in PO file, you can see where the phrase is used in Squeak source code. On Pootle context is shown only for current record for editing. You can review it extensively if you have PO file at hand by downloading. Example 1:

 #: Sugar,SugarNavigatorBar>>buttonStop
 msgid "Stop and Quit Etoys"
 msgstr ""

First string "Sugar" is class category. Second string is formatted as class>>method.

Example 2: (very long comment is shown as splitted)

 #: Morphic-Kernel,Morph>>additionsToViewerCategoryGeometry, (cont'd)
 SimpleSliderMorph>>additionsToViewerCategories
 msgid "The width"
 msgstr ""

In this example, same phrase "The width" is used in multiple methods:

  • Morph>>additionsToViewerCategoryGeometry
  • SimpleSlider>>additionsToViewerCategories

Note that these methods belong to different class categories, but only category first occurence belongs to is shown.

Phrases are sorted by category and occurrence.

Placeholder for parameter

Number enclosed by curly braces is the special symbol for placeholder where some parameter will be filled in.

 msgid ""
 "This file's version ({1}) is higher than \n"
 "the currently supported version ({2}). \n"
 "It may contain features that are not supported \n"
 "and it may not display correctly.\n"
 "Do you want to continue?"

You can change order how placeholders appear in, or you can use same placeholder multiple times if you need. But you must not remove the braces. To know what will be filled you need to review actual squeak code.

How to test translation

For base Etoys, the correct directory for MO file is: /usr/share/etoys/lang/<language code>/LC_MESSAGES. Place compiled MO onto there. Start Etoys and choose your language. Then see what works and not.

Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
Projects
OLPC wiki
Toolbox