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 functools import partial
|
||||||
from qt.core import (
|
from qt.core import (
|
||||||
QActionGroup, QCoreApplication, QFrame, QHBoxLayout, QIcon, QLabel, QLineEdit,
|
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
|
from calibre import human_readable
|
||||||
@ -16,6 +16,7 @@ from calibre.constants import __appname__
|
|||||||
from calibre.gui2.bars import BarsManager
|
from calibre.gui2.bars import BarsManager
|
||||||
from calibre.gui2.search_box import SearchBox2
|
from calibre.gui2.search_box import SearchBox2
|
||||||
from calibre.utils.config_base import tweaks
|
from calibre.utils.config_base import tweaks
|
||||||
|
from calibre.utils.localization import pgettext
|
||||||
|
|
||||||
|
|
||||||
class LocationManager(QObject): # {{{
|
class LocationManager(QObject): # {{{
|
||||||
@ -263,7 +264,7 @@ class SearchBar(QFrame): # {{{
|
|||||||
|
|
||||||
x = parent.highlight_only_button = QToolButton(self)
|
x = parent.highlight_only_button = QToolButton(self)
|
||||||
x.setAutoRaise(True)
|
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.setCursor(Qt.CursorShape.PointingHandCursor)
|
||||||
x.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
|
x.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
|
||||||
x.setIcon(QIcon.ic('arrow-down.png'))
|
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.widgets import BusyCursor
|
||||||
from calibre.gui2.widgets2 import Dialog, RightClickButton
|
from calibre.gui2.widgets2 import Dialog, RightClickButton
|
||||||
from calibre.startup import connect_lambda
|
from calibre.startup import connect_lambda
|
||||||
from calibre.utils.localization import ngettext
|
from calibre.utils.localization import ngettext, pgettext
|
||||||
|
|
||||||
|
|
||||||
def render_timestamp(ts):
|
def render_timestamp(ts):
|
||||||
@ -182,7 +182,7 @@ def friendly_username(user_type, user):
|
|||||||
|
|
||||||
def annotation_title(atype, singular=False):
|
def annotation_title(atype, singular=False):
|
||||||
if singular:
|
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)
|
return {'bookmark': _('Bookmarks'), 'highlight': _('Highlights')}.get(atype, atype)
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,20 +5,20 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import re, time
|
import re
|
||||||
|
import time
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
|
||||||
from qt.core import (
|
from qt.core import (
|
||||||
QComboBox, Qt, QLineEdit, pyqtSlot, QDialog, QEvent,
|
QAction, QApplication, QComboBox, QCompleter, QDialog, QEvent, QIcon, QKeyEvent,
|
||||||
pyqtSignal, QCompleter, QAction, QKeySequence, QTimer,
|
QKeySequence, QLineEdit, Qt, QTimer, pyqtSignal, pyqtSlot,
|
||||||
QIcon, QApplication, QKeyEvent)
|
)
|
||||||
|
|
||||||
from calibre.gui2 import config, question_dialog, gprefs, QT_HIDDEN_CLEAR_ACTION
|
from calibre.gui2 import QT_HIDDEN_CLEAR_ACTION, config, gprefs, question_dialog
|
||||||
from calibre.gui2.widgets import stylesheet_for_lineedit
|
|
||||||
from calibre.gui2.dialogs.saved_search_editor import SavedSearchEditor
|
from calibre.gui2.dialogs.saved_search_editor import SavedSearchEditor
|
||||||
from calibre.gui2.dialogs.search import SearchDialog
|
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.icu import primary_sort_key
|
||||||
|
from calibre.utils.localization import pgettext
|
||||||
from polyglot.builtins import native_string_type, string_or_bytes
|
from polyglot.builtins import native_string_type, string_or_bytes
|
||||||
|
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ class SearchBoxMixin: # {{{
|
|||||||
else:
|
else:
|
||||||
b.setIcon(QIcon.ic('highlight_only_off.png'))
|
b.setIcon(QIcon.ic('highlight_only_off.png'))
|
||||||
if gprefs['search_tool_bar_shows_text']:
|
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)
|
b.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
|
||||||
else:
|
else:
|
||||||
b.setText(None)
|
b.setText(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user