diff options
author | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-04-05 11:35:19 (GMT) |
---|---|---|
committer | Guoqing Zhang <guoqing.zhang@nokia.com> | 2011-04-05 11:35:19 (GMT) |
commit | 712e37783210eb8d161b26f090cc240394a1b730 (patch) | |
tree | 16c147a6d92f7d6b4270004308fe0e2fc9e3efed | |
parent | bb5bf52e3d8660ee15aec9e959730e265b81eda4 (diff) | |
download | Qt-712e37783210eb8d161b26f090cc240394a1b730.zip Qt-712e37783210eb8d161b26f090cc240394a1b730.tar.gz Qt-712e37783210eb8d161b26f090cc240394a1b730.tar.bz2 |
Optimize loc.prf for localization
Task-number:
Reviewed-by: Miikka Heikkinen
-rw-r--r-- | config.profiles/symbian/loc.prf | 52 | ||||
-rw-r--r-- | config.profiles/symbian/translations_symbian/translations.pro | 12 |
2 files changed, 36 insertions, 28 deletions
diff --git a/config.profiles/symbian/loc.prf b/config.profiles/symbian/loc.prf index 9973903..dd0644b 100644 --- a/config.profiles/symbian/loc.prf +++ b/config.profiles/symbian/loc.prf @@ -1,25 +1,41 @@ +CONFIG += localize_deployment qtPrepareTool(LRELEASE, lrelease) -loc.CONFIG = no_link -loc.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} -loc.output = $${EPOCROOT}epoc32/data/z/resource/qt/translations/${QMAKE_FILE_BASE}.qm -loc.input = TRANSLATIONS -loc.variable_out = PRE_TARGETDEPS +isEmpty(SYMBIANTRANSLATIONSFILES): SYMBIANTRANSLATIONSFILES = $$symbianRemoveSpecialCharacters($$basename(TARGET)) +isEmpty(SYMBIANTRANSLATIONS):exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/symbian/symbian_i18n.prf) { + load($${EPOCROOT}epoc32/tools/qt/mkspecs/features/symbian/symbian_i18n.prf) +} +isEmpty(SYMBIANTRANSLATIONDIR): SYMBIANTRANSLATIONDIR = $${EPOCROOT}epoc32/data/z/resource/qt/translations +isEmpty(SYMBIANWINSCWUDEBTRANSLATIONDIR): SYMBIANWINSCWUDEBTRANSLATIONDIR = $${EPOCROOT}epoc32/release/winscw/udeb/z/resource/qt/translations +isEmpty(SYMBIANWINSCWURELTRANSLATIONDIR): SYMBIANWINSCWURELTRANSLATIONDIR = $${EPOCROOT}epoc32/release/winscw/urel/z/resource/qt/translations + +for(FILE, SYMBIANTRANSLATIONSFILES) { + for(LANGID, SYMBIANTRANSLATIONS) { + TRANSLATIONS += $${EPOCROOT}epoc32/include/platform/qt/translations/$${FILE}_$${LANGID}.ts + } +} -loc_winscwudeb.CONFIG = no_link -loc_winscwudeb.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} -loc_winscwudeb.output = $${EPOCROOT}epoc32/release/winscw/udeb/z/resource/qt/translations/${QMAKE_FILE_BASE}.qm -loc_winscwudeb.input = TRANSLATIONS -loc_winscwudeb.variable_out = PRE_TARGETDEPS +contains(CONFIG, loc_source_string) { + LRELEASE_PARAMS = -qm +} else { + LRELEASE_PARAMS = -idbased -qm +} + +loc.CONFIG = no_link target_predeps +loc.commands = $$LRELEASE ${QMAKE_FILE_IN} $$LRELEASE_PARAMS ${QMAKE_FILE_OUT} +loc.input = TRANSLATIONS +loc.output = $$SYMBIANTRANSLATIONDIR/${QMAKE_FILE_BASE}.qm +loc.variable_out = GENERATED_QM_FILES -loc_winscwurel.CONFIG = no_link -loc_winscwurel.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} -loc_winscwurel.output = $${EPOCROOT}epoc32/release/winscw/urel/z/resource/qt/translations/${QMAKE_FILE_BASE}.qm -loc_winscwurel.input = TRANSLATIONS -loc_winscwurel.variable_out = PRE_TARGETDEPS +copy_qm_winscw_udeb.CONFIG = no_link target_predeps +copy_qm_winscw_udeb.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} +copy_qm_winscw_udeb.input = GENERATED_QM_FILES +copy_qm_winscw_udeb.output = $$SYMBIANWINSCWUDEBTRANSLATIONDIR/${QMAKE_FILE_BASE}.qm -QMAKE_EXTRA_COMPILERS += loc -QMAKE_EXTRA_COMPILERS += loc_winscwudeb -QMAKE_EXTRA_COMPILERS += loc_winscwurel +copy_qm_winscw_urel.CONFIG = $$copy_qm_winscw_udeb.CONFIG +copy_qm_winscw_urel.commands = $$copy_qm_winscw_udeb.commands +copy_qm_winscw_urel.input = $$copy_qm_winscw_udeb.input +copy_qm_winscw_urel.output = $$SYMBIANWINSCWURELTRANSLATIONDIR/${QMAKE_FILE_BASE}.qm +QMAKE_EXTRA_COMPILERS += loc copy_qm_winscw_udeb copy_qm_winscw_urel diff --git a/config.profiles/symbian/translations_symbian/translations.pro b/config.profiles/symbian/translations_symbian/translations.pro index f304c1b..832af21 100644 --- a/config.profiles/symbian/translations_symbian/translations.pro +++ b/config.profiles/symbian/translations_symbian/translations.pro @@ -1,16 +1,8 @@ TEMPLATE = subdirs - symbian: { SYMBIANTRANSLATIONSFILES = qt SYMBIANTRANSLATIONS = ur fa ar he fr pl ru zh_cn zh_tw cs da de es gl hu ja pt sk sl sv uk - -CONFIG = loc - -for( FILE, SYMBIANTRANSLATIONSFILES ) { - for( LANGID, SYMBIANTRANSLATIONS ) { - TRANSLATIONS += $${EPOCROOT}epoc32/include/platform/qt/translations/$${FILE}_$${LANGID}.ts - } -} - +CONFIG = loc_source_string +load(loc.prf) }
\ No newline at end of file |