2023-01-01 19:49:48 +00:00
|
|
|
set(LINGUAS
|
2014-12-01 19:55:22 +00:00
|
|
|
an
|
|
|
|
ar
|
|
|
|
ast
|
|
|
|
az
|
|
|
|
be
|
|
|
|
bg
|
|
|
|
bn
|
|
|
|
br
|
|
|
|
bs
|
|
|
|
ca
|
|
|
|
ca@valencia
|
|
|
|
ceb
|
|
|
|
ckb
|
|
|
|
cs
|
2017-01-26 18:59:56 +00:00
|
|
|
cy
|
2014-12-01 19:55:22 +00:00
|
|
|
da
|
|
|
|
de
|
|
|
|
el
|
|
|
|
en_AU
|
|
|
|
en_CA
|
|
|
|
en_GB
|
|
|
|
eo
|
|
|
|
es
|
|
|
|
et
|
|
|
|
eu
|
|
|
|
fa
|
|
|
|
fi
|
|
|
|
fil
|
|
|
|
fo
|
|
|
|
fr
|
2016-09-27 20:09:15 +00:00
|
|
|
fr_CA
|
2014-12-01 19:55:22 +00:00
|
|
|
ga
|
|
|
|
gl
|
|
|
|
gv
|
|
|
|
he
|
|
|
|
hi
|
|
|
|
hr
|
|
|
|
hu
|
|
|
|
hy
|
|
|
|
ia
|
|
|
|
id
|
|
|
|
is
|
|
|
|
it
|
|
|
|
ja
|
2016-09-27 20:09:15 +00:00
|
|
|
jbo
|
2014-12-01 19:55:22 +00:00
|
|
|
ka
|
|
|
|
kk
|
|
|
|
ko
|
|
|
|
ku
|
|
|
|
ky
|
|
|
|
li
|
|
|
|
lt
|
|
|
|
lv
|
|
|
|
mk
|
|
|
|
ml
|
|
|
|
mr
|
|
|
|
ms
|
|
|
|
mt
|
|
|
|
nb
|
|
|
|
nl
|
|
|
|
nn
|
|
|
|
oc
|
|
|
|
pl
|
|
|
|
pt
|
|
|
|
pt_BR
|
2019-03-13 20:35:16 +00:00
|
|
|
pt_PT
|
2014-12-01 19:55:22 +00:00
|
|
|
ro
|
|
|
|
ru
|
|
|
|
si
|
|
|
|
sk
|
|
|
|
sl
|
|
|
|
sq
|
|
|
|
sr
|
|
|
|
sv
|
2017-05-02 19:30:20 +00:00
|
|
|
ta
|
2014-12-01 19:55:22 +00:00
|
|
|
te
|
|
|
|
th
|
|
|
|
tr
|
|
|
|
ug
|
|
|
|
uk
|
2017-05-02 19:30:20 +00:00
|
|
|
ur
|
2014-12-01 19:55:22 +00:00
|
|
|
uz
|
|
|
|
vi
|
|
|
|
zh_CN
|
2016-09-27 20:09:15 +00:00
|
|
|
zh_HK
|
2023-01-01 19:49:48 +00:00
|
|
|
zh_TW)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
|
|
|
set(GETTEXT_PACKAGE ${TR_NAME}-gtk)
|
|
|
|
|
|
|
|
if(ENABLE_NLS)
|
2023-01-01 19:49:48 +00:00
|
|
|
set(ENABLED_LINGUAS ${LINGUAS})
|
2014-12-01 19:55:22 +00:00
|
|
|
else()
|
2023-01-01 19:49:48 +00:00
|
|
|
set(ENABLED_LINGUAS)
|
2014-12-01 19:55:22 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
set(MO_FILES)
|
|
|
|
foreach(LANG ${ENABLED_LINGUAS})
|
2014-12-01 19:55:22 +00:00
|
|
|
set(msgfmt_INPUT_FILE ${LANG}.po)
|
|
|
|
set(msgfmt_OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${GETTEXT_PACKAGE}-${LANG}.mo)
|
|
|
|
|
|
|
|
add_custom_command(
|
2023-01-01 19:49:48 +00:00
|
|
|
OUTPUT ${msgfmt_OUTPUT_FILE}
|
|
|
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --output-file=${msgfmt_OUTPUT_FILE} ${msgfmt_INPUT_FILE}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS ${msgfmt_INPUT_FILE})
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
list(APPEND MO_FILES ${msgfmt_OUTPUT_FILE})
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
install(
|
|
|
|
FILES ${msgfmt_OUTPUT_FILE}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES/
|
|
|
|
RENAME ${GETTEXT_PACKAGE}.mo)
|
2014-12-01 19:55:22 +00:00
|
|
|
endforeach()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
if(MO_FILES)
|
|
|
|
add_custom_target(${GETTEXT_PACKAGE}-po
|
|
|
|
ALL
|
|
|
|
DEPENDS ${MO_FILES})
|
2014-12-01 19:55:22 +00:00
|
|
|
endif()
|