mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
string changes
This commit is contained in:
parent
14a64a239c
commit
88320477ad
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
from functools import partial
|
||||
from qt.core import (
|
||||
QActionGroup, QCoreApplication, QFrame, QHBoxLayout, QIcon, QLabel, QLineEdit,
|
||||
QMenu, QObject, QSizePolicy, Qt, QToolButton, QVBoxLayout, QWidget, pyqtSignal
|
||||
QMenu, QObject, QSizePolicy, Qt, QToolButton, QVBoxLayout, QWidget, pyqtSignal,
|
||||
)
|
||||
|
||||
from calibre import human_readable
|
||||
@ -16,6 +16,7 @@ from calibre.constants import __appname__
|
||||
from calibre.gui2.bars import BarsManager
|
||||
from calibre.gui2.search_box import SearchBox2
|
||||
from calibre.utils.config_base import tweaks
|
||||
from calibre.utils.localization import pgettext
|
||||
|
||||
|
||||
class LocationManager(QObject): # {{{
|
||||
@ -263,7 +264,7 @@ class SearchBar(QFrame): # {{{
|
||||
|
||||
x = parent.highlight_only_button = QToolButton(self)
|
||||
x.setAutoRaise(True)
|
||||
x.setText(_('Highlight'))
|
||||
x.setText(pgettext('mark books matching search result instead of filtering them', 'Highlight'))
|
||||
x.setCursor(Qt.CursorShape.PointingHandCursor)
|
||||
x.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
|
||||
x.setIcon(QIcon.ic('arrow-down.png'))
|
||||
|
@ -30,7 +30,7 @@ from calibre.gui2.viewer.widgets import ResultsDelegate, SearchBox
|
||||
from calibre.gui2.widgets import BusyCursor
|
||||
from calibre.gui2.widgets2 import Dialog, RightClickButton
|
||||
from calibre.startup import connect_lambda
|
||||
from calibre.utils.localization import ngettext
|
||||
from calibre.utils.localization import ngettext, pgettext
|
||||
|
||||
|
||||
def render_timestamp(ts):
|
||||
@ -182,7 +182,7 @@ def friendly_username(user_type, user):
|
||||
|
||||
def annotation_title(atype, singular=False):
|
||||
if singular:
|
||||
return {'bookmark': _('Bookmark'), 'highlight': _('Highlight')}.get(atype, atype)
|
||||
return {'bookmark': _('Bookmark'), 'highlight': pgettext('type of annotation', 'Highlight')}.get(atype, atype)
|
||||
return {'bookmark': _('Bookmarks'), 'highlight': _('Highlights')}.get(atype, atype)
|
||||
|
||||
|
||||
|
@ -5,20 +5,20 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import re, time
|
||||
import re
|
||||
import time
|
||||
from functools import partial
|
||||
|
||||
|
||||
from qt.core import (
|
||||
QComboBox, Qt, QLineEdit, pyqtSlot, QDialog, QEvent,
|
||||
pyqtSignal, QCompleter, QAction, QKeySequence, QTimer,
|
||||
QIcon, QApplication, QKeyEvent)
|
||||
QAction, QApplication, QComboBox, QCompleter, QDialog, QEvent, QIcon, QKeyEvent,
|
||||
QKeySequence, QLineEdit, Qt, QTimer, pyqtSignal, pyqtSlot,
|
||||
)
|
||||
|
||||
from calibre.gui2 import config, question_dialog, gprefs, QT_HIDDEN_CLEAR_ACTION
|
||||
from calibre.gui2.widgets import stylesheet_for_lineedit
|
||||
from calibre.gui2 import QT_HIDDEN_CLEAR_ACTION, config, gprefs, question_dialog
|
||||
from calibre.gui2.dialogs.saved_search_editor import SavedSearchEditor
|
||||
from calibre.gui2.dialogs.search import SearchDialog
|
||||
from calibre.gui2.widgets import stylesheet_for_lineedit
|
||||
from calibre.utils.icu import primary_sort_key
|
||||
from calibre.utils.localization import pgettext
|
||||
from polyglot.builtins import native_string_type, string_or_bytes
|
||||
|
||||
|
||||
@ -401,7 +401,7 @@ class SearchBoxMixin: # {{{
|
||||
else:
|
||||
b.setIcon(QIcon.ic('highlight_only_off.png'))
|
||||
if gprefs['search_tool_bar_shows_text']:
|
||||
b.setText(_('Highlight'))
|
||||
b.setText(pgettext('mark books matching search result instead of filtering them', 'Highlight'))
|
||||
b.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
|
||||
else:
|
||||
b.setText(None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user