transition error strings and provider labels to be i18n aware
To me these are the less obvious localization features in leap_client. While the strings directly in the app seem to have a straightforward conversion (QApplication.translate or QObject.translate, whatever it's best, maybe wrapped in some utility function of ours), these two cases are somehow more indirect:
-
We're using the .usermessage attribute in LeapExceptions to make user-facing messages in error_check loops (during initialization, which go in Errordialogs, and in first-run-wizard, which go integrated in the wizard pages). Study the .translate() and locales mechanism, and come up with a solution that fits.(maybe something like adding a .tr method to the base exceptions or something similar).
-
Provider Labels: in files like provider.json, we get a json-coded localization structure (something like {"en": "fooish", "es": "baar"}. This can be casted to any python-object that we want (it's using a class called PluggableConfig that I wrote) so we could write a class that implements a .tr method, or that plays nice with it (???)
(from redmine: created on 2012-09-26, closed on 2013-01-08, blocks #911 (closed), precedes #663 (closed))