mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix various User Manual and translation build warnings
This commit is contained in:
parent
9c3b49c9ff
commit
4d88d05621
@ -191,7 +191,7 @@ def render_options(cmd, groups, options_header=True, add_program=True):
|
||||
|
||||
def mark_options(raw):
|
||||
raw = re.sub(r'(\s+)--(\s+)', r'\1``--``\2', raw)
|
||||
raw = re.sub(r'(--[a-zA-Z0-9_=,-]+)', r':option:`\1`', raw)
|
||||
raw = re.sub(r'(--[|()a-zA-Z0-9_=,-]+)', r':option:`\1`', raw)
|
||||
return raw
|
||||
|
||||
def cli_docs(app):
|
||||
|
@ -492,7 +492,7 @@ class Source(Plugin):
|
||||
def get_book_urls(self, identifiers):
|
||||
'''
|
||||
Override this method if you would like to return multiple urls for this book.
|
||||
Return a list of 3-tuples. By default this method simply calls :method:`get_book_url`.
|
||||
Return a list of 3-tuples. By default this method simply calls :func:`get_book_url`.
|
||||
'''
|
||||
data = self.get_book_url(identifiers)
|
||||
if data is None:
|
||||
|
@ -398,7 +398,7 @@ def register_keyboard_shortcuts(gui=None, finalize=False):
|
||||
for application in applications:
|
||||
text = entry_to_icon_text(application, only_text=True)
|
||||
t = _('cover image') if filetype.upper() == 'COVER_IMAGE' else filetype.upper()
|
||||
name = _('Open %s files with %s') % (t, text)
|
||||
name = _('Open {0} files with {1}').format(t, text)
|
||||
ac = QAction(gui)
|
||||
unique_name = application['uuid']
|
||||
ac.triggered.connect(partial(gui.open_with_action_triggerred, filetype, application))
|
||||
|
@ -925,7 +925,7 @@ class CSSRulesModel(QAbstractItemModel):
|
||||
if isinstance(entry, CSSEntry):
|
||||
return '[%{}d] %s'.format(self.num_size) % (entry.count, entry.rule.selector)
|
||||
elif isinstance(entry, CSSFileMatch):
|
||||
return _('%s [%d elements]') % (entry.file_name, len(entry.locations))
|
||||
return _('{0} [{1} elements]').format(entry.file_name, len(entry.locations))
|
||||
elif isinstance(entry, MatchLocation):
|
||||
return '%s @ %s' % (entry.tag, entry.sourceline)
|
||||
elif role == Qt.UserRole:
|
||||
@ -1143,7 +1143,7 @@ class ClassesModel(CSSRulesModel):
|
||||
if isinstance(entry, ClassEntry):
|
||||
return '[%{}d] %s'.format(self.num_size) % (entry.num_of_matches, entry.cls)
|
||||
elif isinstance(entry, ClassFileMatch):
|
||||
return _('%s [%d elements]') % (entry.file_name, len(entry.class_elements))
|
||||
return _('{0} [{1} elements]').format(entry.file_name, len(entry.class_elements))
|
||||
elif isinstance(entry, ClassElement):
|
||||
return '%s @ %s' % (entry.tag, entry.line_number)
|
||||
elif isinstance(entry, CSSRule):
|
||||
|
Loading…
x
Reference in New Issue
Block a user