We can't just simply run xgettext twice (once as normal, once with just the contractor file and passing "--desktop" as an arg, since l10n.gnome.org won't pick up the second pass and the contract will remain untranslated. So work around by renaming the contractor file such that it is recognised, then rename it back to normal when translating it. * desktop/geary-attach.contract.in: Renamed to desktop/geary-attach.contract.desktop.in. * desktop/CMakeLists.txt: Undo the rename when translating. * po/CMakeLists.txt, po/Makevars: Add a xgettext keyword for the contractor Description field. * po/POTFILES.in: Chase the file rename.
22 lines
519 B
CMake
22 lines
519 B
CMake
|
|
file(STRINGS "LINGUAS" TRANSLATED)
|
|
|
|
IF (XGETTEXT_FOUND)
|
|
GETTEXT_CREATE_POT(geary.pot
|
|
OPTION
|
|
# XXX Keep these in sync with Makevars
|
|
--from-code=UTF-8
|
|
--add-comments
|
|
--keyword=_
|
|
--keyword=N_
|
|
--keyword=C_:1c,2
|
|
--keyword=NC_:1c,2
|
|
--keyword=g_dngettext:2,3
|
|
--keyword=Description
|
|
)
|
|
GETTEXT_CREATE_TRANSLATIONS(ALL ${TRANSLATED}
|
|
COMMENT "Creating translations."
|
|
)
|
|
ELSE ()
|
|
message(STATUS "xgettext not found")
|
|
ENDIF()
|