Merge branch 'wip/piotrdrag/broken-i18n' into 'master'

build: use modern Meson helpers for i18n

See merge request GNOME/sysprof!8
This commit is contained in:
Christian Hergert
2018-09-25 21:21:11 +00:00
3 changed files with 9 additions and 15 deletions

View File

@ -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'),
)

View File

@ -152,6 +152,7 @@ configure_file(
)
gnome = import('gnome')
i18n = import('i18n')
subdir('lib')
subdir('daemon')

View File

@ -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')