Page 1 of 1

Project: Puppy-menu translation-utility

Posted: Wed 10 May 2006, 05:49
by MU
The vietnamese Hacao-linux translated the Puppy-menu "manually".

This means the file /root/.jwmrc was translated "by hand".
This becomes very hard work, if you want to upgrade to a newer Puppyversion, as that overwrites the menu with a new, english one.

So I wrote a tool, that uses a external file for the translation.
If you upgrade Puppy, simply run the "translator" again, to localize your menu.

A german languagefile is included, other languages must be added by users.
http://www.murga.org/~puppy/viewtopic.php?t=7165

Mark

Posted: Wed 10 May 2006, 16:10
by rarsa
An added advantage is that your tool could be easily modified to enter the translated text into the .desktop files for the XDG menus.

So if people start using your tool the transition would be way easier.

Posted: Thu 11 May 2006, 14:25
by rarsa
The XDG menu implementation is localization ready!

As simple as

1. Add a new "Name" property qualified with the locale string and with the translated text for each of the languages. e.g.
Name=<text in English (default)>
Name[es]=<text in Spanish>
Name[de]=<text in German>
etc..

2. Save the .desktop or .directory files with an UTF-8 encoding.
Leafpad has this capability. When you select "Save as..." it allows to change the encoding. Accented characters appear in the JWM menu correctly. Another alternative is to add the translation to all files and then run them by the iconv utility to change the encoding to UTF-8.

Now the menu will show in the corresponding language according to the Locale selected for Puppy.

This means that a language package could have a script to insert the corresponding translations inbto the .desktop/directory files.