[ffe] Add support for Qt Designer UI files

Bug #953342 reported by David Planella on 2012-03-12
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
intltool
High
Данило Шеган
intltool (Ubuntu)
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.

Related branches

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) on 2014-01-27
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
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

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) on 2015-03-09
Changed in intltool:
status: Fix Committed → Fix Released
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
Iain Lane (laney) wrote :

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

Sebastien Bacher (seb128) wrote :

the new upstream release

Daniel Holbach (dholbach) wrote :

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

Daniel Holbach (dholbach) wrote :

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

Steve Langasek (vorlon) on 2015-03-16
Changed in intltool (Ubuntu):
status: New → Confirmed
Iain Lane (laney) on 2015-03-17
Changed in intltool (Ubuntu):
status: Confirmed → Fix Committed
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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers