diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index c6cb40b8..7003f481 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -185,6 +185,12 @@ macx { TRANSLATION_fr.path = "$$RESOURCES_DIR/fr.lproj" QMAKE_BUNDLE_DATA += TRANSLATION_fr } + exists(resources/i18n/sankore_fr_CH.qm) { + TRANSLATION_fr.files = resources/i18n/sankore_fr_CH.qm \ + resources/i18n/Localizable.strings + TRANSLATION_fr.path = "$$RESOURCES_DIR/fr.lproj" + QMAKE_BUNDLE_DATA += TRANSLATION_fr_CH + } exists(resources/i18n/sankore_de.qm) { TRANSLATION_de.files = resources/i18n/sankore_de.qm \ resources/i18n/Localizable.strings @@ -331,6 +337,7 @@ RESOURCES += resources/sankore.qrc TRANSLATIONS = resources/i18n/sankore_en.ts \ resources/i18n/sankore_en_UK.ts \ resources/i18n/sankore_fr.ts \ + resources/i18n/sankore_fr_CH.ts \ resources/i18n/sankore_de.ts \ resources/i18n/sankore_nl.ts \ resources/i18n/sankore_es.ts \ diff --git a/src/frameworks/UBPlatformUtils_win.cpp b/src/frameworks/UBPlatformUtils_win.cpp index 1e965a97..294a9117 100644 --- a/src/frameworks/UBPlatformUtils_win.cpp +++ b/src/frameworks/UBPlatformUtils_win.cpp @@ -1,17 +1,17 @@ -/* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "UBPlatformUtils.h" @@ -62,9 +62,7 @@ void UBPlatformUtils::fadeDisplayIn() QString UBPlatformUtils::preferredTranslation() { QString localPreferredLanguage = preferredLanguage(); - if (localPreferredLanguage == "fr_CH") { - localPreferredLanguage = "fr"; - } + QString qmPath = applicationResourcesDirectory() + "/" + "i18n" + "/" + QString("sankore_") + localPreferredLanguage + ".qm"; qDebug() << "Looking for translation:" << qmPath;