59 lines
1.8 KiB
Diff
59 lines
1.8 KiB
Diff
From: Matthias Clasen <mclasen@redhat.com>
|
|
Date: Fri, 15 Jul 2016 11:12:35 -0400
|
|
Subject: Add gettext support for .policy files
|
|
|
|
gettext can extract strings from and merge them back into xml
|
|
file formats, with the help of .its files.
|
|
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=96940
|
|
Origin: upstream, 0.114, commit:c78819245ff8a270f97c9f800773e727918be838
|
|
---
|
|
data/Makefile.am | 5 +++++
|
|
data/polkit.its | 7 +++++++
|
|
data/polkit.loc | 6 ++++++
|
|
3 files changed, 18 insertions(+)
|
|
create mode 100644 data/polkit.its
|
|
create mode 100644 data/polkit.loc
|
|
|
|
diff --git a/data/Makefile.am b/data/Makefile.am
|
|
index f0beeba..e1a60aa 100644
|
|
--- a/data/Makefile.am
|
|
+++ b/data/Makefile.am
|
|
@@ -20,6 +20,11 @@ endif
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
pkgconfig_DATA = polkit-gobject-1.pc polkit-backend-1.pc polkit-agent-1.pc
|
|
|
|
+# ----------------------------------------------------------------------------------------------------
|
|
+
|
|
+itsdir = $(datadir)/gettext/its
|
|
+its_DATA = polkit.loc polkit.its
|
|
+
|
|
CLEANFILES = $(BUILT_SOURCES)
|
|
|
|
EXTRA_DIST = \
|
|
diff --git a/data/polkit.its b/data/polkit.its
|
|
new file mode 100644
|
|
index 0000000..1312ecb
|
|
--- /dev/null
|
|
+++ b/data/polkit.its
|
|
@@ -0,0 +1,7 @@
|
|
+<?xml version="1.0"?>
|
|
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
|
|
+ version="2.0">
|
|
+ <its:translateRule selector="/action/description |
|
|
+ /action/message"
|
|
+ translate="yes"/>
|
|
+</its:rules>
|
|
diff --git a/data/polkit.loc b/data/polkit.loc
|
|
new file mode 100644
|
|
index 0000000..c7427ec
|
|
--- /dev/null
|
|
+++ b/data/polkit.loc
|
|
@@ -0,0 +1,6 @@
|
|
+<?xml version="1.0"?>
|
|
+<locatingRules>
|
|
+ <locatingRule name="polkit policy" pattern="*.policy">
|
|
+ <documentRule localName="policyconfig" target="polkit.its"/>
|
|
+ </locatingRule>
|
|
+</locatingRules>
|