OLPC Tonga: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Pootle: added note about tongan pootle configuration and terminology projects)
(→‎glibc locale: fix typo)
Line 15: Line 15:


<pre>
<pre>
wget http://wiki.laptop.org/images/3/38/To_TO.txt -o to_TO
wget http://wiki.laptop.org/images/3/38/To_TO.txt -O to_TO
sudo localedef --no-archive -i to_TO --charmap=UTF-8 /usr/lib/locale/to_TO.utf8
sudo localedef --no-archive -i to_TO --charmap=UTF-8 /usr/lib/locale/to_TO.utf8
sudo localedef --no-archive -i to_TO /usr/lib/locale/to_TO
sudo localedef --no-archive -i to_TO /usr/lib/locale/to_TO

Revision as of 10:28, 28 July 2010

Deployment progress

Tonga is included in the OLPC Oceania deployments list.

For information contact OLPC_Oceania team.

Translation progress

For information on this translation project, contact Tabitha.

glibc locale

Tongan is not a supported locale in glibc, so support has to be added there first. See File:To TO.txt. Note this file should be called to_TO, not To_TO.txt, the wiki seems to want the name that way.

To install on XO:

wget http://wiki.laptop.org/images/3/38/To_TO.txt -O to_TO
sudo localedef --no-archive -i to_TO --charmap=UTF-8 /usr/lib/locale/to_TO.utf8
sudo localedef --no-archive -i to_TO /usr/lib/locale/to_TO

to_TO and to_TO.UTF8 should appear in the list of supported locales printed by the "locale -a" command.

Pootle

Tongan has been set up on the SugarLabs Pootle server at [1]. Unfortunately it was set up as "ton" rather than "to". glibc was unhappy creating a ton_TO locale -- it seems to have the language codes burnt in and in Tongan's case uses the two letter code, not the three.

Be very aware of what the terminology project is for. It is a tool to help translators maintain consistency. It has been described as "the place where we keep translations common to all projects" and while this is true in some ways, it is not what you think it is. Translations entered here do not automatically fill in identical or similar translations in the other projects, and it is the other projects which are actually installed on the XO.

To install part of the translation on an XO directly from the pootle server follow these steps:

  • Visit the tongan language page on the pootle server.
  • Click on the project you want (Glucose 0.82 is the core sugar stuff for sugar 0.82)
  • Click on the Review tab
  • Click on the "Download" link for the file you want to update on the XO and transfer the file to the XO (sugar.po has most of what you want)
  • Edit the file and change the Language line from "ton" to "to"
  • If it's not already installed, install the msgfmt utility with "sudo yum install gettext"
  • If it's not already created, created, create the tongan locale directory with "sudo mkdir -p /usr/share/locale/to/LC_MESSAGES"
  • Run "msgfmt sugar.po /usr/share/locale/to/LC_MESSAGES/sugar.mo"

If this is the first time you have installed Tongan on the XO you may have to reboot before you can select Tongan in the language preferences. If you have already changed your language to Tongan, you may need to select another language (causing Sugar to restart) and then select Tongan again (causing another restart) to see your updates.