Browse Source

Include translation resources with file globbing

This will include all qtbase_*.qm files and only explicitly listed
qt_*.qm files will be included.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
1466c562e5
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 22
      dist/windows/installer.nsi
  2. 28
      dist/windows/uninstaller.nsi
  3. 24
      macxconf.pri
  4. 25
      src/app/CMakeLists.txt

22
dist/windows/installer.nsi vendored

@ -32,27 +32,7 @@ Section $(inst_qbt_req) ;"qBittorrent (required)" @@ -32,27 +32,7 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
File "qbittorrent.exe"
File "qbittorrent.pdb"
File "qt.conf"
File /oname=translations\qtbase_ar.qm "translations\qtbase_ar.qm"
File /oname=translations\qtbase_bg.qm "translations\qtbase_bg.qm"
File /oname=translations\qtbase_ca.qm "translations\qtbase_ca.qm"
File /oname=translations\qtbase_cs.qm "translations\qtbase_cs.qm"
File /oname=translations\qtbase_da.qm "translations\qtbase_da.qm"
File /oname=translations\qtbase_de.qm "translations\qtbase_de.qm"
File /oname=translations\qtbase_es.qm "translations\qtbase_es.qm"
File /oname=translations\qtbase_fi.qm "translations\qtbase_fi.qm"
File /oname=translations\qtbase_fr.qm "translations\qtbase_fr.qm"
File /oname=translations\qtbase_gd.qm "translations\qtbase_gd.qm"
File /oname=translations\qtbase_he.qm "translations\qtbase_he.qm"
File /oname=translations\qtbase_hu.qm "translations\qtbase_hu.qm"
File /oname=translations\qtbase_it.qm "translations\qtbase_it.qm"
File /oname=translations\qtbase_ja.qm "translations\qtbase_ja.qm"
File /oname=translations\qtbase_ko.qm "translations\qtbase_ko.qm"
File /oname=translations\qtbase_lv.qm "translations\qtbase_lv.qm"
File /oname=translations\qtbase_pl.qm "translations\qtbase_pl.qm"
File /oname=translations\qtbase_ru.qm "translations\qtbase_ru.qm"
File /oname=translations\qtbase_sk.qm "translations\qtbase_sk.qm"
File /oname=translations\qtbase_uk.qm "translations\qtbase_uk.qm"
File /oname=translations\qtbase_zh_TW.qm "translations\qtbase_zh_TW.qm"
File /r "qtbase_*.qm" ; omit translations folder path to preserve folder structure
File /oname=translations\qt_fa.qm "translations\qt_fa.qm"
File /oname=translations\qt_gl.qm "translations\qt_gl.qm"
File /oname=translations\qt_lt.qm "translations\qt_lt.qm"

28
dist/windows/uninstaller.nsi vendored

@ -5,34 +5,6 @@ @@ -5,34 +5,6 @@
Delete "$INSTDIR\qbittorrent.exe"
Delete "$INSTDIR\qbittorrent.pdb"
Delete "$INSTDIR\qt.conf"
Delete "$INSTDIR\translations\qtbase_ar.qm"
Delete "$INSTDIR\translations\qtbase_bg.qm"
Delete "$INSTDIR\translations\qtbase_ca.qm"
Delete "$INSTDIR\translations\qtbase_cs.qm"
Delete "$INSTDIR\translations\qtbase_da.qm"
Delete "$INSTDIR\translations\qtbase_de.qm"
Delete "$INSTDIR\translations\qtbase_es.qm"
Delete "$INSTDIR\translations\qtbase_fi.qm"
Delete "$INSTDIR\translations\qtbase_fr.qm"
Delete "$INSTDIR\translations\qtbase_gd.qm"
Delete "$INSTDIR\translations\qtbase_he.qm"
Delete "$INSTDIR\translations\qtbase_hu.qm"
Delete "$INSTDIR\translations\qtbase_it.qm"
Delete "$INSTDIR\translations\qtbase_ja.qm"
Delete "$INSTDIR\translations\qtbase_ko.qm"
Delete "$INSTDIR\translations\qtbase_lv.qm"
Delete "$INSTDIR\translations\qtbase_pl.qm"
Delete "$INSTDIR\translations\qtbase_ru.qm"
Delete "$INSTDIR\translations\qtbase_sk.qm"
Delete "$INSTDIR\translations\qtbase_uk.qm"
Delete "$INSTDIR\translations\qtbase_zh_TW.qm"
Delete "$INSTDIR\translations\qt_fa.qm"
Delete "$INSTDIR\translations\qt_gl.qm"
Delete "$INSTDIR\translations\qt_lt.qm"
Delete "$INSTDIR\translations\qt_pt.qm"
Delete "$INSTDIR\translations\qt_sl.qm"
Delete "$INSTDIR\translations\qt_sv.qm"
Delete "$INSTDIR\translations\qt_zh_CN.qm"
Delete "$INSTDIR\uninst.exe"
; Remove directories used

24
macxconf.pri

@ -21,28 +21,8 @@ qt_conf.files = $$DIST_PATH/qt.conf @@ -21,28 +21,8 @@ qt_conf.files = $$DIST_PATH/qt.conf
QMAKE_BUNDLE_DATA += qt_conf
qt_translations.path = Contents/translations
qt_translations.files = \
$$QT_LANG_PATH/qtbase_ar.qm \
$$QT_LANG_PATH/qtbase_bg.qm \
$$QT_LANG_PATH/qtbase_ca.qm \
$$QT_LANG_PATH/qtbase_cs.qm \
$$QT_LANG_PATH/qtbase_da.qm \
$$QT_LANG_PATH/qtbase_de.qm \
$$QT_LANG_PATH/qtbase_es.qm \
$$QT_LANG_PATH/qtbase_fi.qm \
$$QT_LANG_PATH/qtbase_fr.qm \
$$QT_LANG_PATH/qtbase_gd.qm \
$$QT_LANG_PATH/qtbase_he.qm \
$$QT_LANG_PATH/qtbase_hu.qm \
$$QT_LANG_PATH/qtbase_it.qm \
$$QT_LANG_PATH/qtbase_ja.qm \
$$QT_LANG_PATH/qtbase_ko.qm \
$$QT_LANG_PATH/qtbase_lv.qm \
$$QT_LANG_PATH/qtbase_pl.qm \
$$QT_LANG_PATH/qtbase_ru.qm \
$$QT_LANG_PATH/qtbase_sk.qm \
$$QT_LANG_PATH/qtbase_uk.qm \
$$QT_LANG_PATH/qtbase_zh_TW.qm \
qt_translations.files = $$files($$QT_LANG_PATH/qtbase_*.qm)
qt_translations.files += \
$$QT_LANG_PATH/qt_fa.qm \
$$QT_LANG_PATH/qt_gl.qm \
$$QT_LANG_PATH/qt_lt.qm \

25
src/app/CMakeLists.txt

@ -115,28 +115,9 @@ if (APPLE) @@ -115,28 +115,9 @@ if (APPLE)
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
set(QT_TR_DIR "${qBittorrent_SOURCE_DIR}/dist/qt-translations")
set(QT_TRANSLATIONS
${QT_TR_DIR}/qtbase_ar.qm
${QT_TR_DIR}/qtbase_bg.qm
${QT_TR_DIR}/qtbase_ca.qm
${QT_TR_DIR}/qtbase_cs.qm
${QT_TR_DIR}/qtbase_da.qm
${QT_TR_DIR}/qtbase_de.qm
${QT_TR_DIR}/qtbase_es.qm
${QT_TR_DIR}/qtbase_fi.qm
${QT_TR_DIR}/qtbase_fr.qm
${QT_TR_DIR}/qtbase_gd.qm
${QT_TR_DIR}/qtbase_he.qm
${QT_TR_DIR}/qtbase_hu.qm
${QT_TR_DIR}/qtbase_it.qm
${QT_TR_DIR}/qtbase_ja.qm
${QT_TR_DIR}/qtbase_ko.qm
${QT_TR_DIR}/qtbase_lv.qm
${QT_TR_DIR}/qtbase_pl.qm
${QT_TR_DIR}/qtbase_ru.qm
${QT_TR_DIR}/qtbase_sk.qm
${QT_TR_DIR}/qtbase_uk.qm
${QT_TR_DIR}/qtbase_zh_TW.qm
FILE(GLOB QT_TRANSLATIONS "${QT_TR_DIR}/qtbase_*.qm")
list(APPEND QT_TRANSLATIONS
${QT_TR_DIR}/qt_fa.qm
${QT_TR_DIR}/qt_gl.qm
${QT_TR_DIR}/qt_lt.qm

Loading…
Cancel
Save