Merge lp://qastaging/~dpm/intltool/add-qtdesigner-support into lp://qastaging/intltool

Proposed by David Planella
Status: Merged
Merged at revision: 744
Proposed branch: lp://qastaging/~dpm/intltool/add-qtdesigner-support
Merge into: lp://qastaging/intltool
Diff against target: 392 lines (+306/-1)
7 files modified
doc/intltool-extract.8 (+2/-0)
intltool-extract.in (+73/-1)
tests/cases/Makefile.am (+2/-0)
tests/cases/extract-qtdesigner.ui (+210/-0)
tests/results/Makefile.am (+1/-0)
tests/results/extract-qtdesigner.ui.h (+13/-0)
tests/selftest.pl.in (+5/-0)
To merge this branch: bzr merge lp://qastaging/~dpm/intltool/add-qtdesigner-support
Reviewer Review Type Date Requested Status
Данило Шеган Approve
Review via email: mp+145112@code.qastaging.launchpad.net

Description of the change

This branch adds support for extracting translatable strings from Qt Designer files through a new gettext/qtdesigner type (lp:953342).

Notes: the regexp used to extract the strings from the XML attributes of the <string> tag used by Qt .ui files is similar to the one used to extraxt strings from Glade .ui files in the sense that it relies on those tags being present in a particular order.

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

Btw, at least the doc links are incorrect in intltool-extract.in:

 - http://qt-project.org/doc/qt-5.0/qtlinguist/linguist-ts-file-format.html
 - http://qt-project.org/doc/qt-5.0/qtdesigner/designer-ui-file-format.html

are currently correct links (I assume they have changed since you started work on this).

Btw, I would prefer if the support was done using the real XML parser: that would ensure that a lot more of the XML syntax is supported, and that we don't accidentally break when eg. the order of attributes changes in the XML file.

A good example is type_gsettings/traverse_gsettings functions.

review: Needs Fixing
739. By David Planella

Updated links to Qt translation format specs

740. By David Planella

Updated test case for Qt Designer extraction: no escapes

741. By David Planella

Added Qt Designer .ui file extraction support using the internal XML parser

742. By David Planella

Updated man page with the new gettext/qtdesigner type for extraction

743. By David Planella

Added files for gettext/qtdesigner testcase and result to the corresponding Makefile.am files

Revision history for this message
David Planella (dpm) wrote :

Ok, addressed the two points above and re-submitted MP.

Revision history for this message
Rohan Garg (rohangarg) wrote :

Any ETA when this is going to land? This also fixes bug 1234106 for Kubuntu so it'll be nice to have it land soon.

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

Hi David (and other interested parties): sorry for taking this long to take another look at this. It somehow slipped my radar (so thanks everyone for reminding me).

The branch looks pretty good. Since you are also doing special whitespace handling, it would be good to have at least one of the strings in a test case actually demonstrate that. Since I've taken this long to review it, I'll do this myself.

I'll be merging this branch, but I won't be releasing it until we clarify a few other things. I am most worried about the escaping support. One of the examples in the test case is an HTML string, but ideally, that'd be unescaped in PO files (for translators' benefit). Where's the code that actually reads MO files? Is there any good example code for me to check out to see how would everything fit together?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches