Hi all,
MiniHowto : "Create a localisation pet package for Puppy 4.x"
__________________________________________________
Create a new folder in /root with the name Puppy_it-4.0 (or whatever you will).
This folder will serve to create the pet package at the end of the procedure.
1. Install the it_IT locale
Run "Menu-Desktop-Chooselocale country localisation" and click on the button FETCH.
Dowload the locale it_IT
X restart automatically and your are now with the locale it_IT activ.
Copy the directory /usr/lib/locale/ it_IT/ in the directory /usr/lib/locale/ of your folder Puppy_it-4.0 .
2. Install the language files .mo or others
The .mo files are generally used as external files to tranlate the gui of most applications in different languages. The choosen language is determined by the selectionned language in the Chooselocale command (and it is written in the file /etc/profile at the line LANG=it_IT). It's important that the .mo files are correctly put in the hierarchy. Most of them are put in the following directories :
/usr/share/locale/it/LC_MESSAGES
Examples : chemtool ; cups-shell ; epdfview ; geany ; gftp ; glib20 ; glipper ; gnumeric-functions ; gnumeric ; gparted ; gperiodic ; gtk20 ; gtk20-properties ; gxine ; homebank , inkscape ; isomaster ; leafpad ; libgnomeprint-2.2 ; libgnomeprintui_2.2 ; linux_logo ; notecase ; osmo ; stardict ; sylpheed ; xfe , xpad ; Xsane.
/usr/share/locale/it_IT/LC_MESSAGES
Examples : klavaro ; mtpaint.
/usr/local/share/locale/it/LC_MESSAGES
Examples : dia ; gqview ; linNeighborhood ; xarchiver.
You can collect these .mo files in the sources of the different applications. If only .po files are available create the corresponding .mo file with a soft such as poedit under windows, for example.
Notes
The localisation of AbiWord is made with a text file named it-IT.strings put in /usr/share/AbiSuite-2.4/AbiWord/strings/
La localisation de ROX-Filer se fait à l'aide de fichiers .gmo (de.gmo, fr.gmo, it.gmo, etc...) put in the directory /usr/local/apps/ROX-Filer/Messages/
The localisation of the applications developped by Zigbert (pburn, pbackup, etc....) can be made with text files put in the installation directory of the programs. You have to translate the localisation file from English to Italienisch. See the link http://www.murga-linux.com/puppy/viewtopic.php?p=164887 for the case of Pburn.
3. JWM desktop
When you modify something in /root/Choices/ROX-Filer/PuppyPin, you have to restart X after to see your modifications.
When you do something in your system in /usr/share/applications/ or in /usr/share/desktop-directories/ you must after run the command fixmenus and restart JWM to see the modifications.
3.1. Icons
Modify the text under the different desktop icons by editing the following file :
/root/Choices/ROX-Filer/PuppyPin.
3.2. Principal menu categories (Desktop, System, Setup, etc...)
You have to edit the text files *.directory contained in /usr/share/desktop-directories. For instance to obtain the categorie Utilità insteed of Utility edit the file /usr/share/desktop-directories/ Puppy-Utility.directory as following (add only the line with [it]) then save the file :
Encoding=UTF-8
Name=Utility
Name [it]=Utilità
Icon=utility24.png
Type=Directory
3.3. The JWM menu entries
Each menu entry is defined by a *.desktop file in /usr/share/applications. Seach a file allowd to define completely a menu entry when giving :
its name and icon in the menu
the corresponding executable to run
the category in which it will appears in the menu. The complete list of categories which can be used is in the file /etc/xdg/menus/hierarchy.
To have an italienisch entry for AbiWord, for instance, open the /usr/share/applications/Abiword-worprocessor.desktop file and modify it by adding such a line : Name[it]=Elaboratore di testi (AbiWord)
Also, after modification, your file will be the following :
Encoding=UTF-8
Name=Abiword wordprocessor
Name[it]=Elaboratore di testi (AbiWord)
Icon=abiword_16.xpm
....
You are now capable of to do the same with all the .desktop files contained in /usr/share/aoolications to translate all the menu entries in italienisch.
4. Scripts
If you are always alive, we could have a look on the scrips, especially those in /usr/sbin. It's a little annoying because no external language file exist and you have to translate directly in the script opened in Leafpad, for example. You have to be careful and not corrupt the code. Pehaps begin with an easy one such as Pmount. The most important to translate could be in the following list : alsaconf / bkup2cd.sh / cdburner-wizard / chooselocale / connectwizard / countrywizard / dotpup / dotpuprox.sh / floppy-format.sh / input-wizard / modemtest / modem - wizard / partview / pcreatetorrent / pctorrent / petget / pmount / Pudd / pupdial / puppypdf / pupremaster.sh / pupscan / resizepfile.sh / save2flash / set-time-for-puppy / set-xftdpi / timezone-set / video-wizard / wakepup2 / xorgwizard / xrandrshell / xserverwizard.
5. Create the final .pet package
Click right in /root and choose the command Window-Terminal here to open a terminal window.
Type the command line : dir2pet Puppy_it-4.0 (or the name you given to your fold) and validate by Return.
Follow the instructions of the assistant
In a few seconds, your .pet package is created.
You can install it and conserve it for further adaptation when a new version of puppy comes.
After run your .pet don't forget to restart X serveur and JWM.
______________________________________________________________
Good luck
Grandi risultati vedo :)poedit può mostrare le stringhe non tradotte se ben ricordo, poi si usa gettext per rifare il file .mo (che cambiato di estensione in .gmo dovrebbe funzionare con jwm)
Xanad, se ci dici quali parti mancano da tradurre in ITA ti aiutiamo a finire. Anzi, per semplicità puoi anche solo dirci quali sono le aggiunte in italiano rispetto alla puplet che hai rilasciato l'altro giorno ;)
RISOLTO --ho incluso la traduzione (che dovrà essere completata) di Rox in questo pacchetto in cui via via aggiungerò tutte le altre:
Grazie, utilizzo poedit da tempo ma per win, non lo trovo piu' per puppy.
Siccome il primo file era molto lacunoso ho seguito un altro percorso.
Ho scaricato l'ultima versione di ROX-filer ed ho estratto il file della lingua e anche l' help in html. Poi ho convertito in "it.gmo" e l'ho copiato nella cartella precedentemente creata
" Messages".
E finalmente tutto funziona!!
Lo sento sempre di piu' abbaiare in italiano, il caro puppy.
Solo alcuni (2 o 3) termini sono rimasti in inglese ed alcune parole tradotte sono un po' sgangherate, ma le modifichero'.
Se vuoi testarlo anche tu: http://www.ziddu.com/download/8844142/ROX-filer.rar.html
Per chi vuole provarlo ho anche fatto un piccola guida in pdf scaricabile da qui:
xanad.altervista.org/pet_ita.html
Un altro tassello al suo posto.
xanad
© 2010 - 2021 ItalianPuppy.org. - Cookie Policy