Comment 2 for bug 1176695

Revision history for this message
Daniel Manrique (roadmr) wrote :

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:
RESTART_TEXT="Restart"
CONTINUE_TEXT="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:
RESTART_TEXT=_("Restart")
CONTINUE_TEXT=_("Continue")
RESET_TEXT=_("Reset")

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.