Merge lp://qastaging/~roadmr/checkbox/checkbox-qt-i18n into lp://qastaging/checkbox
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 1345 | ||||
Proposed branch: | lp://qastaging/~roadmr/checkbox/checkbox-qt-i18n | ||||
Merge into: | lp://qastaging/checkbox | ||||
Diff against target: |
2602 lines (+1083/-535) (has conflicts) 11 files modified
debian/changelog (+8/-0) po/Makevars (+42/-0) po/POTFILES.in (+11/-1) po/checkbox.pot (+881/-497) qt/frontend/checkboxtr.cpp (+48/-0) qt/frontend/checkboxtr.h (+46/-0) qt/frontend/frontend.pro (+6/-2) qt/frontend/main.cpp (+4/-0) qt/frontend/qtfront.cpp (+34/-34) qt/frontend/qtfront.h (+1/-0) qt/frontend/treemodel.cpp (+2/-1) Text conflict in debian/changelog |
||||
To merge this branch: | bzr merge lp://qastaging/~roadmr/checkbox/checkbox-qt-i18n | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
TienFu Chen (community) | Approve | ||
Daniel Manrique (community) | Needs Resubmitting | ||
Sylvain Pineau (community) | Needs Information | ||
Review via email:
|
Description of the change
This adds i18n support via gettext to checkbox-qt, to address concerns from the translations team about the new checkbox UI.
What I did basically:
- Adder wrapper checkboxTr functions, inspired from unity-2d's implementation.
- Modified main.cpp and qtfront.h to include headers and initialize gettext.
- Modified frontend.pro to instruct uic-qt4 to use checkboxTr as a translation
function.
- Added checkbox-qt files to po/POTFILES.in, so intltool gets them. NOTE that
this depends on uic-qt4 running *before* intltool to generate ui_qtfront.h.
- Added po/Makevars to instruct intltool to extract strings from checkboxTr
calls. Thanks to Gabor Kelemen for pointers on this.
Note that I didn't wrap all text strings in qt/frontend/*.cpp files, I saw a few that use a "tr" function that I didn't touch, and I'm sure some strings are not wrapped. They need to be wrapped in checkboxTr(
I'd appreciate review of this in case I did something wrong (maybe run it by the ubuntu-translators crowd), and if it gets merged, it'd be good to go over the .cpp files and checkboxTr-wrap any stray strings in another merge request.
Also note that, due to the criticality of the linked bug, this may be worth a Freeze Exception so it can be merged into the Ubuntu version.
checkboxTr function works well and the resulting checkbox.pot now includes strings from the header ui file and treemodel.cpp.
But why leaving some strings not wrapped (e.g. qtfront.cpp)?
Do you prefer to include the checkboxTr mechanism asap and do the rest of the job later ?
And last question, do we have to update the checkbox.pot in bzr to reflect the new additions ?