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 /src/examples | |
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 'src/examples')
-rw-r--r-- | src/examples/Makefile.am | 7 | ||||
-rw-r--r-- | src/examples/meson.build | 5 | ||||
-rw-r--r-- | src/examples/org.freedesktop.policykit.examples.pkexec.policy.in | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index 3ee373f..b7d885e 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -49,10 +49,11 @@ pk_example_frobnicate_LDADD = \ $(NULL) polkit_actiondir = $(datadir)/polkit-1/actions +polkit_action_in_files = org.freedesktop.policykit.examples.pkexec.policy.in +dist_polkit_action_DATA = $(polkit_action_in_files:.policy.in=.policy) -dist_polkit_action_DATA = org.freedesktop.policykit.examples.pkexec.policy - -@INTLTOOL_POLICY_RULE@ +org.freedesktop.policykit.examples.pkexec.policy: org.freedesktop.policykit.examples.pkexec.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/src/examples/meson.build b/src/examples/meson.build index 5f33afc..c6305ab 100644 --- a/src/examples/meson.build +++ b/src/examples/meson.build @@ -1,10 +1,11 @@ policy = 'org.freedesktop.policykit.examples.pkexec.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/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in b/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in index eab7729..ec52416 100644 --- a/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in +++ b/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in @@ -7,8 +7,8 @@ <vendor_url>http://www.freedesktop.org/wiki/Software/polkit/</vendor_url> <action id="org.freedesktop.policykit.example.pkexec.run-frobnicate"> - <_description>Run the polkit example program Frobnicate</_description> - <_message>Authentication is required to run the polkit example program Frobnicate (user=$(user), user.gecos=$(user.gecos), user.display=$(user.display), program=$(program), command_line=$(command_line))</_message> + <description>Run the polkit example program Frobnicate</description> + <message>Authentication is required to run the polkit example program Frobnicate (user=$(user), user.gecos=$(user.gecos), user.display=$(user.display), program=$(program), command_line=$(command_line))</message> <icon_name>audio-x-generic</icon_name> <!-- just an example --> <defaults> <allow_any>no</allow_any> |