Window with two untranslated and untranslatable buttons
Bug #1176695 reported by
londumas
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox |
Fix Released
|
High
|
Daniel Manrique | ||
Ubuntu Translations |
Fix Released
|
Low
|
Unassigned |
Bug Description
1/
Description: Ubuntu 13.04
Release: 13.04
2/
checkbox:
Installé : 0.15.5
Candidat : 0.15.5
Table de version :
*** 0.15.5 0
500 http://
100 /var/lib/
3/ - 4/
After having left an ongoing test, when you come back, you have a window asking you if you want to restart, return or continue.
Two of these buttons are untranslated (in French) and seem not to be in the Launchpad translatable list.
(see picture)
Related branches
lp:~roadmr/checkbox/1176695-translatable-buttons
- Zygmunt Krynicki (community): Approve
-
Diff: 37 lines (+9/-0)2 files modifiedcheckbox/user_interface.py (+5/-0)
debian/changelog (+4/-0)
Changed in checkbox: | |
status: | Triaged → In Progress |
Changed in checkbox: | |
status: | In Progress → Fix Committed |
Changed in checkbox: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-translations: | |
status: | Confirmed → Fix Released |
importance: | Undecided → Low |
To post a comment you must log in.
Hello, thanks for reporting this!
These buttons *should* be translatable. However, due to the somewhat convoluted way we access the translations, in practice the strings aren't added to the catalog. The extraction script looks for text wrapped in the gettext call, so for instance this will get picked up for the catalog:
_("Restart")
However, what we do is something like this: TEXT="Restart" TEXT="Continue"
RESTART_
CONTINUE_
RESET_TEXT="Reset"
then:
text = [RESTART_TEXT, CONTINUE_TEXT, RESET_TEXT]
translated_text = [_(txt) for txt in text]
The extraction script is then not clever enough to run the list comprehension to figure out it should extract the strings.
The solution will most likely involve doing something like: TEXT=_( "Restart" ) TEXT=_( "Continue" ) _("Reset" )
RESTART_
CONTINUE_
RESET_TEXT=
However, care must be taken not to simply do this, since we need to consider that the Qt user interface sends unicode-encoded strings and this needs to be handled carefully. Specifically, look at checkbox commit 1364 and subcommit 1362.1.3 under that, to understand what was done and the behavior we need to keep.