VectorLinux
December 22, 2014, 12:08:14 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: GUI Installer ready for translation  (Read 3682 times)
rbistolfi
Packager
Vectorian
****
Posts: 2291


« 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 googlecode.com.
You will need the subversion package installed into your system, if you don't have it yet you can do:

Code:
slapt-get -i subversion

or find it with gslapt.
Now in your terminal run the following command:

Code:
svn checkout http://vinstall-ng.googlecode.com/svn/branches/iVL 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:
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:
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:
#: MdlNetConf.module:205
msgid "Encryption type"
msgstr ""

And you have to complete the translation like this:

Code:
#: 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:
msgfmt --statistics -o es.mo es.po

Naturally you will have to replace es.mo (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.
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #1 on: November 04, 2008, 04:36:54 pm »

Thanks!
I'm on the Portuguese translation.
I'll let you know when it's finished.
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3195



« Reply #2 on: November 05, 2008, 05:53:24 am »

Nice Wink
Logged

wcs
Packager
Vectorian
****
Posts: 1144


« Reply #3 on: November 27, 2008, 08:46:52 pm »

Heya!

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...  Embarrassed  Roll Eyes

Thank you!
« Last Edit: November 27, 2008, 08:49:25 pm by wcs » Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #4 on: November 27, 2008, 09:43:09 pm »

I'll get this ready asap for inclusion....
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!