diff --git a/src/calibre/gui2/viewer/web_view.py b/src/calibre/gui2/viewer/web_view.py index 7bc9371137..4dd85ebebf 100644 --- a/src/calibre/gui2/viewer/web_view.py +++ b/src/calibre/gui2/viewer/web_view.py @@ -19,7 +19,7 @@ from PyQt5.QtWebEngineWidgets import ( from calibre import as_unicode, prints from calibre.constants import ( - FAKE_HOST, FAKE_PROTOCOL, __version__, is_running_from_develop + FAKE_HOST, FAKE_PROTOCOL, __version__, is_running_from_develop, isosx, iswindows ) from calibre.ebooks.metadata.book.base import field_metadata from calibre.ebooks.oeb.polish.utils import guess_type @@ -172,7 +172,8 @@ def create_profile(): ans = getattr(create_profile, 'ans', None) if ans is None: ans = QWebEngineProfile(QApplication.instance()) - ua = 'calibre-viewer ' + __version__ + osname = 'windows' if iswindows else ('macos' if isosx else 'linux') + ua = 'calibre-viewer {} {}'.format(__version__, osname) ans.setHttpUserAgent(ua) if is_running_from_develop: from calibre.utils.rapydscript import compile_viewer diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 23152f1410..9e08f65582 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -78,7 +78,9 @@ def show_controls_help(): div = div.nextSibling safe_set_inner_html(div, _('Use the PageUp/PageDn or Arrow keys to turn pages')) div = div.nextSibling - safe_set_inner_html(div, _('Press the Esc key or right click to show the viewer controls')) + safe_set_inner_html(div, _('Press the Esc key or {} click to show the viewer controls').format( + 'control' if 'macos' in window.navigator.userAgent else _('right') + )) div = div.nextSibling safe_set_inner_html(div, _('Press any key to continue…')) focus()