Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:doc:translation [06/03/2011 16:40] xavieren:doc:translation [20/11/2014 14:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== How to translate QElectroTech to another language? ======
 +===== What must be translated? =====
  
 +Here is the (supposed to be exhaustive) list of components to translate in a given language for QElectroTech:
 +  * the strings in the program itself: ''.ts'' and ''.qm'' files in the ''lang/'' directory;
 +  * in qetproject.cpp, function QETProject::namesListForIntegrationCategory() : hardcoded translation of "Imported elements" to provide to the developer;
 +  * the strings from the Qt toolkit: generally: ''.ts'' and ''.qm'' files already translated to look for in the [[http://trolltech.com/downloads/opensource/appdev|last version of Qt]]'s official .tar.gz;
 +  * the names in the elements collection : .elmt and qet_directory files  in the ''elements/'' directory;
 +  * the shortcut towards QElectroTech in the menus: ''qelectrotech.desktop'' file in ''misc/'';
 +  * the files associations: ''x-qet-*'' files in ''misc/'';
 +  * the Unix manual in ''man/'';
 +  * the ''CREDIT'', ''README'', ''ELEMENTS.LICENSE'' and ''INSTALL'' files ;
 +  * The '' packaging/linux/fedora/README.elements'' file.
 +
 +===== Now what? ===== 
 +  * Maintenance of translations by regularly following the modifications in the Subversion repository;
 +  * translation of the documentation on the Wiki.
 +
 +===== How to test a translation =====
 +
 +==== Windows ====
 +
 +The easiest way is to change the system language.
 +
 +Alternatively, the launcher [color=red]Lancer Qet.bat[/color] is added to the (set command=) an [color=blue]set LANG=en_US[/color] by example
 +
 +__Which gives:__
 +
 +
 +<code>
 +...........
 +set LANG=en_US
 +rem lance QElectroTech
 +set command=bin\qelectrotech.exe --common-elements-dir=elements/ --common-tbt-dir=titleblocks/ --lang-dir=lang/ --config-dir=conf/ -style plastique %*
 +................
 +</code>
 +==== linux ====
 +
 +On linux platform Qet by default detect locale system, but you can run Qet in other language by :
 +just run in a terminal 
 +
 +for example :
 +
 +[color=red]german[/color]
 +[code]LANG=de_DE qelectrotech[/code]
 +[color=red]italian[/color]
 +[code]LANG=it_IT qelectrotech[/code]
 +[color=red]english[/color]
 +[code] LANG=en_EN qelectrotech[/code]
 +
 +It run Qet in the language that you want
 +
 +
 +
 +
 +
 +<code>
 +laurent@debian:~$ export LANG="en_US";    qelectrotech
 +</code>
 +
 +Or
 +
 +<code>
 +laurent@debian:~$ LANG="en_US" qelectrotech
 +</code>
 +
 +
 +
 +===== What tools? =====
 +  * To contribute to the project: some  [[subversion|usage notions]] of [[http://svnbook.red-bean.com/en/1.4/svn-book.html|Subversion]];
 +  * To test the application being developed and the recent translations: a [[doc:test_dev_version|compiled version of QET]];
 +  * For the .ts / .qm: [[http://doc.trolltech.com/4.4/linguist-translators.html|Qt Linguist]] (with the tools lupdate et lrelease);
 +  * For the other files: any text editor worthy of this name
 +
 +
 +It is of course possible to learn how to use these tools on the fly by coming on our IRC channel.
 +If you wish to translate QElectroTech, contact the development team by email or join our IRC channel. The accepted languages to communicate with the development team are the French, the English and the Spanish.
 +===== How to update the .ts files from the sources files? =====
 +Note: the .ts files are generally updated by the developer when he considers the new strings perennial.
 +  * Edit qelectrotech.pro: comment the lines beginning by ''TRANSLATIONS += '': <code bash>sed -i 's/^TRANSLATIONS/#TRANSLATIONS/g' qelectrotech.pro</code>
 +  * Execute the following command: <code>lupdate-qt4 -noobsolete qelectrotech.pro -ts lang/qet_en.ts lang/qet_es.ts lang/qet_ru.ts lang/qet_pt.ts lang/qet_cs.ts</code>
 +  * Optional : update the translation file for french plurals: <code>lupdate-qt4 -noobsolete -pluralonly qelectrotech.pro -ts lang/qet_fr.ts</code>
 +  * Restore the qelectrotech.pro file: <code bash>sed -i 's/^#TRANSLATIONS/TRANSLATIONS/g' qelectrotech.pro</code>
 +
 +===== Translations status =====
 +:!: Translators: since 07/05/2012, the work is back to the trunk, forget the 0.3 branch.
 +
 +**Statistics for 0.3 branch**
 +{{page>doc:translation:stats&nofooter&noeditbtn}}
 +
 +Notes :
 +  * In order to be officially integrated (= in the setup and packages), the translation to a given language must be over 90.0% for the application.
 +  * Qt translations are always considered as being done since they are under the responsibility of Qt Software, except for the Czech translation, handled by Pavel Fric via Gitorious : see [[doc:qt_translation_cs|Qt translation to czech]]
 +
 +===== Miscellaneous scripts =====
 +All scripts previously exposed in this section have been integrated  into the [[http://websvn.tuxfamily.org/filedetails.php?repname=qet%2Fqet&path=%2Fbranches%2F0.3%2Fmisc%2Ftranslations_stat.pl|misc/translations_stat.pl]] script.
Print/export