From 931cdf35f5a174a04a31668d8155acaa18b2f982 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 24 Mar 2016 14:04:00 +0100 Subject: [PATCH] "All accounts" internationalisation fix --- src/bitmessageqt/foldertree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index f9ab7717..c815b421 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -168,7 +168,7 @@ class Ui_AddressWidget(QtGui.QTreeWidgetItem, AccountMixin, SettingsMixin): def _getLabel(self): if self.address is None: - return unicode(str(QtGui.QApplication.translate("MainWindow", "All accounts")), 'utf-8') + return unicode(QtGui.QApplication.translate("MainWindow", "All accounts").toUtf8(), 'utf-8', 'ignore') else: try: return unicode(shared.config.get(self.address, 'label'), 'utf-8', 'ignore') @@ -196,7 +196,7 @@ class Ui_AddressWidget(QtGui.QTreeWidgetItem, AccountMixin, SettingsMixin): return self._getLabel() + self._getAddressBracket(False) elif role == QtCore.Qt.DecorationRole: if self.address is None: - return avatarize(self._getLabel()) + return avatarize(self._getLabel().encode('utf8')) else: return avatarize(self.address) elif role == QtCore.Qt.FontRole: @@ -476,4 +476,4 @@ class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem): class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem): def __init__ (self, address, label, type): Ui_AddressBookWidgetItem.__init__(self, address, type) - self.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) \ No newline at end of file + self.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)