diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-11 10:21:11 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-11 10:21:11 (GMT) |
commit | 649e65519bef38948a818f282e3022d034dc80a5 (patch) | |
tree | 9f4b1de9322e304efd003a1f8c03047327732557 /mkspecs/common | |
parent | bb7b62f3cb7aca178a9e5e65263d0a4a8d40829c (diff) | |
parent | fcdf5a5471b7cf1d2bc72855ed1f627c8d6f4fc4 (diff) | |
download | Qt-649e65519bef38948a818f282e3022d034dc80a5.zip Qt-649e65519bef38948a818f282e3022d034dc80a5.tar.gz Qt-649e65519bef38948a818f282e3022d034dc80a5.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
mkspecs/common/symbian/symbian.conf
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'mkspecs/common')
-rw-r--r-- | mkspecs/common/symbian/symbian.conf | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 63db511..e3813a4 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -230,16 +230,41 @@ defineReplace(symbianRemoveSpecialCharacters) { # Determines translations that are Symbian supported defineTest(matchSymbianLanguages) { + # Qt language codes for which we need to parse .ts file SYMBIAN_MATCHED_LANGUAGES = + # List of translation files for matched languages SYMBIAN_MATCHED_TRANSLATIONS = + # List of Qt language codes for which we have no mapped Symbian code but we have a fallback code + # and therefore need to generate a mapping for in localize_deployment.prf. + # The fallback code means plain language code for languages that have both language and country codes. + # E.g. the fallback code for language "zh_CN" would be "zh". + SYMBIAN_UNMAPPED_LANGUAGES = + # List of handled Qt language codes to avoid duplicate Symbian language codes in case both + # unmapped language+country combination and its fallback code, or multiple unmapped language+country + # combinations that have same fallback code are included. + HANDLED_LANGUAGES = # Cannot parse .ts file for language here, so detect it from filename. # Allow two and three character language and country codes. for(translation, TRANSLATIONS) { language = $$replace(translation, "^(.*/)?[^/]+_(([^_]{2,3}_)?[^_]{2,3})\\.ts$", \\2) - contains(SYMBIAN_SUPPORTED_LANGUAGES, $$language) { - SYMBIAN_MATCHED_LANGUAGES += $$language - SYMBIAN_MATCHED_TRANSLATIONS += $$_PRO_FILE_PWD_/$$translation + !contains(HANDLED_LANGUAGES, $$language) { + HANDLED_LANGUAGES += $$language + contains(SYMBIAN_SUPPORTED_LANGUAGES, $$language) { + SYMBIAN_MATCHED_LANGUAGES += $$language + SYMBIAN_MATCHED_TRANSLATIONS += $$_PRO_FILE_PWD_/$$translation + } else { + # No direct mapping for specified language found. Check if a fallback language code can be used. + strippedLanguage = $$replace(language, "_.*$",) + contains(SYMBIAN_SUPPORTED_LANGUAGES, $$strippedLanguage):!contains(HANDLED_LANGUAGES, $$strippedLanguage) { + HANDLED_LANGUAGES += $$strippedLanguage + SYMBIAN_UNMAPPED_LANGUAGES += $$language + SYMBIAN_MATCHED_LANGUAGES += $$language + SYMBIAN_MATCHED_TRANSLATIONS += $$translation + SYMBIAN_LANGUAGE_FALLBACK.$$language = $$strippedLanguage + export(SYMBIAN_LANGUAGE_FALLBACK.$$language) + } + } } } @@ -247,6 +272,7 @@ defineTest(matchSymbianLanguages) { export(SYMBIAN_MATCHED_LANGUAGES) export(SYMBIAN_MATCHED_TRANSLATIONS) + export(SYMBIAN_UNMAPPED_LANGUAGES) } # Symbian pkg files that define multiple languages require a language specific string to be |