Cooking up the Treats => Distro development => Topic started by: rbistolfi on November 04, 2008, 02:46:24 pm

Title: GUI Installer ready for translation
Post by: rbistolfi on November 04, 2008, 02:46:24 pm
As you probably know, M0E-lnx and uelsk8s are working on the new VectorLinux graphical installer.
It will have very nice features from automated install for inexperienced users to advanced settings
and configurations. One of the new features is full localization of the installer.
If you want to contribute a translation keep reading!

How to translate the VL installer

Preparing your system

The first thing you need is the code. The project is hosted in a svn repository at
You will need the subversion package installed into your system, if you don't have it yet you can do:

Code: [Select]
slapt-get -i subversion
or find it with gslapt.
Now in your terminal run the following command:

Code: [Select]
svn checkout vl-installer
That will leave the source code of the installer in the vl-installer folder.
The second thing you need is the latest version of the gambas IDE and the gambas runtime, you can get it enabling the testing repository and:

Code: [Select]
slapt-get -u && slapt-get -i gambas2 gambas2-runtime
You might need to downgrade this packages after finishing the translation. Keep in mind that vasmCC, vcpufreq, vl-hot-config and some other VL tools depends on the gambas-runtime package and they were not tested against this new version. Anyway, you can downgrade to the stable version of this packages at any time.

Translating using the Gambas2 IDE (recommended)

Launch the gambas IDE, and open the project by clicking in "open project ..." and selecting the vl-installer folder. Then go to "Project", "Translate"; or just perss Control+t. A friendly gui form will appear, select the language you want to translate into from the left column, in the right column you can see the untranslated strings. Select the string you want to translate and input the translated text in the text box in the bottom of the window.If the language you want to translate into is not listed in the left column you will need to create a new translation. Click in "new" and select the language from the list. Now you just follow the procedure explained above, but all your strings will be untranslated, so just start from the first one :-).
Once you finish your translations, click in "Export" and save the translation to a .po file located in the vl-installer/.lang/ folder. Name the file with the proper language code (locale -a will give you a list if you need one).

Translating with a regular editor

We recommend using the Gambas2 IDE, since it will do some stuff for you, like special character escaping; and this procedure is still untested. But if you like, you can use the text editor of your preference. Find the master .pot file in vl-installer/.lang/.pot and copy it using the language code with the .po extension, for example:

Code: [Select]
cp .pot es_ES.po
Open the file with the text editor of your choice, and translate the strings. You will find something like this:

Code: [Select]
#: MdlNetConf.module:205
msgid "Encryption type"
msgstr ""

And you have to complete the translation like this:

Code: [Select]
#: MdlNetConf.module:205
msgid "Encryption type"
msgstr "Tipo de encriptación"
As you can see, "msgid" is the label for the original text, and "msgstr" is the one for the translated text. You will have to be very careful escaping special characters. For example, if the string to be translated has quotes on it, they need to be escaped using the "\" (backslash) character. A safe way is just copying and paste the string and replace the original text keeping the escaping characters.
Once all the strings are translated you need to compile the .po file to get a .mo file like this:

Code: [Select]
msgfmt --statistics -o es.po
Naturally you will have to replace (the target file) and es.po with the proper filenames.

Submitting your translation

We need both, the .po and the .mo files in the installer, please upload them to a public location and place a link in this thread, or just contact me.

A last minute note: The code can change a bit before the final release, so you may need to keep your translation up-to-date until then by fetching the code and completing the new strings. You can update the code very easily running svn up from the local folder of the installer.

Thanks in advance.
Title: Re: GUI Installer ready for translation
Post by: wcs on November 04, 2008, 04:36:54 pm
I'm on the Portuguese translation.
I'll let you know when it's finished.
Title: Re: GUI Installer ready for translation
Post by: M0E-lnx on November 05, 2008, 05:53:24 am
Nice ;)
Title: Re: GUI Installer ready for translation
Post by: wcs on November 27, 2008, 08:46:52 pm

I just got the latest code from subversion, but it tells me the project is read-only...
And then cannot get the translate menu.

Does this mean it's too late for submitting it??

EDIT: Nevermind.... downloaded as root, was trying to access as user...  :-[  ::)

Thank you!
Title: Re: GUI Installer ready for translation
Post by: wcs on November 27, 2008, 09:43:09 pm
I'll get this ready asap for inclusion....