bugGNU gettext - Bugs: bug #42615, Feature request: Support...


You are not allowed to post comments on this tracker with your current authentication level.

bug #42615: Feature request: Support internationalization of PolicyKit XML files

Submitter:  None
Submitted:  Wed 25 Jun 2014 05:48:57 PM UTC
Category:  XML Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Thu 16 Nov 2017 01:41:56 AM UTC, comment #5: 

While I certainly understand the desire and motivation to keep the specific ITS support with the primary software implementation, because any modification can then be kept easily in sync. This also causes problems with project build-depdenencies.

For example I was requested recently to include a policykit policy in dpkg, and I wanted that to be translated. I had already implemented the .its and .loc files, to then notice that policykit shipped an .its file, which I was not able to build-depend on, as that would be unacceptable in this case because that means pulling policykit into the Debian (or any derivative) build-essential set.

This can also incur huge build-dependency chains or even cycles, to be able to support files that are not directly used by the building projects. So shipping all these files with gettext also have some merit worth considering IMO.

Guillem Jover <guillem>
Mon 27 Feb 2017 06:57:39 PM UTC, comment #4: 
Piotr Drąg <piotrdrag>
Fri 22 Jan 2016 07:13:01 AM UTC, comment #3: 

Now that gettext 0.19.7 has a built-in support for ITS, I would suggest PolicyKit to install *.its files by themselves, like this:


I am more than happy to help, but I don't really know how those PolicyKit translations are consumed.

Daiki Ueno <ueno>
Group administrator
Wed 25 Jun 2014 11:08:23 PM UTC, comment #2: 

While we have already supported some XML-based file formats (GSettings, GtkBuilder, ...), I'm now wondering if the approach scales.  You can use itstool like this:

$ cat data/policykit.its
  <its:translateRule translate="no" selector="/component"/>
  <its:translateRule translate="yes"
    selector="/policyconfig/action/description |

$ cat src/Makefile.am
BUILT_SOURCES += org.freedesktop.hostname1.policy.pot
EXTRA_DIST += org.freedesktop.hostname1.policy.pot
MAINTAINERCLEANFILES += org.freedesktop.hostname1.policy.pot

org.freedesktop.hostname1.policy.pot: org.freedesktop.hostname1.policy
        $(AM_V_GEN) $(ITSTOOL) -i $(top_srcdir)/data/policykit.its $< > $@.tmp && mv $@.tmp $@

$ cat po/POTFILES.in

Perhaps it might better integrate the part of itstool features to gettext, rather than adding support for every XML-based file format?

Daiki Ueno <ueno>
Group administrator
Wed 25 Jun 2014 05:55:02 PM UTC, comment #1: 
Piotr Drąg <piotrdrag>
Wed 25 Jun 2014 05:48:57 PM UTC, original submission:  

Right now these use intltool-merge for internationalization.

These files are XML but there's already precedent in support of GSettings schemas which are also XML based, so a lot of the plumbing might already be present.




(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by guillem (Posted a comment)
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by piotrdrag (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone XML

    Back to the top

    Powered by Savane 3.12