[sysprof/wip/piotrdrag/broken-i18n] build: use modern Meson helpers for i18n
- From: Piotr Drąg <piotrdrag src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/piotrdrag/broken-i18n] build: use modern Meson helpers for i18n
- Date: Tue, 25 Sep 2018 20:00:04 +0000 (UTC)
commit d6ccf1b4fdc26e45a9e4a1278b0e99ed7cc3d409
Author: Piotr Drąg <piotrdrag gmail com>
Date: Tue Sep 25 21:49:34 2018 +0200
build: use modern Meson helpers for i18n
data/meson.build | 14 +++++++-------
meson.build | 1 +
po/meson.build | 9 +--------
3 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 51a5b31..2270e23 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,6 +1,5 @@
datadir = get_option('datadir')
podir = join_paths(meson.source_root(), 'po')
-msgfmt = find_program('msgfmt')
install_data('sysprof-mime.xml',
install_dir: join_paths(datadir, 'mime/packages')
@@ -10,19 +9,19 @@ install_data('org.gnome.sysprof2.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0/schemas')
)
-# TODO: 0.37.0 adds i18n.merge_file()
-custom_target('appdata-file',
+i18n.merge_file(
input: 'org.gnome.Sysprof2.appdata.xml.in',
output: 'org.gnome.Sysprof2.appdata.xml',
- command: [msgfmt, '--xml', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
+ po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
-custom_target('desktop-file',
+i18n.merge_file(
input: 'org.gnome.Sysprof2.desktop.in',
output: 'org.gnome.Sysprof2.desktop',
- command: [msgfmt, '--desktop', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
+ type: 'desktop',
+ po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'applications')
)
@@ -98,10 +97,11 @@ if get_option('with_sysprofd') == 'bundled'
install_dir: systemdunitdir,
)
- configure_file(
+ i18n.merge_file(
input: 'org.gnome.sysprof2.policy.in',
output: 'org.gnome.sysprof2.policy',
configuration: sysprofdconf,
+ po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'polkit-1/actions'),
)
diff --git a/meson.build b/meson.build
index 9de8e5b..217f782 100644
--- a/meson.build
+++ b/meson.build
@@ -152,6 +152,7 @@ configure_file(
)
gnome = import('gnome')
+i18n = import('i18n')
subdir('lib')
subdir('daemon')
diff --git a/po/meson.build b/po/meson.build
index d0c7509..d59a815 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,8 +1 @@
-i18n = import('i18n')
-
-i18n.gettext('sysprof',
- preset: 'glib',
- args: [
-
'--msgid-bugs-address=https://bugzilla.gnome.org/enter_bug.cgi?product=sysprof&keywords=I18N+L10N&component=general',
- ],
-)
+i18n.gettext('sysprof', preset: 'glib')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]