Menu:

Get Qtpfsgui at SourceForge.net. Fast, secure and Free Open Source software downloads Valid XHTML 1.0 Transitional

About

This is an howto that explains the steps required to internationalize Qtpfsgui.
By internationalize we mean translating all the English text messages in Qtpfsgui to your native language (English is Qtpfsgui's default language).
Contact me in case this howto is not clear.

Prerequisites

As you know Qtpfsgui uses the library Qt to draw its widgets on the screen. Qt contains a framework to internationalize an application. We will use that framework in this howto.
In order to uses that framework you need a complete installation of Qt 4. This means that, if you use windows, the DLL contained the "Windows DLL Package V3" are not enough. You need to go to http://www.trolltech.com/developer/downloads/qt/windows and get the full thing.
There is no such problem in Linux because (if can run qtpfsgui) you already have a complete installation of Qt 4.

First step (check for a maintainer)

First thing is to check if the language for which you want to contribute has already a maintainer.
This is the list of languages which, so far, already have a maintainer:
Language Maintainer
Czech (cs) Jan Gemela
English (en) Giuseppe Rota
French (fr) Cyril Lavier
German (de) Daniel Kaneider
Hungarian (hu) Peter Gaal
Indonesian (id) Teddy Widhi Laksono
Italian (it) Giuseppe Rota
Polish (pl) Maciej Dziardziel
Russian (ru) Alexandre Prokoudine
Spanish (es) Alberto Garcia
Turkish (tr) Mustafa G√ľnay
A language is identified, for our purposes, by its 2 letter ISO 639 code. You can lookup your language code here.
If you want to contribute for a language which is not already on the list contact me.
If you want to contact a translator on the list please contact me.

Second step (translation)

Windows procedure

I will send you a "ts" file. This file will be named, for example, lang_it.ts (for italian) or lang_no.ts (for norwegian).
You should put this file in the i18n directory that you will find in the directory where you have put the qtpfsgui.exe file.
You can then load that file in Qt linguist and start translating.
Qt Linguist is pretty easy to use, but if you need help with that, you can find a lot of information both in Qt Assistant or online here.

Linux procedure

I can either send you the "ts" file directly as explained above in the windows procedure or you can create the file yourself if you prefer so.

Here's how to do that yourself: add your specific entry in the TRANSLATION variable near the end of the project.pro file.
As you can see from the existing entries (near the end of the project.pro file) our standard is to put the "ts" files in the i18n (means internationalization) directory; also, the file starts with "lang_" followed by the 2-letter language code. The last part is the ".ts" extension. This standard has to be followed.

Here's an example for italian, norwegian and russian:
TRANSLATIONS = i18n/lang_it.ts \
               i18n/lang_no.ts \
               i18n/lang_ru.ts


Once you have edited the project.pro you can run:
lupdate project.pro
to generate the "ts" file in the ./i18n directory.
Then you can load the "ts" file in Qt Linguist and start translating.
Qt Linguist is pretty easy to use, but if you need help with that, you can find a lot of information both in Qt Assistant or online here.

Third step (test your translation)

Once you have finished translating in Qt Linguist your "ts" file, you should check the correctness and quality of your translation.
From Qt Linguist you can "release" your translation into a proper format that can be loaded by the qtpfsgui executable at runtime, this format is a "qm" file.
Click on File->Release in Qt Linguist and you should get a "qm" file in the i18n directory with the same prefix as the "ts" file. In other words you'll find an "qm" file in the same directory where you have your "ts" file.
For example "releasing" i18n/lang_ru.ts creates the file i18n/lang_ru.qm.

Please bear in mind that by default (in Linux) Qtpfsgui will look for the qm translation files in the directory
/usr/local/share/qtpfsgui/i18n (more precisely in $${PREFIX}/share/qtpfsgui/i18n, but $${PREFIX} is equal to /usr/local by default).
That is probably not what you want it to do. Now that you are testing your translation you want Qtpfsgui to load the qm files in the i18n directory that you just updated. In order to do so you should have compiled Qtpfsgui using:
qmake I18NDIR=./i18n
If that was not the case you should issue a:
make distclean
command to remove the Makefile and all the object files and start it all over again from the "qmake" step.

Fourth step (publish your translation)

Once everything checks out you can send back to me the "ts" file. I will add that into the SVN repository and your file will be published, along with all the other files, in the next release of Qtpfsgui.

Fifth step (update translation)

Once you have created a translations it would be fine if you could continue to maintain it. This means that before new releases are published, all translators are invited to update the translations with the new version.
For this it is helpful to subscribe to the qtpfsgui-i18n@lists.sourceforge.net - mailing list which can be found HERE.