mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1930737 [[Enhancement] Warning is not translated](https://bugs.launchpad.net/calibre/+bug/1930737)
This commit is contained in:
parent
eea1a02373
commit
db1b00a158
@ -25,7 +25,6 @@ from __python__ import hash_literals, bound_methods
|
||||
|
||||
import traceback
|
||||
from elementmaker import E
|
||||
from gettext import gettext as _
|
||||
|
||||
from dom import set_css
|
||||
from read_book.cfi import (
|
||||
@ -884,10 +883,7 @@ def resize_done():
|
||||
|
||||
def auto_scroll_action(action):
|
||||
if action is 'toggle':
|
||||
get_boss().send_message('error', title=_('No auto scroll in paged mode'), msg=_(
|
||||
'Switch to flow mode (Viewer preferences->Page layout) to enable auto'
|
||||
' scrolling'), is_non_critical=True
|
||||
)
|
||||
get_boss().send_message('error', errkey='no-auto-scroll-in-paged-mode', is_non_critical=True)
|
||||
return False
|
||||
|
||||
|
||||
|
@ -779,10 +779,15 @@ class View:
|
||||
|
||||
def on_iframe_error(self, data):
|
||||
title = data.title or _('There was an error processing the book')
|
||||
msg = _('Unknown error')
|
||||
if data.errkey:
|
||||
if data.errkey is 'no-auto-scroll-in-paged-mode':
|
||||
title = _('No auto scroll in paged mode')
|
||||
msg = _('Switch to flow mode (Viewer preferences->Page layout) to enable auto scrolling')
|
||||
if data.is_non_critical:
|
||||
warning_dialog(title, data.msg, data.details, on_close=ui_operations.focus_iframe)
|
||||
warning_dialog(title, msg, data.details, on_close=ui_operations.focus_iframe)
|
||||
return
|
||||
ui_operations.show_error(title, data.msg, data.details)
|
||||
ui_operations.show_error(title, msg, data.details)
|
||||
|
||||
def apply_color_scheme(self):
|
||||
self.current_color_scheme = ans = resolve_color_scheme()
|
||||
|
Loading…
x
Reference in New Issue
Block a user