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 0000000..10b544f Binary files /dev/null and b/languages/snowflaQe_fr.qm differ 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