diff --git a/build.py b/build.py index ca1bd8e8..2f6cc279 100644 --- a/build.py +++ b/build.py @@ -17,7 +17,7 @@ from distutils.extension import Extension from hscommon import sphinxgen from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, ensure_empty_folder, - filereplace, get_module_version, build_all_cocoa_locs) + filereplace, get_module_version, build_all_cocoa_locs, build_all_qt_locs) def build_cocoa(edition, dev): build_all_cocoa_locs('cocoalib') @@ -76,6 +76,8 @@ def build_cocoa(edition, dev): open('run.py', 'wt').write(run_contents) def build_qt(edition, dev): + print("Building .ts files") + build_all_qt_locs(op.join('qt', 'lang')) print("Building Qt stuff") print_and_do("pyrcc4 -py3 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py'))) print("Creating the run.py file") diff --git a/qt/base/dg.qrc b/qt/base/dg.qrc index cf5d5507..db460c83 100644 --- a/qt/base/dg.qrc +++ b/qt/base/dg.qrc @@ -1,5 +1,7 @@ + ../lang/fr.qm + ../lang/qt_fr.qm ../../images/dgpe_logo_32.png ../../images/dgpe_logo_128.png ../../images/dgme_logo_32.png diff --git a/qt/lang/fr.qm b/qt/lang/fr.qm new file mode 100644 index 00000000..d4dcd626 Binary files /dev/null and b/qt/lang/fr.qm differ diff --git a/qt/lang/fr.ts b/qt/lang/fr.ts new file mode 100644 index 00000000..097a29d9 --- /dev/null +++ b/qt/lang/fr.ts @@ -0,0 +1,111 @@ + + + + + +core + + Collecting files to scan + Collecte des fichiers à scanner + + + %s (%d discarded) + %s (%d hors-groupe) + + + Scanning for duplicates + Scan de doublons en cours + + + Loading + Chargement en cours + + + Moving + Déplacement en cours + + + Copying + Copie en cours + + + Sending to Trash + Envoi vers corbeille + + + 0 matches found + 0 paires trouvées + + + %d matches found + %d paires trouvées + + + Read size of %d/%d files + Lu la taille de %d/%d fichiers + + + Grouped %d/%d matches + %d/%d paires groupées + + + %d / %d (%s / %s) duplicates marked. + %d / %d (%s / %s) doublons marqués. + + + filter: %s + filtre: %s + + + Read metadata of %d/%d files + Lu les métadonnées de %d/%d fichiers + + + Removing false matches + Retrait des paires invalides + + + Processed %d/%d matches against the ignore list + Vérification de %d/%d paires dans la ignore list + + + Doing group prioritization + Prioritization des groupes + + + + Analyzed %d/%d pictures + Analyzé %d/%d images + + + Preparing for matching + Préparation pour la comparaison + + + Matched %d/%d pictures + Comparé %d/%d images + + + Verified %d/%d matches + Vérifié %d/%d paires + + + + Removing dead tracks from your iTunes Library + Retrait des tracks mortes de votre librairie iTunes + + + Scanning the iTunes Library + Scan de la librairie iTunes en cours + + + + Probing iPhoto. Don't touch it during the operation! + Communication avec iPhoto en cours. N'y touchez pas! + + + Sending dupes to the Trash + Envoi de doublons à la corbeille en cours + + + \ No newline at end of file diff --git a/qt/lang/qt_fr.qm b/qt/lang/qt_fr.qm new file mode 100644 index 00000000..8d3c1b08 Binary files /dev/null and b/qt/lang/qt_fr.qm differ diff --git a/run_template_qt.py b/run_template_qt.py index c521101c..dacc643a 100644 --- a/run_template_qt.py +++ b/run_template_qt.py @@ -9,18 +9,24 @@ import sys import sip sip.setapi('QVariant', 1) -from PyQt4.QtCore import QCoreApplication +from PyQt4.QtCore import QCoreApplication, QSettings from PyQt4.QtGui import QApplication, QIcon, QPixmap +from hscommon.trans import install_qt_trans from qtlib.error_report_dialog import install_excepthook from qt.base import dg_rc -from qt.{{edition}}.app import DupeGuru if sys.platform == 'win32': import qt.base.cxfreeze_fix if __name__ == "__main__": app = QApplication(sys.argv) + settings = QSettings() + lang = settings.value('Language').toString() + install_qt_trans(lang) + # Many strings are translated at import time, so this is why we only import after the translator + # has been installed + from qt.{{edition}}.app import DupeGuru app.setWindowIcon(QIcon(QPixmap(":/{0}".format(DupeGuru.LOGO_NAME)))) QCoreApplication.setOrganizationName('Hardcoded Software') QCoreApplication.setApplicationName(DupeGuru.NAME)