Ceci est une ancienne révision du document !


Comment traduire QElectroTech dans une autre langue ?

Que faut-il traduire ?

Voici la liste (normalement exhaustive) des composants à traduire en une langue donnée pour QElectroTech :

And after ?

  • Maintenance of translations by regular monitoring of changes in the Git or Github repository;

How to test your translation

Windows

The easiest way is to change the system language.

Another solution: in the launcher Lancer Qet.bat we add in the (set command=) un set LANG=en_US by example

Which give:

..........
set command=bin\qelectrotech.exe --common-elements-dir=elements/ --common-tbt-dir=titleblocks/ --lang-dir=lang/ --config-dir=conf/ 
set LANG=en_US -style plastique %*
.............

Or

...........
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 %*
................

linux

laurent@debian:~$ export LANG="en_US";    qelectrotech

Ou

laurent@debian:~$ LANG="en_US" qelectrotech

Find untranslated elements in a given language

Download this script to put in your git copy

wget http://download.tuxfamily.org/qet/scripts/detect_non_translated_elements.sh

Make it executable

chmod +x detect_non_translated_elements.sh

Find items not translated into Polish for example:

laurent@debian:~/Qet-svn/qet_directory$ ./detect_non_translated_elements.sh pl
./elements/automatisme/domotique/qet_directory
./elements/automatisme/regulateurs/wit/wit6.2ucentrale.elmt
./elements/domestique/electromenager/eclairage.elmt
./elements/domestique/electromenager/lave-linge.elmt
./elements/domestique/electromenager/arrosage-auto.elmt
./elements/domestique/electromenager/terre.elmt
./elements/domestique/electromenager/gestion-energie.elmt
./elements/nomenclatures/grille_composition.elmt

What tools?

  • To participate in the project: some notions of using Git;
  • To test the application under development and thus test the translations of recent strings: a version compilée de QET ;
  • For the .ts / .qm : Qt Linguist (as well as utilities lupdate et lrelease) ;
  • for other files: any text editor worthy of the name.

It is of course possible to learn how to use these tools on the job by coming to our IRC channel. If you want to translate QElectroTech, contact the development team by email or visit our IRC channel. The languages accepted to communicate with the development team are French and English.

How to update .ts files from source files?

Note: *.ts are generally updated by the developer when he considers that the character strings to be translated are viable or by translators.

  • Édit qelectrotech.pro file: Comment out the lines starting with TRANSLATIONS += :
    sed -i 's/^TRANSLATIONS/#TRANSLATIONS/g' qelectrotech.pro
  • Run the following command:
    lupdate -noobsolete qelectrotech.pro -ts lang/qet_{en,es,ru,pt,cs,pl,ca,de,ro,it,ar,sl,hr,el,nl,be,sl,zh,hu,pt_br,da,sr,fr,tr,sk,nb,mn,ja,cn,uk}.ts
  • Restore missing references to source files :
    /usr/lib/x86_64-linux-gnu/qt5/bin/lupdate -locations absolute  qelectrotech.pro -ts lang/qet_br.ts
  • Restore file qelectrotech.pro:
    sed -i 's/^#TRANSLATIONS/TRANSLATIONS/g' qelectrotech.pro
  • Generate translation binaries:
    lrelease lang/qet_*.ts

translation status

Statistics for the master branch

Langue Traducteur Qt Application Collection Fichiers misc/*.desktop Fichiers misc/*.xml Manuel Unix CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements
[fr] Français (Français) Laurent Trinques [ok] 2219/2499 (88.8%) 8160/9496 (85.9%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[en] English (Anglais) Laurent Trinques [ok] 2220/2499 (88.8%) 7641/9496 (80.5%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[es] Español (Espagnol) Alfredo Carreto [ok] 1958/2499 (78.4%) 3441/9496 (36.2%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[pt] Português (Portugais) Jose Carlos Martins [ok] 578/2499 (23.1%) 1173/9496 (12.4%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[cs] český (Tchèque) Pavel Fric [ok] 2447/2499 (97.9%) 7954/9496 (83.8%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[pl] Polski (Polonais) Pawel Smiech [ok] 2442/2499 (97.7%) 3420/9496 (36.0%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[ca] Català (Catalan) Youssef Ouamalkran & Eduard Amoros [ok] 1142/2499 (45.7%) 1228/9496 (12.9%) [ok] [ok] TODO TODO TODO [ok] [ok] TODO
[de] Deutsch (Allemand) Markus Budde & Jonas Stein & Noah Braden & Nuri [ok] 2460/2499 (98.4%) 5559/9496 (58.5%) [ok] [ok] TODO TODO [ok] [ok] [ok] [ok]
[it] Italiano (Italien) Alessandro Conti & Silvio Brera [ok] 1581/2499 (63.3%) 3457/9496 (36.4%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[ar] العربية (Arabe) Mohamed Souabni [ok] 1350/2499 (54.0%) 2424/9496 (25.5%) [ok] [ok] TODO TODO TODO TODO TODO TODO
[sl] Slovenski (Slovene) Uroš Platiše [ok] 0/2499 (0.0%) 473/9496 (5.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[hr] Hrvatski (Croate) Antun Marakovic [ok] 569/2499 (22.8%) 475/9496 (5.0%) [ok] 0/1 TODO TODO TODO TODO TODO TODO
[el] ελληνικά (Grec) Nikos Papadopoylos & Yannis Gyftomitros [ok] 2120/2499 (84.8%) 2276/9496 (24.0%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[nl] Nederlands (‎Néerlandais) Paul Van Deelen & Elbert [ok] 2490/2499 (99.6%) 3180/9496 (33.5%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[be] Belgium-Flemish (Belge-flamand) Ronny Desmedt [ok] 2200/2499 (88.0%) 388/9496 (4.1%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[ru] Русский (Russe) Yuriy Litkevich & Evgeny Kozlov [ok] 2417/2499 (96.7%) 1091/9496 (11.5%) [ok] [ok] [ok] [ok] [ok] [ok] [ok] [ok]
[ro] Română (Roumain) Gabi Mandoc & Titus [no] 830/2499 (33.2%) 499/9496 (5.3%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[da] Dansk (Danois) ossau2mation [ok] 2356/2499 (94.3%) 686/9496 (7.2%) [ok] [ok] TODO TODO [ok] [ok] [ok] [ok]
[pt_BR] Brasileiro (Brésilien) Hilario & Thiago Cruz [ok] 2448/2499 (98.0%) 219/9496 (2.3%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[hu] Magyar (Hongrois) Gábor Gubányi [ok] 2441/2499 (97.7%) 815/9496 (8.6%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[sr] српски (Serbe) [ok] 0/2499 (0.0%) 473/9496 (5.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[tr] Türk (Turc) Aziz & Emir [ok] 1657/2499 (66.3%) 475/9496 (5.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[nb] Norwegian (Norvege) JoelAs [ok] 2089/2499 (83.6%) 473/9496 (5.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[ja] 日本語 (Japonais) Yuki [ok] 1847/2499 (73.9%) 653/9496 (6.9%) [ok] [ok] TODO TODO [ok] [ok] [ok] [ok]
[mn] Монгол (Mongol) Nathalie [ok] 1704/2499 (68.2%) 469/9496 (4.9%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[uk] українська (Ukrainien) Yaroslav [ok] 2427/2499 (97.1%) 0/9496 (0.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO
[zh] 中国人 (Chinois) Eric Wang [ok] 2447/2499 (97.9%) 0/9496 (0.0%) 0/1 0/1 TODO TODO TODO TODO TODO TODO

Dernière date de mise à jour : 22/05/2024 08:34

Notes :

  • Qt translations are always considered done as they are the responsibility of Qt Software, with the exception of the Czech translation, handled by Pavel Fric via Gitorious : cf Qt translation to czech

Miscellaneous scripts

All scripts formerly presented in this section have been integrated into the script misc/translations_stat.pl.

Imprimer/exporter