Fix #1036354 (Wrong language first run wizard)

This commit is contained in:
Kovid Goyal 2012-08-14 17:23:37 +05:30
parent e06120bdb7
commit 9260dc8f95

View File

@ -677,6 +677,7 @@ class LibraryPage(QWizardPage, LibraryUI):
from calibre.utils.localization import (available_translations,
get_language, get_lang)
lang = get_lang()
lang = lang.split('_')[0].lower() if lang else lang
if lang is None or lang not in available_translations():
lang = 'en'
def get_esc_lang(l):