mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 09:13:25 +02:00
Edit Book: Fix choosing default dictionary based on language tag in the OPF ignoring the country code
This commit is contained in:
parent
bf7b19f3c6
commit
ebf87dada1
1 changed files with 2 additions and 1 deletions
|
|
@ -292,7 +292,8 @@ def book_opened(self, job):
|
|||
set_current_container(container)
|
||||
with BusyCursor():
|
||||
self.current_metadata = self.gui.current_metadata = container.mi
|
||||
set_book_locale(self.current_metadata.language)
|
||||
lang = container.opf_xpath('//dc:language/text()') or [self.current_metadata.language]
|
||||
set_book_locale(lang[0])
|
||||
self.global_undo.open_book(container)
|
||||
self.gui.update_window_title()
|
||||
self.gui.file_list.current_edited_name = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue