Browse Source

call set_language before QApplication. fixes #400

283
ThomasV 11 years ago
parent
commit
bcb18bbde4
  1. 14
      gui/qt/__init__.py
  2. 2
      gui/qt/main_window.py

14
gui/qt/__init__.py

@ -16,10 +16,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys, time, datetime, re, threading import sys
from electrum.i18n import _, set_language import time
from electrum.util import print_error, print_msg import datetime
from electrum.plugins import run_hook import re
import threading
import os.path, json, ast, traceback import os.path, json, ast, traceback
import shutil import shutil
import signal import signal
@ -33,8 +34,10 @@ from PyQt4.QtGui import *
from PyQt4.QtCore import * from PyQt4.QtCore import *
import PyQt4.QtCore as QtCore import PyQt4.QtCore as QtCore
from electrum.i18n import _, set_language
from electrum.util import print_error, print_msg
from electrum.plugins import run_hook
from electrum import WalletStorage, Wallet from electrum import WalletStorage, Wallet
from electrum.i18n import _
from electrum.bitcoin import MIN_RELAY_TX_FEE from electrum.bitcoin import MIN_RELAY_TX_FEE
try: try:
@ -62,6 +65,7 @@ class OpenFileEventFilter(QObject):
class ElectrumGui: class ElectrumGui:
def __init__(self, config, network, app=None): def __init__(self, config, network, app=None):
set_language(config.get('language'))
self.network = network self.network = network
self.config = config self.config = config
self.windows = [] self.windows = []

2
gui/qt/main_window.py

@ -134,8 +134,6 @@ class ElectrumWindow(QMainWindow):
self.num_zeros = int(config.get('num_zeros',0)) self.num_zeros = int(config.get('num_zeros',0))
self.invoices = {} self.invoices = {}
set_language(config.get('language'))
self.completions = QStringListModel() self.completions = QStringListModel()
self.tabs = tabs = QTabWidget(self) self.tabs = tabs = QTabWidget(self)

Loading…
Cancel
Save