X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=po%2FCMakeLists.txt;h=b7b3287f4c56e3b26ba8541ff50cb1e6060cd78a;hp=59c23970b16c194fc3608380e0703e56d2cd9b35;hb=86bd6b1ffb870e65af6d830a2ea16471c348ed5a;hpb=35b7f86e8ce903cf49e2db1cd0503a3142f76278 diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 59c23970..b7b3287f 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -2,19 +2,18 @@ # The LINGUAS variable can be used to limit that set if(QT_LCONVERT_EXECUTABLE) - # We always include quassel.po - generate_qm(QM quassel) - set(qm_files ${QM}) - # get environment variable for translations set(LINGUAS "$ENV{LINGUAS}") string(REGEX REPLACE "[ \t]+" \; output "${LINGUAS}") # Find more languages - file(GLOB avail_pofiles quassel_*.po qt_*.po) + # We support xx.po and xx_YY.po, and additionally translations for qt using qt_xx.po or qt_xx_YY.po + file(GLOB avail_pofiles *.po) foreach(PO_FILE ${avail_pofiles}) get_filename_component(basename ${PO_FILE} NAME_WE) - string(REGEX REPLACE "q[^_]+_([a-zA-Z]+)(_.+)?$" "\\1" lang ${basename}) - # test if we want this + # CMake can't use MATCH to get the second catch... + string(REGEX REPLACE "(qt_)?([a-zA-Z]+)(_.+)?$" "\\2" lang ${basename}) + + # test if we want this language set(flg 1) if(LINGUAS) string(REGEX MATCH "${lang}" flg ${LINGUAS})