c++ - How to integrate QT internationalization to CMake? -
greetings all,
i trying use qt internationalization cmake. have configured cmake file follows :
#internalization - should generate core_jp.ts ? set(rinzo_core_translations i18n/core_jp.ts ) #these source files in project set(files_to_translate ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) qt4_create_translation(qm_files ${files_to_translate} ${rinzo_core_translations}) qt4_add_translation(qm ${rinzo_core_translations}) but doesnt genereate ts nor qm files.
my questions -
1.does cmake(by using qt tools) generate ts files automatically extracting "tr()" methods source ? (that means dont have create ts file , above i18n/core_jp.ts genereated automatically)
2.what exacly qm files ?
thanks in advance
in cmake documentation see qt4_create_translation , qt4_add_translation macros.
so should followings:
set(lang_files example.ts ) ... qt4_create_translation(langsrcs ${lang_files}) ... add_executable(project_name ... others sources ... ${langsrcs})
Comments
Post a Comment