mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
String changes
This commit is contained in:
parent
a96272c678
commit
bf53bbf07a
@ -715,7 +715,7 @@ class ShortcutConfig(QWidget): # {{{
|
|||||||
self.search.search_done(True)
|
self.search.search_done(True)
|
||||||
if not idx.isValid():
|
if not idx.isValid():
|
||||||
info_dialog(self, _('No matches'),
|
info_dialog(self, _('No matches'),
|
||||||
_('Could not find any shortcuts matching %s')%query,
|
_('Could not find any shortcuts matching <i>{}</i>').format(prepare_string_for_xml(query)),
|
||||||
show=True, show_copy_button=False)
|
show=True, show_copy_button=False)
|
||||||
return
|
return
|
||||||
self.highlight_index(idx)
|
self.highlight_index(idx)
|
||||||
|
@ -826,7 +826,7 @@ class CreateNewCustomColumn:
|
|||||||
_("You cannot specify is_multiple for the datatype %s") % datatype)
|
_("You cannot specify is_multiple for the datatype %s") % datatype)
|
||||||
if not isinstance(display, dict):
|
if not isinstance(display, dict):
|
||||||
return(self.Result.INVALID_DISPLAY,
|
return(self.Result.INVALID_DISPLAY,
|
||||||
_("The display parameter must be a python dict"))
|
_("The display parameter must be a Python dict"))
|
||||||
self.created_count += 1
|
self.created_count += 1
|
||||||
self.custcols[lookup_name] = {
|
self.custcols[lookup_name] = {
|
||||||
'label': lookup_name,
|
'label': lookup_name,
|
||||||
|
@ -6,25 +6,24 @@ import textwrap
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from qt.core import (
|
|
||||||
QAbstractItemView, QAbstractListModel, QApplication, QComboBox, QDialog,
|
|
||||||
QDialogButtonBox, QFont, QGridLayout, QGroupBox, QIcon, QItemSelectionModel,
|
|
||||||
QLabel, QListView, QMenu, QModelIndex, QPlainTextEdit, QPushButton, QSizePolicy,
|
|
||||||
QSplitter, Qt, QVBoxLayout, QWidget, pyqtSignal
|
|
||||||
)
|
|
||||||
|
|
||||||
from calibre import isbytestring
|
from calibre import isbytestring, prepare_string_for_xml
|
||||||
from calibre.gui2 import error_dialog, info_dialog
|
from calibre.gui2 import error_dialog, info_dialog
|
||||||
from calibre.gui2.preferences import AbortCommit, ConfigWidgetBase, test_widget
|
from calibre.gui2.preferences import AbortCommit, ConfigWidgetBase, test_widget
|
||||||
from calibre.gui2.search_box import SearchBox2
|
from calibre.gui2.search_box import SearchBox2
|
||||||
from calibre.gui2.widgets import PythonHighlighter
|
from calibre.gui2.widgets import PythonHighlighter
|
||||||
from calibre.utils.config_base import (
|
from calibre.utils.config_base import (default_tweaks_raw, exec_tweaks,
|
||||||
default_tweaks_raw, exec_tweaks, normalize_tweak, read_custom_tweaks,
|
normalize_tweak, read_custom_tweaks,
|
||||||
write_custom_tweaks
|
write_custom_tweaks)
|
||||||
)
|
|
||||||
from calibre.utils.icu import lower
|
from calibre.utils.icu import lower
|
||||||
from calibre.utils.search_query_parser import ParseException, SearchQueryParser
|
from calibre.utils.search_query_parser import ParseException, SearchQueryParser
|
||||||
from polyglot.builtins import iteritems
|
from polyglot.builtins import iteritems
|
||||||
|
from qt.core import (QAbstractItemView, QAbstractListModel, QApplication,
|
||||||
|
QComboBox, QDialog, QDialogButtonBox, QFont, QGridLayout,
|
||||||
|
QGroupBox, QIcon, QItemSelectionModel, QLabel, QListView,
|
||||||
|
QMenu, QModelIndex, QPlainTextEdit, QPushButton,
|
||||||
|
QSizePolicy, QSplitter, Qt, QVBoxLayout, QWidget,
|
||||||
|
pyqtSignal)
|
||||||
|
|
||||||
ROOT = QModelIndex()
|
ROOT = QModelIndex()
|
||||||
|
|
||||||
@ -557,7 +556,7 @@ class ConfigWidget(ConfigWidgetBase):
|
|||||||
self.search.search_done(True)
|
self.search.search_done(True)
|
||||||
if not idx.isValid():
|
if not idx.isValid():
|
||||||
info_dialog(self, _('No matches'),
|
info_dialog(self, _('No matches'),
|
||||||
_('Could not find any shortcuts matching %s')%query,
|
_('Could not find any tweaks matching <i>{}</i>').format(prepare_string_for_xml(query)),
|
||||||
show=True, show_copy_button=False)
|
show=True, show_copy_button=False)
|
||||||
return
|
return
|
||||||
self.highlight_index(idx)
|
self.highlight_index(idx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user