Most of the Checkbox UI is not translatable

Bug #951054 reported by David Planella
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
High
Daniel Manrique
Ubuntu Translations
Fix Released
Critical
Unassigned
checkbox (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I started reporting bug 951025, but I think that one is probably just part of a bigger bug.

It seems that most if not all of the Checkbox UI is not translatable, or at least its translations are not exposed in Launchpad.

I can think of several causes:

- The checkbox.pot template is not up to date (this would explain translations not being in Launchpad)
- The Checkbox UI strings not being marked for translation (this would explain translations not being in Launchpad)
- The translation domain is not properly set in the code (this would explain translations not being loaded)

I think the first thing to determine is why are the UI strings not in Launchpad.

I'm marking this bug as Critical from the translations side, as Checkbox is an Ubuntu upstream app installed by default, and it needs to keep up to the promise of an OS available in every user's language.

Related branches

David Planella (dpm)
Changed in ubuntu-translations:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi David,

I think the checkbox-gtk UI hasn't changed so we shouldn't have any regressions regarding the work done there.

Could you confirm whether you're using the new qt-based UI instead? To test, the initial welcome screen has a "don't show me this message in the future" checkbox on the bottom right corner.

If so, we could treat this as a "master bug" for making sure the new Qt-based UI both honors existing translations and exposes its internal strings (such as "System Testing" for bug 951025 - it's a string alright, but we don't use gettext apparently for it) so they can be localized.

Thanks!

Changed in checkbox:
status: New → Incomplete
milestone: none → 0.13.5
Revision history for this message
David Planella (dpm) wrote : Re: [Bug 951054] Re: Most of the Checkbox UI is not translatable

Al 09/03/12 20:28, En/na Daniel Manrique ha escrit:
> Hi David,
>
> I think the checkbox-gtk UI hasn't changed so we shouldn't have any
> regressions regarding the work done there.
>
> Could you confirm whether you're using the new qt-based UI instead? To
> test, the initial welcome screen has a "don't show me this message in
> the future" checkbox on the bottom right corner.
>

Hi Daniel,

Thanks for the quick reply.

I'm using whatever Precise is shipping by default, and by looking at the
UI, I'd say it's Qt-based.

Looking at the code, I understand why it's happening: the
'qt/checkbox-qt.ui' is missing from the po/POTFILES.in file.

So if we're going to be shipping the Qt-based UI, we should:

- Remove the '[type: gettext/glade] gtk/checkbox-gtk.ui' line, so that
translators don't waste efforts translating a UI we're not shipping
- Add a line for the qt/checkbox-qt.ui file (*), so that intltool picks
it up, extracts its strings, puts them in the .pot file and they can be
updated in Launchpad.

> If so, we could treat this as a "master bug" for making sure the new Qt-
> based UI both honors existing translations and exposes its internal
> strings (such as "System Testing" for bug 951025 - it's a string
> alright, but we don't use gettext apparently for it) so they can be
> localized.
>

Yeah, it seems existing translations from .py files are indeed loaded,
but none of the Qt ones are.

Cheers,
David.

(*) Having played a bit with it, I'm not too sure how to best add
qt/checkbox-qt.ui to po/POTFILES.in, as intltool does not seem to
support Qt .ui files. I'm sure I've seen a workaround somewhere, perhaps
marking it as a generic XML file, but after a quick test with
'intltool-update -p -g checkbox', it didn't seem to extract the strings
from the file.

> Thanks!
>
>
> ** Changed in: checkbox
> Status: New => Incomplete
>
> ** Changed in: checkbox
> Milestone: None => 0.13.5
>

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella

Changed in checkbox:
status: Incomplete → New
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

The following command will extract all the strings and put them into a ts file:
lupdate-qt4 frontend.pro -ts strings.ts

Another solution would be to compile the ui file into a cpp file and then extract the strings:
uic-qt4 qtfront.ui > ui_qtfront.cpp

the ui_qtfront.cpp is actually auto generated while compiling the qt frontend.

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

Al 09/03/12 21:34, En/na Tiago Salem Herrmann ha escrit:
> The following command will extract all the strings and put them into a ts file:
> lupdate-qt4 frontend.pro -ts strings.ts
>

Thanks Tiago for your suggestion. However, Launchpad uses gettext and
cannot import .ts files.

> Another solution would be to compile the ui file into a cpp file and then extract the strings:
> uic-qt4 qtfront.ui> ui_qtfront.cpp
>

If we cannot use intltool directly, this might be the way to go. So I
guess we could put qt/ui_qtfront.cpp in POTFILES.in and make sure it is
generated before intltool is executed. Then intltool would work as usual
and put the messages from the .cpp file into the checkbox.pot file.

> the ui_qtfront.cpp is actually auto generated while compiling the qt
> frontend.
>

The Ubuntu One guys are also using a Qt frontend, and it might be worth
talking to them to see how they're handling translations and share the
knowledge and practices.

Cheers,
David.

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella

Daniel Manrique (roadmr)
Changed in checkbox:
status: New → Confirmed
importance: Undecided → High
Changed in checkbox (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in checkbox:
milestone: 0.13.5 → 0.13.6
Ara Pulido (ara)
Changed in checkbox:
status: Confirmed → In Progress
assignee: nobody → Daniel Manrique (roadmr)
Daniel Manrique (roadmr)
Changed in checkbox:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.13.6

---------------
checkbox (0.13.6) precise; urgency=low

  * New upstream release (LP: #971889)

  * Automated translation file updates from Launchpad

  [Marc Tardif]
  * Fixed string_to_type conversion in network_bandwidth_test (LP: #954587)

  [Daniel Manrique]
  * Internationalization support in checkbox-qt; updated checkbox.pot file
    (LP: #951054)
 -- Daniel Manrique <email address hidden> Mon, 02 Apr 2012 15:22:05 -0400

Changed in checkbox (Ubuntu):
status: Confirmed → Fix Released
Ara Pulido (ara)
Changed in checkbox:
status: Fix Committed → Fix Released
Gabor Kelemen (kelemeng)
Changed in ubuntu-translations:
status: Triaged → 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.