meson: add support for generating translation mo files

Meson has handy a handy built-in module for handling gettext called
i18n, this module works a bit differently than our autotools build does,
namely it doesn't automatically generate translations instead it creates
3 new top level targets to run. These are:

xmlpool-pot
xmlpool-update-po
xmlpool-gmo

v2: - Add new files to autotools dist tarball

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Dylan Baker 2018-08-24 05:56:01 -07:00
parent 2857b18991
commit 7834926a4f
4 changed files with 8 additions and 1 deletions

1
src/util/xmlpool/LINGUAS Normal file
View File

@ -0,0 +1 @@
ca es de nl sv fr

View File

@ -59,7 +59,9 @@ EXTRA_DIST = \
$(POS) \
$(MOS) \
SConscript \
meson.build
meson.build \
LINGUAS \
POTFILES
BUILT_SOURCES = options.h
CLEANFILES = \

View File

@ -0,0 +1 @@
src/util/xmlpool/t_options.h

View File

@ -35,3 +35,6 @@ xmlpool_options_h = custom_target(
capture : true,
depend_files : _langs_po_files,
)
i18n = import('i18n')
i18n.gettext('xmlpool')