diff --git a/qbs/imports/VToolApp.qbs b/qbs/imports/VToolApp.qbs index ac51dbbea..97f87fc0e 100644 --- a/qbs/imports/VToolApp.qbs +++ b/qbs/imports/VToolApp.qbs @@ -3,6 +3,7 @@ import qbs.FileInfo VApp { Depends { name: "freedesktop2" } Depends { name: "tenv" } + Depends { name: "i18nconfig"; } version: "0.7.52" install: true @@ -42,37 +43,13 @@ VApp { files: { var files = []; - var locales = [ - "uk_UA", - "de_DE", - "cs_CZ", - "he_IL", - "fr_FR", - "it_IT", - "nl_NL", - "id_ID", - "es_ES", - "fi_FI", - "en_US", - "en_CA", - "en_IN", - "ro_RO", - "zh_CN", - "pt_BR", - "el_GR", - "pl_PL" - ]; + var locales = i18nconfig.translationLocales; for (var i = 0; i < locales.length; i++) { files.push("valentina_" + locales[i] + ".ts"); } - var pmSystems = [ - "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", - "p16", "p17", "p18", "p19", "p20", "p21", "p22", "p23", "p24", "p25", "p26", "p27", "p28", "p29", - "p30", "p31", "p32", "p33", "p34", "p35", "p36", "p37", "p38", "p39", "p40", "p41", "p42", "p43", - "p44", "p45", "p46", "p47", "p48", "p49", "p50", "p51", "p52", "p53", "p54", "p998" - ] + var pmSystems = i18nconfig.pmSystems; for (var i = 0; i < pmSystems.length; i++) { files.push("measurements_" + pmSystems[i] + ".ts"); diff --git a/qbs/modules/i18nconfig/i18nconfig.qbs b/qbs/modules/i18nconfig/i18nconfig.qbs new file mode 100644 index 000000000..6fd15b2f4 --- /dev/null +++ b/qbs/modules/i18nconfig/i18nconfig.qbs @@ -0,0 +1,68 @@ +Module { + readonly property stringList translationLocales: [ + "uk_UA", + "de_DE", + "cs_CZ", + "he_IL", + "fr_FR", + "it_IT", + "nl_NL", + "id_ID", + "es_ES", + "fi_FI", + "en_US", + "en_CA", + "en_IN", + "ro_RO", + "zh_CN", + "pt_BR", + "el_GR", + "pl_PL" + ] + + property bool limitDeploymentOfQtTranslations: true + + readonly property stringList qtTranslationLocales: [ + "uk", + "de", + "cs", + "he", + "fr", + "it", +// "nl", Not supported by Qt +// "id", Not supported by Qt + "es", + "fi", + "en", +// "ro", Not supported by Qt + "zh_CN", + "pt", +// "el", Not supported by Qt + "pl", +// "zh_TW", Not supported by Valentina +// "ar", Not supported by Valentina +// "bg", Not supported by Valentina +// "ca", Not supported by Valentina +// "da", Not supported by Valentina +// "fa", Not supported by Valentina +// "gd", Not supported by Valentina +// "gl", Not supported by Valentina +// "hu", Not supported by Valentina +// "ja", Not supported by Valentina +// "ko", Not supported by Valentina +// "lt", Not supported by Valentina +// "lv", Not supported by Valentina +// "ru", Not supported by Valentina +// "sk", Not supported by Valentina +// "sl", Not supported by Valentina +// "sv", Not supported by Valentina +// "tr", Not supported by Valentina + ] + + readonly property stringList pmSystems: [ + "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", + "p16", "p17", "p18", "p19", "p20", "p21", "p22", "p23", "p24", "p25", "p26", "p27", "p28", "p29", + "p30", "p31", "p32", "p33", "p34", "p35", "p36", "p37", "p38", "p39", "p40", "p41", "p42", "p43", + "p44", "p45", "p46", "p47", "p48", "p49", "p50", "p51", "p52", "p53", "p54", "p998" + ] +} diff --git a/share/translations/measurements.qbs b/share/translations/measurements.qbs index 40a163ee9..0ad3e85d7 100644 --- a/share/translations/measurements.qbs +++ b/share/translations/measurements.qbs @@ -2,6 +2,7 @@ import qbs.FileInfo Product { Depends { name: "i18n" } + Depends { name: "i18nconfig" } name: "MTranslations" type: "ts" @@ -30,33 +31,8 @@ Product { files: { var files = []; - var locales = [ - "uk_UA", - "de_DE", - "cs_CZ", - "he_IL", - "fr_FR", - "it_IT", - "nl_NL", - "id_ID", - "es_ES", - "fi_FI", - "en_US", - "en_CA", - "en_IN", - "ro_RO", - "zh_CN", - "pt_BR", - "el_GR", - "pl_PL" - ]; - - var pmSystems = [ - "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", - "p16", "p17", "p18", "p19", "p20", "p21", "p22", "p23", "p24", "p25", "p26", "p27", "p28", "p29", - "p30", "p31", "p32", "p33", "p34", "p35", "p36", "p37", "p38", "p39", "p40", "p41", "p42", "p43", - "p44", "p45", "p46", "p47", "p48", "p49", "p50", "p51", "p52", "p53", "p54", "p998" - ] + var locales = i18nconfig.translationLocales; + var pmSystems = i18nconfig.pmSystems; for (var i = 0; i < pmSystems.length; i++) { files.push("measurements_" + pmSystems[i] + ".ts"); diff --git a/share/translations/translations.qbs b/share/translations/translations.qbs index 792a7fdc2..e642edb43 100644 --- a/share/translations/translations.qbs +++ b/share/translations/translations.qbs @@ -2,6 +2,7 @@ import qbs.FileInfo Product { Depends { name: "i18n" } + Depends { name: "i18nconfig" } name: "Translations" type: "ts" @@ -54,26 +55,7 @@ Product { files: { var files = []; - var locales = [ - "uk_UA", - "de_DE", - "cs_CZ", - "he_IL", - "fr_FR", - "it_IT", - "nl_NL", - "id_ID", - "es_ES", - "fi_FI", - "en_US", - "en_CA", - "en_IN", - "ro_RO", - "zh_CN", - "pt_BR", - "el_GR", - "pl_PL" - ]; + var locales = i18nconfig.translationLocales; files.push("valentina.ts");