Entries Tagged as ''

Translating OLPC software

The core OLPC software is developed at http://dev.laptop.org/ using the GIT source code management system.
For the tasks of the translator, one needs to look into the different projects and locate any po/ subdirectory. The existence of this subdirectory show that the piece of software is internationalised (=can be translated).

For example, the core component sugar can be translated. In the main sugar page, and locate the po/ subdirectory that shows up. Click on it and you get the sugar po/ subdirectory with a few translations. Specifically, Yoruba, Hausa, Igbo and Italian. The italian translation is sadly useless. The translator made a mistake; he saw

msgid “Hello”

msgstr “”

and changed to (WRONG)

msgid “Ciao”

msgstr “”

instead of (CORRECT)

msgid “Hello”

msgstr “Ciao”

Normally, one would need to regenerate the Template PO (POT) file before translating, instead of working on one of the existing translated files. To do so, one needs to download the source code of sugar using the git tool and then use intltool-update -P to create the fresh sugar.pot file.

Creating a new locale on the OLPC

When you run the OLPC software you currently have access only to the English locales.

If you want to enable Greek support, you need to run (as root)

localedef -v -c -i /usr/share/i18n/locales/el_GR -f UTF-8 /usr/lib/locale/el_GR/

localedef -v -c -i /usr/share/i18n/locales/el_GR -f UTF-8 /usr/lib/locale/el_GR.utf8/

You will get a bunch of warnings. You can ignore them for now.

The localedef command compiles the source locale information found at /usr/share/i18n/locales/el_GR and places the resulting files at
/usr/lib/locale/el_GR/ and /usr/lib/locale/el_GR.utf8/ (both directories contain the same files, so you can also make a link from one to another). The reason we make two versions is that we can use either el_GR or el_GR.utf8 in the applications. Both use UTF-8 as the base encoding which is always nice.
For other locales, replace el_GR with the locale name of your country.

To activate the Greek locale, you need to create a file /etc/sysconfig/i18n and add the text

LANG=el_GR.utf8

LANGUAGE=el:en

Now you need to place the translated applications (.mo format) into

/usr/share/locale/el/LC_MESSAGES/

and restart your virtual machine (or laptop (hint hint)).

Translating the OLPC

In a previous post, we covered how to install fonts and enabling writing support on the OLPC. The OLPC contains a limited number of applications that are available to be translated. These applications include

  1. NetworkManager, part of the GNOME project (HEAD, extras)
  2. alsa-utils, ???
  3. aspell, external
  4. atk10, part of the GNOME project (GNOME 2.18, developer)
  5. chkconfig, part of the Fedora Project
  6. diffutils, external
  7. glib20, part of the GNOME project (GNOME 2.18, developer)
  8. gst-plugins-base-0.10, external
  9. gst-plugins-good-0.10, external
  10. gstreamer-0.10, external
  11. gtk20-properties, part of the GNOME project (GNOME 2.18, developer)
  12. gtk20, part of the GNOME project (GNOME 2.18, developer)
  13. hal, external
  14. initscripts, part of the Fedora Project
  15. libc, part of the Translation Project (reduced version?)
  16. libuser, part of the Fedora Project
  17. libwnck, part of the GNOME Project (GNOME 2.18, desktop)
  18. stardict, external
  19. vte, part of the GNOME Project (GNOME 2.18, desktop)
  20. wget, part of the Translation Project

The links provided point to the latest available version. The versions that the OLPC using are not the latest with the upstream project, therefore keep in mind that the translated files may differ. It would be good to establish the exact .PO files from the OLPC project (URL to source?).

The OLPC and Greek

(oh, I am writing this through a lousy Net connection; thanks Engelados)

I tried out the latest OLPC image, specifically build 218, on Qemu and my aim was to get Greek support configured, if it was not there already.

The OLPC does not currently come with a good set of Greek fonts; you will need to install a set of fonts such as DejaVu or GFS Didot.
Installing means adding the font files in the directory /usr/share/fonts/. The current font configuration files in the OLPC favour Bitstream Vera, therefore you would need to move the bitstream subdirectory outside the fonts directory. DejaVu is based on Bitstream Vera and therefore you will not notice any change once you upgrade. Also, Fedora Core 6 and Ubuntu Linux are based on DejaVu. You need DejaVu, as Bitstream Vera does not currently support Greek. Both DejaVu and GFS Didot are free and open-source fonts.

Note: This screenshot shows DejaVu Sans, not GFS Didot. Sorry for the typo.
This is the OLPC running the cut-down version of the Abiword wordprocessor. Click on the image to view the full size.

This is the OLPC showing the same document above with GFS Didot. The font looks quite nice and similar to old greek textbooks. There is a small issue however, it does not have the character coverage of DejaVu. For example, notice that the Euro sign is missing from GFS Didot. Also, other glyphs such as fancy bullet characters are missing as well. Normally, the OLPC software should replace those missing characters with the correct characters from another font. Apparently something is wrong here and needs further investigation.

Writing support for the Greek language has to be configured separately in the OLPC. The case with other languages appears to be that the default layout is that of the language; apparently there is no need to switch between Brazilian Portuguese and English. For the Greek language it appears that it is good to be able to switch between Greek and English.

There are several places that you can add Greek writing support. The most common is in /etc/X11/xorg.conf. Having gone through the configuration files, I think that /etc/X11/Xkbmap is also a good place and saves us from touching the core Xorg configuration file.

To write the full set of Greek letters, one needs to set the extended variant for the Greek layout, and also try to set the Compose key (for ano teleia). These things should be simplified…

I am not sure how the OLPC looks like (the only photos I saw where not focusing on the keyboard). Perhaps it would be useful to have a test machine at my disposal (hint, hint).
Jim Gettys wrote at his blog about the different languages that the first generation of the OLPC should support. Both Kinyarwanda and Kiswahili use the latin alphabet, therefore there are no significant issues with font support or writing support.

p.s.
Greece will carry out a pilot with OLPC laptops next September.

Σπάσαν τα καλώδια

Την περασμένη εβδομάδα έγινε ένας ισχυρός σεισμός κοντά στην Ταϊβάν. Το επίκεντρο ήταν στη θάλασσα, κοντά στις νότιες ακτές του νησιού. Υπήρξε ένας αριθμός θυμάτων που ήταν σχετικά μικρός λόγω των αυστηρών πολεοδομικών κανονισμών της χώρας για ανθεκτικά κτίρια.
Ένα από τα θύματα ήταν τα καλώδια οπτικών ινών του συστήματος APCN 2 που συνδέουν την ΝΑ Ασία με τις ΗΠΑ και τον υπόλοιπο κόσμο. Έτσι, μέχρι την επισκευή των καλωδίων (~4 εβδομάδες) η σύνδεση με το Διαδίκτυο για τις χώρες της ΝΑ Ασίας είναι από αδύνατη μέχρι πολύ αργή.
Την επόμενη μέρα της καταστροφής το Google ήταν η μόνη υπηρεσία που κατάφερε να λειτουργήσει. Η εντολή traceroute έδειξε ότι τα πακέτα τερμάτιζαν στο Χονγκ Κονγκ οπότε το Google είχε προσπεράσει το πρόβλημα με τη Ταϊβάν με χρήση κάποιας άλλης γραμμής. Άλλες υπηρεσίες όπως Yahoo δεν ήταν προσπελάσιμες. Μπορούσες να συνδεθείς μόνο με δικτυακούς τόπους μέσα από στην NΑ Ασία.

Κοιτώντας το χάρτη με τη διασύνδεση των καλώδιων οπτικών ινών στην Ασία (PDF), διαπιστώνει κανείς ότι π.χ. είναι δυνατή η σύνδεση στην Αυστραλία από την ΝΑ Ασία. Πως μπορεί ένας χρήστης να συνδεθεί από ΝΑ Ασία με ΗΠΑ μέσω Αυστραλίας; Ένας εύκολος τρόπος είναι με τη ρύθμιση διαμεσολαβητή (proxy) που βρίσκεται στην Αυστραλία στο Firefox. Υπάρχει μεγάλη λίστα από anonymous proxy στο διαδίκτυο που μπορεί κάποιος να βρει εύκολα μέσω Google.

Στις τοπικές εφημερίδες διαβάζει κανείς άρθρα για τοπικούς ιστολόγους που η διαδικτυακή τους ζωή έχει ταραχθεί λόγω της αδυναμίας ιστολόγησης. Ελπίζω να διορθωθούν τα πράγματα σύντομα.