[template-glib] i18n: use LINGUAS to be friendlier to damned lies



commit 90e08d14c48cc7d76598009aeb0b28e79c30c477
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jun 3 02:55:27 2017 -0700

    i18n: use LINGUAS to be friendlier to damned lies

 meson.build    |    1 +
 po/LINGUAS     |   15 +++++++++++++++
 po/meson.build |   45 +--------------------------------------------
 3 files changed, 17 insertions(+), 44 deletions(-)
---
diff --git a/meson.build b/meson.build
index 23b343e..a7c3765 100644
--- a/meson.build
+++ b/meson.build
@@ -88,6 +88,7 @@ typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
 vapidir = join_paths(get_option('datadir'), 'vala', 'vapi')
 
 gnome = import('gnome')
+i18n = import('i18n')
 
 subdir('src')
 subdir('tests')
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..dbe5231
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,15 @@
+# please keep this list sorted alphabetically
+#
+cs
+de
+el
+es
+fur
+hu
+id
+pl
+pt
+pt_BR
+sl
+sr
+sv
diff --git a/po/meson.build b/po/meson.build
index 69eb17b..e9b77d7 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,44 +1 @@
-i18n = import('i18n')
-
-langs = [
-  'cs',
-  'de',
-  'el',
-  'es',
-  'fur',
-  'hu',
-  'id',
-  'pl',
-  'pt',
-  'pt_BR',
-  'sl',
-  'sr',
-  'sv',
-]
-
-i18n.gettext('template-glib-1.0',
-             languages: langs,
-             args: [
-               '--default-domain=' + meson.project_name(),
-               '--from-code=UTF-8',
-               '--add-comments',
-               '--msgid-bugs-address=https://bugzilla.gnome.org/enter_bug.cgi?product=template-glib',
-
-               '--keyword=_',
-               '--keyword=N_',
-               '--keyword=C_:1c,2',
-               '--keyword=NC_:1c,2',
-               '--keyword=g_dcgettext:2',
-               '--keyword=g_dngettext:2,3',
-               '--keyword=g_dpgettext2:2c,3',
-
-               '--flag=N_:1:pass-c-format',
-               '--flag=C_:2:pass-c-format',
-               '--flag=NC_:2:pass-c-format',
-               '--flag=g_dngettext:2:pass-c-format',
-               '--flag=g_strdup_printf:1:c-format',
-               '--flag=g_string_printf:2:c-format',
-               '--flag=g_string_append_printf:2:c-format',
-               '--flag=g_error_new:3:c-format',
-               '--flag=g_set_error:4:c-format',
-             ])
+i18n.gettext(meson.project_name(), preset: 'glib')


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