1
file (GLOB_RECURSE pofiles ${pobasedir}/${lang}.po)
3
foreach (pofile ${pofiles})
4
get_filename_component(popath ${pofile} PATH)
5
string(REPLACE "${pobasedir}/" "" templatename ${popath})
6
set (mofile ${localebasedir}/${lang}/LC_MESSAGES/${templatename}.mo)
7
find_path(trans ${templatename}.mo ${localebasedir}/${lang}/LC_MESSAGES)
8
if (trans STREQUAL "trans-NOTFOUND")
9
message(FATAL_ERROR "The translation for locale ${lang} is missing for the template ${templatename}. You need to run cmake again to pick up this translation.")
10
endif (trans STREQUAL "trans-NOTFOUND")
11
endforeach (pofile ${pofiles})