[ffe] Add support for Qt Designer UI files

Bug #953342 reported by David Planella
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
intltool
Fix Released
High
Данило Шеган
intltool (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Qt Designer files are XML files that describe the UI of a Qt application, and are the Glade .ui file equivalent in the Qt world.

Their format definition can be found here:

- http://qt-project.org/doc/designer-ui-file-format.html

While many Qt projects use Qt's own i18n/l10n framework, others rely on gettext. Some examples are core Ubuntu applications such as the Ubuntu One client and Checkbox, which have started to migrate to Qt-based user interfaces while overriding Qt's i18n system and using gettext instead.

These cases need a way to extract translatable messages from Qt's .ui files, merge the translations in .pot files and thus integrate with the gettext workflow.

Tags: patch kubuntu

Related branches

Revision history for this message
dobey (dobey) wrote :

For the record, Ubuntu One is using gettext/intltool already for the Qt apps, and not using the Qt Linguist features.

Rohan Garg (rohangarg)
tags: added: kubuntu
Changed in intltool (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
milestone: none → ubuntu-14.04
Changed in intltool:
milestone: none → 0.51.0
assignee: nobody → Данило Шеган (danilo)
importance: Undecided → High
status: New → Fix Committed
Changed in intltool (Ubuntu):
milestone: ubuntu-14.04 → none
Revision history for this message
Sandro Mani (sandromani) wrote :

Shouldn't the result of getXMLstring be passed to entity_decode first? Something along the attached patch. Perhaps I'm not doing this as was planned (basically I'm running a regex-replace on the generate ui_XXX.h files to replace QApplication::translate calls with gettext ones, see [1]), but without entity_decode, the msgids of strings containing html markup does not match what is actually in the ui_XXX.h files, plus having all html-escaped characters in the po files is somewhat unplesant for translators.

[1] https://github.com/manisandro/gImageReader/blob/master/cmake/gettextizeui.cmake

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "intltool_designer_decode.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
dobey (dobey)
Changed in intltool:
status: Fix Committed → Fix Released
Revision history for this message
dobey (dobey) wrote :

This apparently needs a freeze exception to be able to get the new version into Ubuntu which contains this. :-/

summary: - Add support for Qt Designer UI files
+ [ffe] Add support for Qt Designer UI files
Changed in intltool (Ubuntu):
status: Triaged → New
Revision history for this message
Iain Lane (laney) wrote :

Are you asking to upload a patch to just add this feature or the new upstream release?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new upstream release

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Looks good from a sponsoring perspective. Can we get somebody from the release team to review this?

Revision history for this message
Daniel Holbach (dholbach) wrote :

<infinity> dholbach: Alright, the "new feature" parts of that look reasonably isolated, go for it.

Steve Langasek (vorlon)
Changed in intltool (Ubuntu):
status: New → Confirmed
Iain Lane (laney)
Changed in intltool (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package intltool - 0.51.0-1

---------------
intltool (0.51.0-1) experimental; urgency=medium

  [ Rodney Dawes ]
  * New upstream release.
    - Support Qt Designer UI files (LP: #953342)
    - Do not include full path to source files in template. (LP: #1316777)
    - Support spaces around '=' in key files. (LP: #1395561)
    - Support single quotes in intltool-extract regex. (LP: #1034153)
  * debian/watch:
    - Fix search pattern URL to be https.
  * debian/control.in:
    - Bump standards version.

  [ Iain Lane ]
  * debian/control{,.in}: Update for experimental

 -- Rodney Dawes <email address hidden> Mon, 16 Mar 2015 18:17:42 +0000

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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