diff --git a/build.py b/build.py index b3b145fa..724f85c9 100644 --- a/build.py +++ b/build.py @@ -23,7 +23,7 @@ from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, file build_cocoalib_xibless, fix_qt_resource_file, build_cocoa_ext, copy_embeddable_python_dylib, collect_stdlib_dependencies) from hscommon import loc -from hscommon.plat import ISOSX +from hscommon.plat import ISOSX, ISLINUX from hscommon.util import ensure_folder, delete_files_with_pattern def parse_args(): @@ -185,6 +185,15 @@ def build_localizations(ui, edition): if op.exists(locale_dest): shutil.rmtree(locale_dest) shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot')) + if ui == 'qt' and not ISLINUX: + print("Copying qt_*.qm files into the 'locale' folder") + from PyQt4.QtCore import QLibraryInfo + trfolder = QLibraryInfo.location(QLibraryInfo.TranslationsPath) + for lang in loc.get_langs('locale'): + qmname = 'qt_%s.qm' % lang + src = op.join(trfolder, qmname) + if op.exists(src): + copy(src, op.join('build', 'locale', qmname)) def build_updatepot(): if ISOSX: diff --git a/qt/base/dg.qrc b/qt/base/dg.qrc index 121db2cc..f506b64a 100644 --- a/qt/base/dg.qrc +++ b/qt/base/dg.qrc @@ -1,8 +1,5 @@ - ../lang/qt_fr.qm - ../lang/qt_de.qm - ../lang/qt_zh_CN.qm ../../images/dgpe_logo_32.png ../../images/dgpe_logo_128.png ../../images/dgme_logo_32.png diff --git a/qt/lang/qt_de.qm b/qt/lang/qt_de.qm deleted file mode 100644 index 66e14a06..00000000 Binary files a/qt/lang/qt_de.qm and /dev/null differ diff --git a/qt/lang/qt_fr.qm b/qt/lang/qt_fr.qm deleted file mode 100644 index 8d3c1b08..00000000 Binary files a/qt/lang/qt_fr.qm and /dev/null differ diff --git a/qt/lang/qt_zh_CN.qm b/qt/lang/qt_zh_CN.qm deleted file mode 100644 index 623b8e33..00000000 Binary files a/qt/lang/qt_zh_CN.qm and /dev/null differ