Bad gsettings support

Bug #922685 reported by Данило Шеган
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intltool
Fix Released
High
Данило Шеган
intltool (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

gsettings support as implemented in #580526 doesn't work as desired:
 - beginning/end whitespace should be stripped
 - multiple consecutive newlines should be preserved in the output

Ryan's patch on https://bugs.launchpad.net/intltool/+bug/580526/+attachment/2695834/+files/fixed.patch best illustrates what is desired.

Note that changing this now will break compatibility, and translators will have to re-translate these strings.

Revision history for this message
Данило Шеган (danilo) wrote :

Fixed in r727 of lp:intltool. Please test so I can roll out a release.

Changed in intltool:
assignee: nobody → Данило Шеган (danilo)
status: Triaged → In Progress
status: In Progress → Fix Committed
Revision history for this message
Allison Karlitskaya (desrt) wrote :

This looks pretty good. I'll have to make a minor tweak on the glib side for compatibility, but I think what intltool is now doing is ideal.

I don't think you have to worry too much about translators redoing work -- gnome jhbuild is still on intltool 0.41.1 so clearly not many people have been exposed.

Thanks for the rapid response.

Revision history for this message
Allison Karlitskaya (desrt) wrote :

One more thought: perhaps it could make sense to act with more robustness with regard to other whitespace characters and "\n\n". Two examples come to mind: "\r\n\r\n" and "\n \n" (ie: empty line with indentation).

Revision history for this message
Данило Шеган (danilo) wrote :

Indeed, I thought about supporting more than a single-space indentation, i.e. \n(\n|\r|\t| )*\n (I've seen editors auto-indent text like this, i.e. leave the whitespace indentation in for an otherwise empty line). What do you think? (of course, glib would have to be changed for this as well)

Changed in intltool:
milestone: 0.51.0 → 0.50.1
Revision history for this message
Данило Шеган (danilo) wrote :

Ryan, can you please comment on #4? (because proper support for that would depend on glib dealing with it in the same way as well) Thanks :)

Revision history for this message
Allison Karlitskaya (desrt) wrote :

i think \n\s*\n would work...

Changed in intltool (Ubuntu):
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * debian/patches/03_gsettings_schemas_handling.patch:
    - improve gsettings support (lp: #922685)
  * debian/patches/04_gmenu_translation.patch:
    - "intltool glade support doesn't work with menus" (lp: #923841)
 -- Sebastien Bacher <email address hidden> Fri, 03 Feb 2012 16:30:30 +0100

Changed in intltool (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Данило Шеган (danilo) wrote :

Improved the support to use \n\s*\n as discussed above (in r729 of lp:intltool).

Revision history for this message
Данило Шеган (danilo) wrote :

Seb, note that the final fix is slightly improved (see http://bazaar.launchpad.net/~intltool/intltool/trunk/revision/729).

Changed in intltool:
status: Fix Committed → Fix Released
Changed in intltool (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * New upstream version:
    - improved gsettings support (lp: #922685)
    - support AM_SILENT_RULES (lp: #402516)
  * debian/patches/01_NEWS.patch,
    debian/patches/02_fix_quoting.diff,
    debian/patches/03_gsettings_schemas_handling.patch,
    debian/patches/04_gmenu_translation.patch:
    - dropped, those issues are fixed in the new version
 -- Sebastien Bacher <email address hidden> Mon, 06 Feb 2012 10:53:53 +0100

Changed in intltool (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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