Page 1 of 1

Localizing Grafpup

Posted: Sat 24 May 2008, 17:17
by Nathan F
I'm formally putting forth an invitation and request for any interested parties to help with translations for the various scripts used in Grafpup Linux. There is a mountain of work to be done overall but it will probably be done in small, incremental changes. I will provide coding to make it possible for scripts to use separate language files, beginning with any new programs I write but proceeding through legacy scripts and applications from Puppy. I want eventually to see all scripts use the LANG environment variable for any on-screen displayed text.

I would like to mention that I will do my best to push anything which could be useful to Puppy as a whole upstream. I run Grafpup as a separate distro in many ways, but I am still in love with Puppy and am committed to making my contribution to the project.

If you are interested please reply to this thread or send me a pm. I'll get back with you so we can figure out the best way to collaborate.

Nathan

Posted: Sat 24 May 2008, 21:41
by magerlab
yes it would be great to have a fully localised scripts
i wrote you before a pm
so i'm interested to try a new release and it's translation

Posted: Sun 25 May 2008, 18:14
by Nathan F
It could be approached one of two ways. I could give you commit access to my subversion repo if you are comfortable using subversion, or more likely I could just send you the english translation files from which to work and update subversion myself. Your choice.

Right now there are only a couple scripts ready to go, but I plan on steady work over the next couple months.

Nathan

Posted: Fri 30 May 2008, 09:31
by esmourguit
Hello Nathan,

I think i can help you to localize Grafpup in french if you want.
I have made Toutou Linux, the french localization of Puppy.

Cordialement ;)

JJ M

Grafpup Localization

Posted: Sat 31 May 2008, 03:39
by ricstef
Nathan,
I'd like to look at some scripts in which you implemented localization. Where are they to be found?
Do I need any special privileges to just check a couple of them out and see how you went about it?
I think I could help separating out the text strings and replace them with
variables.
Do you have a list of what scripts you would like done first ?
Also any ground rules you would like observed for consistency sake.

Cheers,
Richard.

Posted: Sat 31 May 2008, 14:11
by Nathan F
ricstef - The programs I am currently working on are all in subversion hosted by google. If you have the subversion client installed then you can check out the whole tree with this command:

Code: Select all

svn checkout http://grafpup-linux.googlecode.com/svn/trunk/ grafpup-linux
Otherwise take a look at the latest version of the wallpaper setter here. The main program is inside the directory /usr/local/apps/Wallpaper in the scripts AppRun and functions, and the translation files are in the locale subdirectory.

I based the method on what Zigbert is using with his various programs, for consistency and because it is a good implementation. So another good place to look to understand the code is Pburn or any of his other programs. Basically any displayed text must be replaced by a variable, which is stored in a separate translation file. If the translation files follow BASH syntax then they can be sourced from the main script. You can use the LANG environment variable to tell your script which translation you want it to use. As long as one complete translation file is always sourced first, followed by the desired language, it will fill in any gaps in other translations.

If you would like to help with the work of separating out the strings that would be wonderful. Much of it is just drudgery once you have a handle on the method. The main difference between my implementation and Zigbert's is that he uses numbers as variables, while I'm using names which mean something to me about what string the variable holds. Of course those names will not mean anything in other languages and it is purely for my convenience reading the code in English. My coding standards are just that you comment the code liberally to make it easy to follow and understand what part of a program/interface is being referred to. This becomes especially important for others down the road who may wish to re-use your code, or to update it.

esmourguit - I have heard good things about Toutou Linux. I would be glad of the help in translation. I have five sub-projects currently being worked on in subversion, as I mentioned before, but if you would prefer I can separate out the specific files which are ready for translation and send you a tarball. I will leave the choice up to you. Oh, and thank you very much for your offer.

Nathan

Localizing Grafpup

Posted: Sun 01 Jun 2008, 02:03
by ricstef
Nathan,
I am looking at what you did in the wallpaper setter to orient myself to your way of doing things. Also I'll look at Zigbert's pburn.

Cheers,
Richard

Posted: Wed 04 Jun 2008, 08:54
by esmourguit
Hello Nathan,

It's OK, send me the tarball.
Cordialement ;)
JJ M