mirror of
https://github.com/libvirt/libvirt.git
synced 2025-01-06 14:13:27 -06:00
6d3b877171
The 'description' and 'message' fields in polkit policy files should be translated into the user's chosen language. xgettext is told to search in both and source and build dirs by meson. Unfortunately a bug in xgettext means that when it searches for built files in XML format, it'll trigger a warning message due to failure to load the generated file from the source dir: xgettext: cannot read ..snip../libvirt/src/access/org.libvirt.api.policy: failed to load external entity "..snip../libvirt/src/access/org.libvirt.api.policy" This is harmless since it then goes on to try the build dir and succeeds, but will pollute the output of 'ninja libvirt-pot' Related: https://gitlab.com/libvirt/libvirt/-/merge_requests/387 Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
36 lines
930 B
Meson
36 lines
930 B
Meson
i18n.gettext(
|
|
meson.project_name(),
|
|
args: [
|
|
'--from-code=UTF-8',
|
|
'--keyword=_',
|
|
'--keyword=N_',
|
|
'--add-comments=TRANSLATORS:',
|
|
'--directory=@0@'.format(meson.project_source_root()),
|
|
'--directory=@0@'.format(meson.project_build_root()),
|
|
'--files-from=@0@'.format(meson.current_source_dir() / 'POTFILES'),
|
|
'--msgid-bugs-address=https://libvirt.org/bugs.html',
|
|
'--package-version=@0@'.format(meson.project_version()),
|
|
'--sort-output',
|
|
],
|
|
data_dirs: meson.current_source_dir()
|
|
)
|
|
|
|
potfiles_dep = [
|
|
access_generated,
|
|
admin_client_generated,
|
|
admin_driver_generated,
|
|
remote_protocol_generated,
|
|
remote_driver_generated,
|
|
remote_daemon_generated,
|
|
]
|
|
|
|
alias_target('libvirt-pot-dep', potfiles_dep)
|
|
|
|
run_target(
|
|
'libvirt-pot-check',
|
|
command: [
|
|
'@0@/scripts/check-pot.py'.format(meson.project_source_root()),
|
|
'@0@/po/libvirt.pot'.format(meson.project_source_root())
|
|
],
|
|
)
|