[json-glib] Add i18n support to the Meson build
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] Add i18n support to the Meson build
- Date: Mon, 13 Mar 2017 12:31:48 +0000 (UTC)
commit 9df57434e8e087e04aaf53a149f77875d11a31b4
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Mar 13 12:27:10 2017 +0000
Add i18n support to the Meson build
https://bugzilla.gnome.org/show_bug.cgi?id=773603
meson.build | 3 ++
po/meson.build | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index c155e81..d1ec730 100644
--- a/meson.build
+++ b/meson.build
@@ -73,12 +73,15 @@ if get_option('default_library') != 'static'
endif
root_dir = include_directories('.')
+
gnome = import('gnome')
gir = find_program('g-ir-scanner', required: false)
build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
subdir('json-glib')
+subdir('po')
+
if get_option('enable-gtk-doc')
subdir('doc/reference')
endif
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..f6bdacf
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,83 @@
+i18n = import('i18n')
+
+langs = [
+ 'as',
+ 'bg',
+ 'bn_IN',
+ 'bs',
+ 'ca',
+ 'ca@valencia',
+ 'cs',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'eo',
+ 'es',
+ 'et',
+ 'eu',
+ 'fr',
+ 'fur',
+ 'gl',
+ 'he',
+ 'hi',
+ 'hu',
+ 'id',
+ 'it',
+ 'ja',
+ 'ko',
+ 'ky',
+ 'lt',
+ 'lv',
+ 'ml',
+ 'nb',
+ 'oc',
+ 'or',
+ 'pa',
+ 'pl',
+ 'pt_BR',
+ 'pt',
+ 'ro',
+ 'ru',
+ 'sk',
+ 'sl',
+ 'sr@latin',
+ 'sr',
+ 'sv',
+ 'te',
+ 'tg',
+ 'tr',
+ 'ug',
+ 'uk',
+ 'vi',
+ 'zh_CN',
+ 'zh_HK',
+ 'zh_TW',
+]
+
+i18n.gettext('json-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=json-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',
+ ])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]