From 96c6fc83538fc28d1b3923b8be1eba2648f30e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Wed, 28 Oct 2020 12:02:04 +0100 Subject: build: Migrate from Intltool to Gettext Recent versions of Gettext are able to translate several formats that are used in GNOME applications. This migrates from Intltool to Gettext both autotools and meson build systems. --- actions/Makefile.am | 7 ++++--- actions/meson.build | 5 +++-- actions/org.freedesktop.policykit.policy.in | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'actions') diff --git a/actions/Makefile.am b/actions/Makefile.am index 1709992..5a499a1 100644 --- a/actions/Makefile.am +++ b/actions/Makefile.am @@ -1,9 +1,10 @@ polkit_actiondir = $(datadir)/polkit-1/actions +polkit_action_in_files = org.freedesktop.policykit.policy.in +dist_polkit_action_DATA = $(polkit_action_in_files:.policy.in=.policy) -dist_polkit_action_DATA = org.freedesktop.policykit.policy - -@INTLTOOL_POLICY_RULE@ +org.freedesktop.policykit.policy: org.freedesktop.policykit.policy.in + $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir)/gettext $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ #check: # $(top_builddir)/tools/polkit-policy-file-validate-1 $(top_srcdir)/policy/$(dist_polkit_action_DATA) diff --git a/actions/meson.build b/actions/meson.build index 26d2d2d..2abaaf3 100644 --- a/actions/meson.build +++ b/actions/meson.build @@ -1,10 +1,11 @@ policy = 'org.freedesktop.policykit.policy' -custom_target( +i18n.merge_file( policy, input: policy + '.in', output: '@BASENAME@', - command: intltool_xml_cmd, + po_dir: po_dir, + data_dirs: its_dir, install: true, install_dir: pk_pkgactiondir, ) diff --git a/actions/org.freedesktop.policykit.policy.in b/actions/org.freedesktop.policykit.policy.in index 7400b08..dc5c219 100644 --- a/actions/org.freedesktop.policykit.policy.in +++ b/actions/org.freedesktop.policykit.policy.in @@ -9,8 +9,8 @@ http://www.freedesktop.org/wiki/Software/polkit/ - <_description>Run a program as another user - <_message>Authentication is required to run a program as another user + Run a program as another user + Authentication is required to run a program as another user auth_admin auth_admin -- cgit v1.2.1