Merge lp:~mvo/software-center/lp967036 into lp:software-center
Status: | Merged |
---|---|
Merged at revision: | 2966 |
Proposed branch: | lp:~mvo/software-center/lp967036 |
Merge into: | lp:software-center |
Diff against target: |
99 lines (+24/-9) 3 files modified
softwarecenter/hw.py (+2/-2) softwarecenter/ui/gtk3/widgets/labels.py (+9/-5) test/gtk3/test_widgets.py (+13/-2) |
To merge this branch: | bzr merge lp:~mvo/software-center/lp967036 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Lasker (community) | Approve | ||
Review via email: mp+101694@code.launchpad.net |
Description of the change
This fixes the unicode/str crash in #967036 and adds a regression test. Its a rather unfortunate str/unicode
python issue we are hitting here. We use the utf8 encoded summary string as input for %s but we can't specify
a encoding in %s AFAIK so python will use "ascii" when calling str() on it and that fails. So we first need
to convert it back to unicode :/ The alternative would be to return a unicode translated object from get_hw_
To test install language-
$ LANGUAGE=ru ./software-center darwinia
then you should see under the details that it requires a mouse ("мышь" in russia apparently :)
I also made the label selectable to be consistent with the other labels.
Nice unicode magic! And thanks for the unit test. :)
Thank you, Michael!