From fdc171a0acc81c367eb0e626d5f3a41d8f48814b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 Sep 2010 13:55:02 -0600 Subject: [PATCH] Automatically enable the Douban metadata download plugins if the user choose chinese as the interface language in the welcome wizard --- src/calibre/gui2/wizard/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/calibre/gui2/wizard/__init__.py b/src/calibre/gui2/wizard/__init__.py index f3234d48d5..8460210cd0 100644 --- a/src/calibre/gui2/wizard/__init__.py +++ b/src/calibre/gui2/wizard/__init__.py @@ -584,6 +584,13 @@ class LibraryPage(QWizardPage, LibraryUI): qt_app.load_translations() self.emit(SIGNAL('retranslate()')) 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): dir = choose_dir(self, 'database location dialog',