diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2020-10-28 12:02:04 +0100 |
---|---|---|
committer | Jan Rybar <jrybar@redhat.com> | 2021-07-29 17:16:35 +0200 |
commit | 96c6fc83538fc28d1b3923b8be1eba2648f30e28 (patch) | |
tree | 319bfbd0c8fe86c3d16e97cb09267507abff2563 /actions | |
parent | e336bf86d8b8489a4643500925e4da4eeb9000ba (diff) | |
download | polkit-96c6fc83538fc28d1b3923b8be1eba2648f30e28.tar.gz |
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.
Diffstat (limited to 'actions')
-rw-r--r-- | actions/Makefile.am | 7 | ||||
-rw-r--r-- | actions/meson.build | 5 | ||||
-rw-r--r-- | actions/org.freedesktop.policykit.policy.in | 4 |
3 files changed, 9 insertions, 7 deletions
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 @@ <vendor_url>http://www.freedesktop.org/wiki/Software/polkit/</vendor_url> <action id="org.freedesktop.policykit.exec"> - <_description>Run a program as another user</_description> - <_message>Authentication is required to run a program as another user</_message> + <description>Run a program as another user</description> + <message>Authentication is required to run a program as another user</message> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> |