[Rigo] RigoServiceController: convert app_name=_("Application") to rawstring

If app_name is unicode decoded, the following code will fail (in pl_PL):

  >>> prepare_markup(_("<b>%s</b>, internal error")) % (_("Application"),)

with a nice UnicodeDecodeError due to implicit bytestring decode.
prepare_markup() output is bytestring, _() output is unicode.
Thanks to Enlik for reporting.
This commit is contained in:
Fabio Erculiani
2012-09-02 20:56:30 +02:00
parent 918a388252
commit 763ece862e
+1 -1
View File
@@ -731,7 +731,7 @@ class RigoServiceController(GObject.Object):
Notify User about Application Management errors.
"""
if app is None:
app_name = _("Application")
app_name = prepare_markup(_("Application"))
else:
app_name = app.name
msg = prepare_markup(_("An <b>unknown error</b> occurred"))