mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 22:50:54 +00:00
build: use modern Meson helpers for i18n
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
datadir = get_option('datadir')
|
datadir = get_option('datadir')
|
||||||
podir = join_paths(meson.source_root(), 'po')
|
podir = join_paths(meson.source_root(), 'po')
|
||||||
msgfmt = find_program('msgfmt')
|
|
||||||
|
|
||||||
install_data('sysprof-mime.xml',
|
install_data('sysprof-mime.xml',
|
||||||
install_dir: join_paths(datadir, 'mime/packages')
|
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')
|
install_dir: join_paths(datadir, 'glib-2.0/schemas')
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: 0.37.0 adds i18n.merge_file()
|
i18n.merge_file(
|
||||||
custom_target('appdata-file',
|
|
||||||
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
||||||
output: 'org.gnome.Sysprof2.appdata.xml',
|
output: 'org.gnome.Sysprof2.appdata.xml',
|
||||||
command: [msgfmt, '--xml', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
|
po_dir: podir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(datadir, 'metainfo')
|
install_dir: join_paths(datadir, 'metainfo')
|
||||||
)
|
)
|
||||||
|
|
||||||
custom_target('desktop-file',
|
i18n.merge_file(
|
||||||
input: 'org.gnome.Sysprof2.desktop.in',
|
input: 'org.gnome.Sysprof2.desktop.in',
|
||||||
output: 'org.gnome.Sysprof2.desktop',
|
output: 'org.gnome.Sysprof2.desktop',
|
||||||
command: [msgfmt, '--desktop', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
|
type: 'desktop',
|
||||||
|
po_dir: podir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(datadir, 'applications')
|
install_dir: join_paths(datadir, 'applications')
|
||||||
)
|
)
|
||||||
@ -98,10 +97,11 @@ if get_option('with_sysprofd') == 'bundled'
|
|||||||
install_dir: systemdunitdir,
|
install_dir: systemdunitdir,
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file(
|
i18n.merge_file(
|
||||||
input: 'org.gnome.sysprof2.policy.in',
|
input: 'org.gnome.sysprof2.policy.in',
|
||||||
output: 'org.gnome.sysprof2.policy',
|
output: 'org.gnome.sysprof2.policy',
|
||||||
configuration: sysprofdconf,
|
configuration: sysprofdconf,
|
||||||
|
po_dir: podir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(datadir, 'polkit-1/actions'),
|
install_dir: join_paths(datadir, 'polkit-1/actions'),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -152,6 +152,7 @@ configure_file(
|
|||||||
)
|
)
|
||||||
|
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
|
i18n = import('i18n')
|
||||||
|
|
||||||
subdir('lib')
|
subdir('lib')
|
||||||
subdir('daemon')
|
subdir('daemon')
|
||||||
|
|||||||
@ -1,8 +1 @@
|
|||||||
i18n = import('i18n')
|
i18n.gettext('sysprof', preset: 'glib')
|
||||||
|
|
||||||
i18n.gettext('sysprof',
|
|
||||||
preset: 'glib',
|
|
||||||
args: [
|
|
||||||
'--msgid-bugs-address=https://bugzilla.gnome.org/enter_bug.cgi?product=sysprof&keywords=I18N+L10N&component=general',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user