mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-10 17:59:02 +00:00
Added core translation to qt.
This commit is contained in:
parent
42cff20710
commit
99daf5b7b7
4
build.py
4
build.py
@ -17,7 +17,7 @@ from distutils.extension import Extension
|
|||||||
|
|
||||||
from hscommon import sphinxgen
|
from hscommon import sphinxgen
|
||||||
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, ensure_empty_folder,
|
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):
|
def build_cocoa(edition, dev):
|
||||||
build_all_cocoa_locs('cocoalib')
|
build_all_cocoa_locs('cocoalib')
|
||||||
@ -76,6 +76,8 @@ def build_cocoa(edition, dev):
|
|||||||
open('run.py', 'wt').write(run_contents)
|
open('run.py', 'wt').write(run_contents)
|
||||||
|
|
||||||
def build_qt(edition, dev):
|
def build_qt(edition, dev):
|
||||||
|
print("Building .ts files")
|
||||||
|
build_all_qt_locs(op.join('qt', 'lang'))
|
||||||
print("Building Qt stuff")
|
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_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")
|
print("Creating the run.py file")
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource>
|
<qresource>
|
||||||
|
<file alias="fr.qm">../lang/fr.qm</file>
|
||||||
|
<file alias="qt_fr.qm">../lang/qt_fr.qm</file>
|
||||||
<file alias="logo_pe">../../images/dgpe_logo_32.png</file>
|
<file alias="logo_pe">../../images/dgpe_logo_32.png</file>
|
||||||
<file alias="logo_pe_big">../../images/dgpe_logo_128.png</file>
|
<file alias="logo_pe_big">../../images/dgpe_logo_128.png</file>
|
||||||
<file alias="logo_me">../../images/dgme_logo_32.png</file>
|
<file alias="logo_me">../../images/dgme_logo_32.png</file>
|
||||||
|
BIN
qt/lang/fr.qm
Normal file
BIN
qt/lang/fr.qm
Normal file
Binary file not shown.
111
qt/lang/fr.ts
Normal file
111
qt/lang/fr.ts
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.0" language="fr_FR">
|
||||||
|
<!-- ******** Core ******** -->
|
||||||
|
<context>
|
||||||
|
<name>core</name>
|
||||||
|
<message>
|
||||||
|
<source>Collecting files to scan</source>
|
||||||
|
<translation>Collecte des fichiers à scanner</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%s (%d discarded)</source>
|
||||||
|
<translation>%s (%d hors-groupe)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Scanning for duplicates</source>
|
||||||
|
<translation>Scan de doublons en cours</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Loading</source>
|
||||||
|
<translation>Chargement en cours</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Moving</source>
|
||||||
|
<translation>Déplacement en cours</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Copying</source>
|
||||||
|
<translation>Copie en cours</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Sending to Trash</source>
|
||||||
|
<translation>Envoi vers corbeille</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>0 matches found</source>
|
||||||
|
<translation>0 paires trouvées</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%d matches found</source>
|
||||||
|
<translation>%d paires trouvées</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Read size of %d/%d files</source>
|
||||||
|
<translation>Lu la taille de %d/%d fichiers</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Grouped %d/%d matches</source>
|
||||||
|
<translation>%d/%d paires groupées</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%d / %d (%s / %s) duplicates marked.</source>
|
||||||
|
<translation>%d / %d (%s / %s) doublons marqués.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> filter: %s</source>
|
||||||
|
<translation> filtre: %s</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Read metadata of %d/%d files</source>
|
||||||
|
<translation>Lu les métadonnées de %d/%d fichiers</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Removing false matches</source>
|
||||||
|
<translation>Retrait des paires invalides</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Processed %d/%d matches against the ignore list</source>
|
||||||
|
<translation>Vérification de %d/%d paires dans la ignore list</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Doing group prioritization</source>
|
||||||
|
<translation>Prioritization des groupes</translation>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message>
|
||||||
|
<source>Analyzed %d/%d pictures</source>
|
||||||
|
<translation>Analyzé %d/%d images</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Preparing for matching</source>
|
||||||
|
<translation>Préparation pour la comparaison</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Matched %d/%d pictures</source>
|
||||||
|
<translation>Comparé %d/%d images</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Verified %d/%d matches</source>
|
||||||
|
<translation>Vérifié %d/%d paires</translation>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message>
|
||||||
|
<source>Removing dead tracks from your iTunes Library</source>
|
||||||
|
<translation>Retrait des tracks mortes de votre librairie iTunes</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Scanning the iTunes Library</source>
|
||||||
|
<translation>Scan de la librairie iTunes en cours</translation>
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message>
|
||||||
|
<source>Probing iPhoto. Don't touch it during the operation!</source>
|
||||||
|
<translation>Communication avec iPhoto en cours. N'y touchez pas!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Sending dupes to the Trash</source>
|
||||||
|
<translation>Envoi de doublons à la corbeille en cours</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
BIN
qt/lang/qt_fr.qm
Normal file
BIN
qt/lang/qt_fr.qm
Normal file
Binary file not shown.
@ -9,18 +9,24 @@ import sys
|
|||||||
import sip
|
import sip
|
||||||
sip.setapi('QVariant', 1)
|
sip.setapi('QVariant', 1)
|
||||||
|
|
||||||
from PyQt4.QtCore import QCoreApplication
|
from PyQt4.QtCore import QCoreApplication, QSettings
|
||||||
from PyQt4.QtGui import QApplication, QIcon, QPixmap
|
from PyQt4.QtGui import QApplication, QIcon, QPixmap
|
||||||
|
|
||||||
|
from hscommon.trans import install_qt_trans
|
||||||
from qtlib.error_report_dialog import install_excepthook
|
from qtlib.error_report_dialog import install_excepthook
|
||||||
from qt.base import dg_rc
|
from qt.base import dg_rc
|
||||||
from qt.{{edition}}.app import DupeGuru
|
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
import qt.base.cxfreeze_fix
|
import qt.base.cxfreeze_fix
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = QApplication(sys.argv)
|
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))))
|
app.setWindowIcon(QIcon(QPixmap(":/{0}".format(DupeGuru.LOGO_NAME))))
|
||||||
QCoreApplication.setOrganizationName('Hardcoded Software')
|
QCoreApplication.setOrganizationName('Hardcoded Software')
|
||||||
QCoreApplication.setApplicationName(DupeGuru.NAME)
|
QCoreApplication.setApplicationName(DupeGuru.NAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user