Add support for new gsettings simple schema format

Bug #580526 reported by Ignacio Casal Quinteiro on 2010-05-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Данило Шеган
intltool (Ubuntu)

Bug Description

This bug is releated to #579888. We need also a way to extract the strings from the simple schema format. See:

for an example on how it is.

This really confuses me now, though. Is this another gsettings file format? Why does it have two different file formats for roughly the same thing. Or is it not the same thing? It sounds as if you are not yet sure about the design, but it doesn't make sense for intltool to support weird layouts until you are.

Btw, why decide on a format like this? Why not use a simpler .ini format instead? (intltool already has support for it when "_" is prepended to keys to extract, like .desktop files)

Will this require merging support as well? (support to generate files of the roughly similar structure which contain translations either instead or in addition to original English strings) If yes, how should that work? If no, how are you going to find out the relevant translation domain for each of the gschema files?

Changed in intltool:
status: New → Incomplete

And how are you going to support a bit more advanced translations features like comments?

desrt (desrt) wrote :

here's support for GSettings.

There's really not much confusion about the file format -- and this idea of using some .in format with <_summary> and so on is really an ugly hack which was never supported or officially suggested.

The weird use of 'my' here is because I don't know perl and when I move those variable declarations inside the scope of the function I get a strange warning... It's intentionally ugly so you can see it and give suggestions about how I might fix it :)

Ryan, so, the reason to go with the "standard" XML support in intltool would be because of all the bits and pieces that it already provides (like xml:space="preserve" support). If we do decide to not care about that in gsettings (we very well might), we should make it clear.

Now, comments on the specifics.
 - use XML::Parser should probably be done in a similar way it's done in readXML (it allows to use intltool without XML::Parser if you are not using XML features); or, we could just drop the eval-hack inside readXML instead and require XML::Parser in all cases
 - yeah, those "my" declarations do look nice ;)
 - it'd be so much easier to work with this if you added a testcase that covers all the important bits; I know intltool test system is far from perfect, but it's still very useful for tracking regressions and understanding how stuff works — especially since I have a hard time finding what an actual gsettings file looks like ;)

desrt (desrt) wrote :

we have unusual whitespace handling which is part of why i opted to do this myself.

i'l try to meet you tomorrow to discuss this.

Changed in intltool:
importance: Undecided → High
status: Incomplete → Triaged
milestone: none → 0.42.0
assignee: nobody → Данило Шеган (danilo)
Changed in intltool:
status: Triaged → In Progress
Changed in intltool:
status: In Progress → Fix Committed
Changed in intltool:
status: Fix Committed → Fix Released
Changed in intltool (Ubuntu):
importance: Undecided → High
status: New → Fix Committed

The attachment "implement GSettings support" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package intltool - 0.50.0-0ubuntu1

intltool (0.50.0-0ubuntu1) precise; urgency=low

  * New upstream version, support gsettings schemas translations (lp: #580526)
 -- Sebastien Bacher <email address hidden> Mon, 05 Dec 2011 16:50:28 +0100

Changed in intltool (Ubuntu):
status: Fix Committed → Fix Released
desrt (desrt) wrote :

This is not fixed. The modification of the patch dropped the custom whitespace handling and the result is that the extracted strings are not correct.

desrt (desrt) wrote :

bring back the custom whitespace handling, better documented (and with a tweak to protect whitespace in default values).

improve the testcase.

Filed as bug 922685.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.