From 1048a7e34a57af467891c5e3d8d354417ac22a4e Mon Sep 17 00:00:00 2001 From: Olivier Keshavjee Date: Mon, 8 Jun 2015 02:10:18 +0200 Subject: [PATCH] Playing with translations --- languages/snowflaQe.pro | 3 + languages/snowflaQe_fr.qm | Bin 0 -> 87 bytes languages/snowflaQe_fr.ts | 536 ++++++++++++++++++++++++++++++++++++++ makefile | 6 + src/main.py | 12 + 5 files changed, 557 insertions(+) create mode 100644 languages/snowflaQe.pro create mode 100644 languages/snowflaQe_fr.qm create mode 100644 languages/snowflaQe_fr.ts diff --git a/languages/snowflaQe.pro b/languages/snowflaQe.pro new file mode 100644 index 0000000..12d60c3 --- /dev/null +++ b/languages/snowflaQe.pro @@ -0,0 +1,3 @@ +FORMS += ../src/ui/mainWindow.ui +SOURCES += ../src/main.py +TRANSLATIONS += snowflaQe_fr.ts diff --git a/languages/snowflaQe_fr.qm b/languages/snowflaQe_fr.qm new file mode 100644 index 0000000000000000000000000000000000000000..10b544f2318010b27fa319a78e94beed033e0ee7 GIT binary patch literal 87 zcmcE7ks@*G{hX<16=n7(EZlq7iGhKEgCpndQXtKc3B-ELAQ6TThE#@Ph7t~tFdGoF gI~JrC9bR6_4rFurCT8Y^XXd5kmos(%`Ap1=07~c;Y5)KL literal 0 HcmV?d00001 diff --git a/languages/snowflaQe_fr.ts b/languages/snowflaQe_fr.ts new file mode 100644 index 0000000..098d482 --- /dev/null +++ b/languages/snowflaQe_fr.ts @@ -0,0 +1,536 @@ + + + + MainWindow + + + MainWindow + + + + + Aperçu + Test + + + + Information sur le livre + + + + + Titre + + + + + Sous titre + + + + + Volume + + + + + Genre + + + + + License + + + + + Informations sur l'auteur + + + + + Nom + + + + + Email + + + + + Une phrase + + + + + Suivant + + + + + Un paragraphe + + + + + Une page + + + + + 4 pages + + + + + Personnages + + + + + Noms + + + + + Filter + + + + + Importance + + + + + Motivation + + + + + Goal + + + + + Conflit + + + + + Epiphanie + + + + + Notes + + + + + Intrigues + + + + + Principale + + + + + Autre intrigue + + + + + Intrigue + + + + + Perso(s) + + + + + Description + + + + + Albert + + + + + Sylvestre + + + + + Gentiana + + + + + Complet + + + + + Contexte + + + + + Plan + + + + + Intrigue secondaire + + + + + POV: + + + + + Goal: + + + + + Nombre de mots + + + + + F11 + + + + + POV + + + + + Status + + + + + Compile + + + + + Tools + + + + + Albert - perso + + + + + Jean - perso + + + + + Crapoquak - animal + + + + + La revenche du capitaine - intrigue + + + + + Debug + + + + + FlatData + + + + + Persos + + + + + Perso Infos + + + + + Outline + + + + + &Fichier + + + + + Mo&de + + + + + &Aide + + + + + &Outlis + + + + + &Ouvrir + + + + + Ctrl+O + + + + + Ctrl+R + + + + + &Enregistrer + + + + + Ctrl+S + + + + + Enregistrer &sous... + + + + + Ctrl+Shift+S + + + + + &Quitter + + + + + Ctrl+Q + + + + + &Snowflake + + + + + &Nouveau + + + + + Ctrl+N + + + + + Afficher les &bulles d'aide + + + + + Ctrl+Shift+B + + + + + Correcteur ortographique + + + + + F8 + + + + + Dictionnaire + + + + + Aperçu + + + + + Série + + + + + Résumé + + + + + Résumé en une phrase + + + + + Résumé en un paragraphe + + + + + Écrire chaque phrase du paragraphe précédent en une paragraphe. + + + + + Résumé en 1 page + + + + + Résumé complet + + + + + Informations générales + + + + + <html><head/><body><p align="right">Résumé<br/>une phrase</p></body></html> + + + + + <html><head/><body><p align="right">Résumé<br/>un paragraphe</p></body></html> + + + + + Informations détaillées + + + + + Résultat + + + + + Étapes de résolution + + + + + Un bâteau arrive au port et personne ne sait pourquoi + + + + + Le roi envoie des émissaires à bord. Ils ne reviennent jamais. + + + + + Le roi envoie son armée. + + + + + Liste de scènes + + + + + Intrigue général + + + + + Scène 1 + + + + + Scène 2 + + + + + Résumé de la scène en une ligne + + + + + Résumé en quelques phrases: + + + + + Rédaction + + + + + Scène + + + + + Propriétés + + + + + Résumé de la scène + + + + + Notes pour la scène + + + + + Aide mémoire + + + + + &Récents + + + + diff --git a/makefile b/makefile index 6305e0d..03a5f28 100644 --- a/makefile +++ b/makefile @@ -19,6 +19,12 @@ profile: compile: cd src && python3 setup.py build_ext --inplace +translation: + pylupdate5 languages/snowflaQe.pro + +linguist: + linguist languages/snowflaQe_fr.ts + %_rc.py : %.qrc pyrcc5 "$<" -o "$@" diff --git a/src/main.py b/src/main.py index 8480c5f..9cb948b 100644 --- a/src/main.py +++ b/src/main.py @@ -12,6 +12,18 @@ def run(): app.setStyle("Fusion") + ### Translation process + locale = QLocale.system().name() + #qtTranslator = QTranslator() + #if qtTranslator.load("qt_" + locale): + #app.installTranslator(qtTranslator) + appTranslator = QTranslator() + if appTranslator.load("languages/snowflaQe_{}".format(locale)): + app.installTranslator(appTranslator) + else: + print("Failed to load translator...") + + from mainWindow import MainWindow