summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-03-11 10:21:11 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-03-11 10:21:11 (GMT)
commit649e65519bef38948a818f282e3022d034dc80a5 (patch)
tree9f4b1de9322e304efd003a1f8c03047327732557 /mkspecs
parentbb7b62f3cb7aca178a9e5e65263d0a4a8d40829c (diff)
parentfcdf5a5471b7cf1d2bc72855ed1f627c8d6f4fc4 (diff)
downloadQt-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')
-rw-r--r--mkspecs/common/symbian/symbian.conf32
-rw-r--r--mkspecs/features/symbian/localize_deployment.prf9
-rw-r--r--mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm2
3 files changed, 39 insertions, 4 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
diff --git a/mkspecs/features/symbian/localize_deployment.prf b/mkspecs/features/symbian/localize_deployment.prf
index 26a254b..185c713 100644
--- a/mkspecs/features/symbian/localize_deployment.prf
+++ b/mkspecs/features/symbian/localize_deployment.prf
@@ -101,6 +101,15 @@ isEmpty(SYMBIAN_MATCHED_LANGUAGES) {
matchSymbianLanguages()
}
+# If there are translations that do not have Symbian language code defined for that exact
+# language + country combination, but have Symbian language code defined for just the language,
+# map the language + country combination to the same value as the plain language.
+for(language, SYMBIAN_UNMAPPED_LANGUAGES) {
+ languageVar = SYMBIAN_LANG.$${language}
+ fallbackLanguageVar = SYMBIAN_LANG.$$eval(SYMBIAN_LANGUAGE_FALLBACK.$$language)
+ $$languageVar = $$eval($$fallbackLanguageVar)
+}
+
!isEmpty(SYMBIAN_MATCHED_TRANSLATIONS) {
# Generate dependencies to .ts files for pkg files
template_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS
diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
index fe35e6e..c9a88fc 100644
--- a/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
+++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_clean.flm
@@ -13,6 +13,6 @@ SINGLETON:=$(call sanitise,QMAKE_CLEAN_SINGLETON_$(EXTENSION_ROOT))
ifeq ($($(SINGLETON)),)
# Prevent duplicate targets from being created
$(SINGLETON):=1
-$(eval $(call GenerateStandardCleanTarget,$(CLEAN_FILES),''))
+$(eval $(call GenerateStandardCleanTarget,$(wildcard $(patsubst "%",%,$(CLEAN_FILES)))))
endif