From 641db73614f86f7fad7e015801a7770e661368db Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 22 Jan 2018 15:19:02 +0200 Subject: [PATCH] Removed unused _encoding and _transalate --- src/bitmessageqt/__init__.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 54a98b14..70b84523 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -11,11 +11,7 @@ except Exception as err: import sys sys.exit() -try: - _encoding = QtGui.QApplication.UnicodeUTF8 -except AttributeError: - logger.exception('QtGui.QApplication.UnicodeUTF8 error', exc_info=True) - +from tr import _translate from addresses import * import shared from bitmessageui import * @@ -70,12 +66,6 @@ except ImportError: get_plugins = False -def _translate(context, text, disambiguation = None, encoding = None, number = None): - if number is None: - return QtGui.QApplication.translate(context, text) - else: - return QtGui.QApplication.translate(context, text, None, QtCore.QCoreApplication.CodecForTr, number) - def change_translation(newlocale): global qmytranslator, qsystranslator try: