libvirt/po/meson.build
Andrea Bolognani 325dd585fb po: Stop using 'glib' preset for i18n.gettext()
Due to a bug in meson versions earlier than 0.60, the
--add-comments that's part of the 'glib' preset and the
--add-comments=TRANSLATORS: that we add ourselves might be
passed to xgettext in the wrong order, resulting in a bunch of
comments that we don't care about being added to the potfile.

Most of the options included in the 'glib' preset are not
applicable to libvirt anyway, so just stop using the preset and
pass a few extra options explicitly instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-05-23 13:58:22 +02:00

39 lines
869 B
Meson

i18n = import('i18n')
potfiles_conf = configuration_data({
'SRCDIR': '',
'BUILDDIR': '',
})
potfiles = configure_file(
input: 'POTFILES.in',
output: '@BASENAME@',
configuration: potfiles_conf,
)
i18n.gettext(
meson.project_name(),
args: [
'--from-code=UTF-8',
'--keyword=_',
'--keyword=N_',
'--add-comments=TRANSLATORS:',
'--directory=@0@'.format(meson.source_root()),
'--directory=@0@'.format(meson.build_root()),
'--files-from=@0@'.format(meson.current_build_dir() / 'POTFILES'),
'--msgid-bugs-address=https://libvirt.org/bugs.html',
'--package-version=@0@'.format(meson.project_version()),
'--sort-output',
],
)
potfiles_dep = [
access_gen_sources,
admin_client_generated,
admin_driver_generated,
remote_driver_generated,
remote_daemon_generated,
]
alias_target('libvirt-pot-dep', potfiles_dep)