From 1971de44c2d6fe3f2b54937cf7e00cd9f68eeabf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 6 Oct 2015 17:05:46 +0200 Subject: [PATCH] installer: use custom Qt translations if available --- build/windows/populate_installer_dir.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build/windows/populate_installer_dir.sh b/build/windows/populate_installer_dir.sh index 4e604a529..ecabb9567 100755 --- a/build/windows/populate_installer_dir.sh +++ b/build/windows/populate_installer_dir.sh @@ -73,11 +73,23 @@ function copy_files { cp ${mo} ${tgt_dir}/locale/${language}/LC_MESSAGES/mkvtoolnix.mo done + local -A customized_qt5_translations + local ts + for ts (po/qt/*.ts) { + lang=${${${ts:t}:r}#qt_} + customized_qt5_translations[$lang]=1 + + lrelease -qm ${tgt_dir}/locale/libqt/qt_${lang}.qm ${ts} + } + qt5trdir=${mxe_usr_dir}/qt5/translations for qm (${qt5trdir}/qt_*.qm) { if [[ ${qm} == *qt_help* ]] continue lang=${${${qm:t}:r}#qt_} + + if [[ -n ${customized_qt5_translations[${lang}]} ]] continue + baseqm=${qt5trdir}/qtbase_${lang}.qm if [[ -f $baseqm ]] qm=$baseqm cp ${qm} ${tgt_dir}/locale/libqt/qt_${lang}.qm