[frogr/meson: 5/16] meson: Added support for translations using gettext



commit 780ce629cead45535e055b242b1f3b2e00223424
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Tue May 23 17:35:04 2017 +0100

    meson: Added support for translations using gettext

 meson.build    |    5 +++++
 po/meson.build |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3582a88..ca4cab7 100644
--- a/meson.build
+++ b/meson.build
@@ -73,6 +73,10 @@ endif
 
 frogr_conf.set10('HAVE_GSTREAMER', get_variable('has_video', false))
 
+# L10n support
+i18n = import('i18n')
+frogr_conf.set_quoted('GETTEXT_PACKAGE', project_name)
+
 # Generate configuration
 configure_file(output: 'config.h',
                configuration: frogr_conf)
@@ -80,3 +84,4 @@ configure_file(output: 'config.h',
 # Build frogr
 frogr_top_dir = include_directories ('.')
 subdir ('src')
+subdir ('po')
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..1ac7291
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,6 @@
+i18n.gettext(project_name,
+    preset : 'glib',
+    args: [
+        '--default-domain=' + project_name,
+    ]
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]