Etoys Translations: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: (Writing is on-going) == How to test translation == == Tips for translating == Etoys has many capability, then has huge translatable phrases (>3000). It will take much effort to comp...)
 
m (typo)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== General Introduction ==
(Writing is on-going)
== How to test translation ==


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.
== Tips for translating ==
[[Etoys]] has many capability, then has huge translatable phrases (>3000). It will take much effort to complete translation work if that is done sequentially from start to end on Pootle.


== How to translate ==
But in typical usage, limited number of phrases are revealed to users. You could see on [https://dev.laptop.org/translate/projects/etoys Pootle] that only about 40-50% of phrases have been translated for languages with longer history of squeak usage (French, Spanish, Japanese for instances). It is more than usable for those languages.


Etoys translations are hosted on the '''Pootle''' server by Sugar Labs:
So it is wise to prioritize work as frequently used phrases first.

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 [http://lists.laptop.org/listinfo/localization localization mailing list].

== Getting Help ==

Please subscribe to the [http://lists.laptop.org/listinfo/localization 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:

# Sugar.po
# Etoys-Tiles.po
# Etoys.po
# Protocols.po
# MorphicExtras.po
# Morphic.po
# System.po
# Sound.po
# WS-Sound.po
# Connectors.po
# DrGeoII-Core.po
# ST80.po
# Files.po
# Network.po
# Kernel.po
# Graphics.po
# ... 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 ===
=== 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.

[[Category:Language support]]
[[Category:Languages (international)]]
[[category:localization]]

Latest revision as of 18:37, 28 November 2010

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.