summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--NEWS1
-rw-r--r--po/Makefile11
-rw-r--r--po/POTFILES.in3
-rw-r--r--polkit/policy/Makefile16
-rw-r--r--polkit/policy/org.mageia.drakkeyboard.policy.in (renamed from polkit/policy/org.mageia.drakkeyboard.policy)4
-rw-r--r--polkit/policy/org.mageia.drakmouse.policy.in (renamed from polkit/policy/org.mageia.drakmouse.policy)4
-rw-r--r--polkit/policy/org.mageia.drakx11.policy.in (renamed from polkit/policy/org.mageia.drakx11.policy)4
8 files changed, 39 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 67febf0..c145ed2 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,6 @@ libdir=/usr/lib
bindir=/usr/bin
sbindir=/usr/sbin
libexecdir=/usr/libexec
-polkitpolicydir=/usr/share/polkit-1/actions
desktopdir=/usr/share/applications
autostartdir=/usr/share/autostart
xinitdir=/etc/X11/xinit.d
@@ -20,13 +19,15 @@ all: $(INLIBDEST_DIRS)
install -d auto
(find lib -name '*.pm'; find tools -type f) | xargs perl -pi -e 's/\s*use\s+(diagnostics|vars|strict).*//g'
for i in po $(INLIBDEST_DIRS); do make -C $$i; done
+ make -C polkit/policy
+ make -C po
check:
@for p in `find lib -name *.pm`; do perl -cw -I$(libdir)/libDrakX $$p || exit 1; done
@for p in tools/*; do head -n1 $$p | grep perl || continue; perl -cw $$p || exit 1; done
install:
- install -d $(DESTDIR){$(libdir),$(bindir),$(sbindir),$(desktopdir),$(autostartdir),$(xinitdir),$(iconsdir),$(pixmapsdir),$(libexecdir),$(polkitpolicydir)}
+ install -d $(DESTDIR){$(libdir),$(bindir),$(sbindir),$(desktopdir),$(autostartdir),$(xinitdir),$(iconsdir),$(pixmapsdir),$(libexecdir)}
install -d $(INLIBDEST_DIRS:%=$(DESTDIR)$(libdir)/libDrakX//%)
cp -a lib/*.pm $(DESTDIR)$(libdir)/libDrakX/
@@ -42,7 +43,6 @@ install:
install -m755 tools/mousedrake $(DESTDIR)$(libexecdir)/drakmouse
install -m755 tools/XFdrake $(DESTDIR)$(libexecdir)/drakx11
install polkit/wrappers/* $(DESTDIR)$(bindir)
- install polkit/policy/* $(DESTDIR)$(polkitpolicydir)
# Some compatibility name wrappers
ln -s drakkeyboard $(DESTDIR)$(bindir)/keyboarddrake
ln -s drakmouse $(DESTDIR)$(bindir)/mousedrake
@@ -51,9 +51,11 @@ install:
#install -m644 $(wildcard data/*.desktop) $(DESTDIR)$(desktopdir)
#install -m644 $(wildcard data/icons/*.png) $(DESTDIR)$(iconsdir)
install -m644 $(wildcard data/pixmaps/*.png) $(DESTDIR)$(pixmapsdir)
+ make -C polkit/policy install
make -C po install
clean:
+ make -C polkit/policy clean
make -C po clean
dist:
diff --git a/NEWS b/NEWS
index 8d1083c..e72cc0e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- make the polkit policy files translatable (mga#11125)
- add a legacy compatibility symlink for XFdrake
Version 0.110 - 4 September 2013
diff --git a/po/Makefile b/po/Makefile
index c294cc5..f11b883 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -31,9 +31,14 @@ clean:
%.mo: %.po
msgfmt -o $@ $<
-$(POTFILE): $(PL_FILES)
- perl_checker -q --generate-pot $@ $(PL_FILES)
-
+$(POTFILE): $(PL_FILES) POTFILES.in
+ intltool-update --gettext-package non-perl --pot
+ perl_checker -q --generate-pot .$@ $(PL_FILES)
+ msgcat -w 2048 --use-first .$@ non-perl.pot > $@
+ rm -f non-perl.pot ..$@ .$@
+
+POTFILES.in:
+ (cd .. ; /bin/ls -1 polkit/policy/*.policy.in; ) > POTFILES.in
update_n_merge: $(PGOAL).pot merge
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..d3cda6d
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,3 @@
+polkit/policy/org.mageia.drakkeyboard.policy.in
+polkit/policy/org.mageia.drakmouse.policy.in
+polkit/policy/org.mageia.drakx11.policy.in
diff --git a/polkit/policy/Makefile b/polkit/policy/Makefile
new file mode 100644
index 0000000..1de7222
--- /dev/null
+++ b/polkit/policy/Makefile
@@ -0,0 +1,16 @@
+POLKITPOLICYDEST = $(DESTDIR)/usr/share/polkit-1/actions
+
+POLICY_IN := $(wildcard *.policy.in)
+POLICY = $(POLICY_IN:.policy.in=.policy)
+
+all: $(POLICY)
+
+clean:
+ rm -f $(POLICY)
+
+install: all
+ install -d $(POLKITPOLICYDEST)
+ install -m644 $(POLICY) $(POLKITPOLICYDEST)
+
+%.policy: %.policy.in
+ intltool-merge --utf8 ../../po $< $@ -x -u -c ../../po/.intltool-merge-cache
diff --git a/polkit/policy/org.mageia.drakkeyboard.policy b/polkit/policy/org.mageia.drakkeyboard.policy.in
index e3cd5bd..7ebaf2a 100644
--- a/polkit/policy/org.mageia.drakkeyboard.policy
+++ b/polkit/policy/org.mageia.drakkeyboard.policy.in
@@ -8,8 +8,8 @@
<vendor_url>http://www.mageia.org/</vendor_url>
<action id="org.mageia.drakkeyboard.pkexec.run">
- <description>Run Mageia Keyboard Configuration</description>
- <message>Authentication is required to run Mageia Keyboard Configuration</message>
+ <_description>Run Mageia Keyboard Configuration</_description>
+ <_message>Authentication is required to run Mageia Keyboard Configuration</_message>
<icon_name>drakconf</icon_name>
<defaults>
<allow_any>no</allow_any>
diff --git a/polkit/policy/org.mageia.drakmouse.policy b/polkit/policy/org.mageia.drakmouse.policy.in
index 157e2d2..dc9981e 100644
--- a/polkit/policy/org.mageia.drakmouse.policy
+++ b/polkit/policy/org.mageia.drakmouse.policy.in
@@ -8,8 +8,8 @@
<vendor_url>http://www.mageia.org/</vendor_url>
<action id="org.mageia.drakmouse.pkexec.run">
- <description>Run Mageia Mouse Configuration</description>
- <message>Authentication is required to run Mageia Mouse Configuration</message>
+ <_description>Run Mageia Mouse Configuration</_description>
+ <_message>Authentication is required to run Mageia Mouse Configuration</_message>
<icon_name>drakconf</icon_name>
<defaults>
<allow_any>no</allow_any>
diff --git a/polkit/policy/org.mageia.drakx11.policy b/polkit/policy/org.mageia.drakx11.policy.in
index efa8441..5d1fad2 100644
--- a/polkit/policy/org.mageia.drakx11.policy
+++ b/polkit/policy/org.mageia.drakx11.policy.in
@@ -8,8 +8,8 @@
<vendor_url>http://www.mageia.org/</vendor_url>
<action id="org.mageia.drakx11.pkexec.run">
- <description>Run Mageia Graphics Configuration</description>
- <message>Authentication is required to run Mageia Graphics Configuration</message>
+ <_description>Run Mageia Graphics Configuration</_description>
+ <_message>Authentication is required to run Mageia Graphics Configuration</_message>
<icon_name>drakconf</icon_name>
<defaults>
<allow_any>no</allow_any>