Automatically enable the Douban metadata download plugins if the user choose chinese as the interface language in the welcome wizard

This commit is contained in:
Kovid Goyal 2010-09-28 13:55:02 -06:00
parent a0382a8d86
commit fdc171a0ac

View File

@ -584,6 +584,13 @@ class LibraryPage(QWizardPage, LibraryUI):
qt_app.load_translations() qt_app.load_translations()
self.emit(SIGNAL('retranslate()')) self.emit(SIGNAL('retranslate()'))
self.init_languages() self.init_languages()
try:
if prefs['language'].lower().startswith('zh'):
from calibre.customize.ui import enable_plugin
for name in ('Douban Books', 'Douban.com covers'):
enable_plugin(name)
except:
pass
def change(self): def change(self):
dir = choose_dir(self, 'database location dialog', dir = choose_dir(self, 'database location dialog',