meson: add support for generating translation mo files
authorDylan Baker <dylan@pnwbakers.com>
Fri, 24 Aug 2018 12:56:01 +0000 (05:56 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 31 Oct 2018 23:37:12 +0000 (16:37 -0700)
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>
src/util/xmlpool/LINGUAS [new file with mode: 0644]
src/util/xmlpool/Makefile.am
src/util/xmlpool/POTFILES [new file with mode: 0644]
src/util/xmlpool/meson.build

diff --git a/src/util/xmlpool/LINGUAS b/src/util/xmlpool/LINGUAS
new file mode 100644 (file)
index 0000000..3620176
--- /dev/null
@@ -0,0 +1 @@
+ca es de nl sv fr
index f5142768aa34d397c2fe333613e57d90bed1a01a..1c14311dcf5db10377a10775cf866e33d059cb33 100644 (file)
@@ -59,7 +59,9 @@ EXTRA_DIST = \
        $(POS) \
        $(MOS) \
        SConscript \
-       meson.build
+       meson.build \
+       LINGUAS \
+       POTFILES
 
 BUILT_SOURCES = options.h
 CLEANFILES = \
diff --git a/src/util/xmlpool/POTFILES b/src/util/xmlpool/POTFILES
new file mode 100644 (file)
index 0000000..d68d700
--- /dev/null
@@ -0,0 +1 @@
+src/util/xmlpool/t_options.h
index 8bdabcb825b776d06182f72e805a1fd87644a153..8d645ce385f2674f9c96b30137373dc111d5f75e 100644 (file)
@@ -35,3 +35,6 @@ xmlpool_options_h = custom_target(
   capture : true,
   depend_files : _langs_po_files,
 )
+
+i18n = import('i18n')
+i18n.gettext('xmlpool')