From 77c18442564b42c8f04e073b1f06ac2d8eb253eb Mon Sep 17 00:00:00 2001 From: goodmost Date: Tue, 19 Mar 2024 20:28:18 +0800 Subject: [PATCH] chore: remove repetitive words Signed-off-by: goodmost --- format_docs/pdb/mobi.txt | 2 +- format_docs/pdb/plucker.html | 2 +- manual/gui.rst | 2 +- manual/template_lang.rst | 2 +- src/calibre/gui2/actions/__init__.py | 2 +- src/calibre/gui2/preferences/template_functions.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/format_docs/pdb/mobi.txt b/format_docs/pdb/mobi.txt index a982dcd6d8..0adec2fdd8 100644 --- a/format_docs/pdb/mobi.txt +++ b/format_docs/pdb/mobi.txt @@ -3,7 +3,7 @@ from (https://wiki.mobileread.com/wiki/MOBI) About ----- -MOBI is the format used by the the MobiPocket Reader. It may have a .mobi +MOBI is the format used by the MobiPocket Reader. It may have a .mobi extension or it may have a .prc extension. The extension can be changed by the user to either of the accepted forms. In either case it may be DRM protected or non-DRM. The .prc extension is used because the PalmOS doesn't support any file diff --git a/format_docs/pdb/plucker.html b/format_docs/pdb/plucker.html index 97432d7e67..d6eb8e62cd 100644 --- a/format_docs/pdb/plucker.html +++ b/format_docs/pdb/plucker.html @@ -1279,7 +1279,7 @@ within the anchor name string sequence below. String sequence -A concatenated sequence of NUL-terminated strings, each an anchor name name. The relative +A concatenated sequence of NUL-terminated strings, each an anchor name. The relative location of an anchor name string in the string sequence represents its index into the anchor name data. diff --git a/manual/gui.rst b/manual/gui.rst index d69370bb43..3ee6e742b9 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -383,7 +383,7 @@ You can set only one of the search options `Case sensitive searching` and `Unacc Equality searches are indicated by prefixing the search string with an equals sign (=). For example, the query ``tag:"=science"`` will match `science`, but not `science fiction` or `hard science`. Character variants are significant: `é` doesn't match `e`. -Two variants of equality searches are used for hierarchical items (e.g., A.B.C): hierarchical prefix searches and hierarchical component searches. The first, indicated by a single period after the equals (``=.``) matches the initial parts of a hierarchical item. The second, indicated by two periods after the the equals (``=..``) matches an internal name in the hierarchical item. Examples, using the tag ``History.Military.WWII`` as the value: +Two variants of equality searches are used for hierarchical items (e.g., A.B.C): hierarchical prefix searches and hierarchical component searches. The first, indicated by a single period after the equals (``=.``) matches the initial parts of a hierarchical item. The second, indicated by two periods after the equals (``=..``) matches an internal name in the hierarchical item. Examples, using the tag ``History.Military.WWII`` as the value: * ``tags:"=.History"`` : True. ``History`` is a prefix of the tag. * ``tags:"=.History.Military"`` : True. ``History.Military`` is a prefix of the tag. diff --git a/manual/template_lang.rst b/manual/template_lang.rst index 7650afbf68..78878829c3 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -646,7 +646,7 @@ In `GPM` the functions described in `Single Function Mode` all require an additi * ``raw_field(lookup_name [, optional_default])`` -- returns the metadata field named by ``lookup_name`` without applying any formatting. It evaluates and returns the optional second argument ``optional_default`` if the field's value is undefined (``None``). * ``raw_list(lookup_name, separator)`` -- returns the metadata list named by ``lookup_name`` without applying any formatting or sorting, with the items separated by separator. -* ``re_group(value, pattern [, template_for_group]*)`` -- return a string made by applying the regular expression pattern to ``value`` and replacing each matched instance with the the value returned by the corresponding template. In :ref:`Template Program Mode `, like for the ``template`` and the ``eval`` functions, you use ``[[`` for ``{`` and ``]]`` for ``}``. +* ``re_group(value, pattern [, template_for_group]*)`` -- return a string made by applying the regular expression pattern to ``value`` and replacing each matched instance with the value returned by the corresponding template. In :ref:`Template Program Mode `, like for the ``template`` and the ``eval`` functions, you use ``[[`` for ``{`` and ``]]`` for ``}``. The following example looks for a series with more than one word and uppercases the first word:: diff --git a/src/calibre/gui2/actions/__init__.py b/src/calibre/gui2/actions/__init__.py index 4e61ebb765..8510454af7 100644 --- a/src/calibre/gui2/actions/__init__.py +++ b/src/calibre/gui2/actions/__init__.py @@ -20,7 +20,7 @@ from polyglot.builtins import string_or_bytes def toolbar_widgets_for_action(gui, action): - # Search the the toolbars for the widget associated with an action, passing + # Search the toolbars for the widget associated with an action, passing # them to the caller for further processing for x in gui.bars_manager.bars: try: diff --git a/src/calibre/gui2/preferences/template_functions.py b/src/calibre/gui2/preferences/template_functions.py index ef6d37b655..097e4f4621 100644 --- a/src/calibre/gui2/preferences/template_functions.py +++ b/src/calibre/gui2/preferences/template_functions.py @@ -303,7 +303,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): return True if self.argument_count.value() == 0: if not question_dialog(self.gui, _('Template functions'), - _('Setting argument count to to zero means that this ' + _('Setting argument count to zero means that this ' 'function cannot be used in single function mode. ' 'Is this OK?'), det_msg='',