mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Fix book locale changing when OPF edited if OPF contains a country code in addition to a language code
This commit is contained in:
parent
9b8bf25a41
commit
8e77a2469c
@ -927,7 +927,8 @@ class Boss(QObject):
|
|||||||
f.write(ed.data)
|
f.write(ed.data)
|
||||||
if name == container.opf_name:
|
if name == container.opf_name:
|
||||||
container.refresh_mime_map()
|
container.refresh_mime_map()
|
||||||
set_book_locale(container.mi.language)
|
lang = container.opf_xpath('//dc:language/text()') or [self.current_metadata.language]
|
||||||
|
set_book_locale(lang[0])
|
||||||
if container is current_container():
|
if container is current_container():
|
||||||
ed.is_synced_to_container = True
|
ed.is_synced_to_container = True
|
||||||
if name == container.opf_name:
|
if name == container.opf_name:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user