String changes

This commit is contained in:
Kovid Goyal 2021-11-10 09:13:35 +05:30
parent d9c1cb9501
commit f7a70971d1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
8 changed files with 14 additions and 10 deletions

View File

@ -2271,7 +2271,7 @@
}, },
{ {
"alpha_3": "arx", "alpha_3": "arx",
"name": "Aruá (Rodonia State)", "name": "Aruá (Rondonia State)",
"scope": "I", "scope": "I",
"type": "L" "type": "L"
}, },

View File

@ -23,7 +23,7 @@ ACTION_MAP = {a.name: a for a in (
Action('remove_classes', _('Remove classes'), _('Remove the specified classes, for e.g:') + ' bold green', _('Space separated class names')), Action('remove_classes', _('Remove classes'), _('Remove the specified classes, for e.g:') + ' bold green', _('Space separated class names')),
Action('wrap', _('Wrap the tag'), _( Action('wrap', _('Wrap the tag'), _(
'Wrap the tag in the specified tag, for example: {0} will wrap the tag in a DIV tag with class {1}').format( 'Wrap the tag in the specified tag, for example: {0} will wrap the tag in a DIV tag with class {1}').format(
'<div class="box">', 'box'), _('A HTML opening tag')), '<div class="box">', 'box'), _('An HTML opening tag')),
Action('remove_attrs', _('Remove attributes'), _( Action('remove_attrs', _('Remove attributes'), _(
'Remove the specified attributes from the tag. Multiple attribute names should be separated by spaces'), _('Space separated attribute names')), 'Remove the specified attributes from the tag. Multiple attribute names should be separated by spaces'), _('Space separated attribute names')),
Action('add_attrs', _('Add attributes'), _('Add the specified attributes, for e.g.:') + ' class="red" name="test"', _('Space separated attribute names')), Action('add_attrs', _('Add attributes'), _('Add the specified attributes, for e.g.:') + ' class="red" name="test"', _('Space separated attribute names')),

View File

@ -322,9 +322,9 @@ class Quickview(QDialog, Ui_Quickview):
def show_item_context_menu(self, point): def show_item_context_menu(self, point):
item = self.items.currentItem() item = self.items.currentItem()
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
self.context_menu.addAction(self.search_icon, _('Search for item in the Tag browser'), self.context_menu.addAction(self.search_icon, _('Find item in the Tag browser'),
partial(self.item_doubleclicked, item)) partial(self.item_doubleclicked, item))
self.context_menu.addAction(self.search_icon, _('Search for item in the library'), self.context_menu.addAction(self.search_icon, _('Find item in the library'),
partial(self.do_search, follow_library_view=False)) partial(self.do_search, follow_library_view=False))
self.context_menu.popup(self.items.mapToGlobal(point)) self.context_menu.popup(self.items.mapToGlobal(point))
self.context_menu = QMenu(self) self.context_menu = QMenu(self)
@ -342,7 +342,7 @@ class Quickview(QDialog, Ui_Quickview):
a = m.addAction(self.select_book_icon, _('Select this book in the library'), a = m.addAction(self.select_book_icon, _('Select this book in the library'),
partial(self.select_book, book_id)) partial(self.select_book, book_id))
a.setEnabled(book_displayed) a.setEnabled(book_displayed)
m.addAction(self.search_icon, _('Search for item in the library'), m.addAction(self.search_icon, _('Find item in the library'),
partial(self.do_search, follow_library_view=False)) partial(self.do_search, follow_library_view=False))
a = m.addAction(self.edit_metadata_icon, _('Edit metadata'), a = m.addAction(self.edit_metadata_icon, _('Edit metadata'),
partial(self.edit_metadata, book_id, follow_library_view=False)) partial(self.edit_metadata, book_id, follow_library_view=False))

View File

@ -202,7 +202,7 @@ class RuleEdit(QWidget): # {{{
if self.query_help_label.isVisible(): if self.query_help_label.isVisible():
if mt == 'css': if mt == 'css':
url = 'https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors' url = 'https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors'
text = _('CSS Selector help') text = _('CSS selector help')
else: else:
url = localize_user_manual_link('https://manual.calibre-ebook.com/xpath.html') url = localize_user_manual_link('https://manual.calibre-ebook.com/xpath.html')
text = _('XPath selector help') text = _('XPath selector help')

View File

@ -8,6 +8,7 @@ __docformat__ = 'restructuredtext en'
from collections import OrderedDict from collections import OrderedDict
from functools import partial from functools import partial
from gettext import pgettext
from qt.core import (QObject, QKeySequence, QAbstractItemModel, QModelIndex, QItemSelectionModel, from qt.core import (QObject, QKeySequence, QAbstractItemModel, QModelIndex, QItemSelectionModel,
Qt, QStyledItemDelegate, QTextDocument, QStyle, pyqtSignal, QFrame, QAbstractItemView, QMenu, Qt, QStyledItemDelegate, QTextDocument, QStyle, pyqtSignal, QFrame, QAbstractItemView, QMenu,
@ -133,7 +134,7 @@ class Manager(QObject): # {{{
'default_keys':tuple(default_keys), 'default_keys':tuple(default_keys),
'persist_shortcut':persist_shortcut} 'persist_shortcut':persist_shortcut}
self.shortcuts[unique_name] = shortcut self.shortcuts[unique_name] = shortcut
group = group if group else _('Miscellaneous') group = group if group else pgettext('keyboard shortcuts', _('Miscellaneous'))
self.groups[group] = self.groups.get(group, []) + [unique_name] self.groups[group] = self.groups.get(group, []) + [unique_name]
def unregister_shortcut(self, unique_name): def unregister_shortcut(self, unique_name):

View File

@ -6,6 +6,7 @@ __license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
from functools import partial from functools import partial
from gettext import pgettext
from qt.core import ( from qt.core import (
Qt, QMenu, QIcon, QDialog, QGridLayout, QLabel, QLineEdit, QComboBox, QFrame, Qt, QMenu, QIcon, QDialog, QGridLayout, QLabel, QLineEdit, QComboBox, QFrame,
@ -322,7 +323,7 @@ class SearchRestrictionMixin:
self.addAction(self.current_search_action) self.addAction(self.current_search_action)
self.keyboard.register_shortcut( self.keyboard.register_shortcut(
'vl-from-current-search', _('Virtual library from current search'), description=_( 'vl-from-current-search', _('Virtual library from current search'), description=_(
'Create a temporary Virtual library from the current search'), group=_('Miscellaneous'), 'Create a temporary Virtual library from the current search'), group=pgettext('search restriction group name', 'Miscellaneous'),
default_keys=('Ctrl+*',), action=self.current_search_action) default_keys=('Ctrl+*',), action=self.current_search_action)
self.search_based_vl_name = None self.search_based_vl_name = None

View File

@ -8,6 +8,7 @@ import posixpath
import sys import sys
import textwrap import textwrap
from collections import Counter, OrderedDict, defaultdict from collections import Counter, OrderedDict, defaultdict
from gettext import pgettext
from functools import partial from functools import partial
from qt.core import ( from qt.core import (
QApplication, QCheckBox, QDialog, QDialogButtonBox, QFont, QFormLayout, QItemSelectionModel, QApplication, QCheckBox, QDialog, QDialogButtonBox, QFont, QFormLayout, QItemSelectionModel,
@ -56,7 +57,7 @@ CATEGORIES = (
('styles', _('Styles'), _('Style-')), ('styles', _('Styles'), _('Style-')),
('images', _('Images'), _('Image-')), ('images', _('Images'), _('Image-')),
('fonts', _('Fonts'), _('Font-')), ('fonts', _('Fonts'), _('Font-')),
('misc', _('Miscellaneous'), _('Misc-')), ('misc', pgettext('edit book file type', 'Miscellaneous'), _('Misc-')),
) )

View File

@ -7,6 +7,7 @@ __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import os import os
from functools import partial from functools import partial
from gettext import pgettext
from itertools import product from itertools import product
from qt.core import ( from qt.core import (
QAction, QApplication, QColor, QDockWidget, QEvent, QHBoxLayout, QIcon, QImage, QAction, QApplication, QColor, QDockWidget, QEvent, QHBoxLayout, QIcon, QImage,
@ -579,7 +580,7 @@ class Main(MainWindow):
self.boss.next_spell_error, 'spell-next', ('F8'), _('Go to next spelling mistake')) self.boss.next_spell_error, 'spell-next', ('F8'), _('Go to next spelling mistake'))
# Miscellaneous actions # Miscellaneous actions
group = _('Miscellaneous') group = pgettext('edit book actions', 'Miscellaneous')
self.action_create_checkpoint = treg( self.action_create_checkpoint = treg(
'marked.png', _('&Create checkpoint'), self.boss.create_checkpoint, 'create-checkpoint', (), _( 'marked.png', _('&Create checkpoint'), self.boss.create_checkpoint, 'create-checkpoint', (), _(
'Create a checkpoint with the current state of the book')) 'Create a checkpoint with the current state of the book'))