use global language for profile manager

This commit is contained in:
Damien Elmes 2012-04-17 17:41:13 +09:00
parent d6145b5cec
commit 0f483a6f59
2 changed files with 5 additions and 3 deletions

View file

@ -31,8 +31,9 @@ class AnkiQt(QMainWindow):
aqt.mw = self
self.app = app
self.pm = profileManager
# use the global language for early init; once a profile is loaded we
# can switch to a user's preferred language
# use the global language for early init; once a profile or the
# profile manager is loaded we can switch to a user's preferred
# language
self.setupLang(force=self.pm.meta['defaultLang'])
# running 2.0 for the first time?
if self.pm.meta['firstRun']:
@ -99,6 +100,7 @@ class AnkiQt(QMainWindow):
self.loadProfile()
def showProfileManager(self):
self.setupLang(force=self.pm.meta['defaultLang'])
d = self.profileDiag = QDialog()
f = self.profileForm = aqt.forms.profiles.Ui_Dialog()
f.setupUi(d)

View file

@ -10,7 +10,7 @@ from aqt.qt import *
import os, sys, time, random, cPickle, shutil, locale, re, atexit
from anki.db import DB
from anki.utils import isMac, isWin, intTime, checksum
from anki.lang import langs, _
from anki.lang import langs
from aqt.utils import showWarning, fontForPlatform
import aqt.forms