From 7e853d6260df1c23263b794afd167024af8be673 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 23 Apr 2017 21:33:13 +0530 Subject: [PATCH] String changes --- manual/conversion.rst | 2 +- manual/diff.rst | 2 +- manual/edit.rst | 14 +++++++------- manual/faq.rst | 2 +- manual/gui.rst | 4 ++-- manual/metadata.rst | 2 +- manual/news.rst | 2 +- manual/news_recipe.rst | 2 +- manual/sub_groups.rst | 2 +- src/calibre/customize/__init__.py | 2 +- src/calibre/customize/conversion.py | 2 +- src/calibre/devices/kobo/kobotouch_config.py | 4 ++-- .../ebooks/conversion/plugins/snb_output.py | 5 +++-- src/calibre/ebooks/covers.py | 8 ++++++-- src/calibre/gui2/tweak_book/widgets.py | 4 ++-- src/calibre/web/feeds/news.py | 2 +- src/pyj/book_list/views.pyj | 4 ++-- src/pyj/read_book/globals.pyj | 4 ++-- 18 files changed, 36 insertions(+), 31 deletions(-) diff --git a/manual/conversion.rst b/manual/conversion.rst index 6d0e42ddd6..9b4d71a543 100644 --- a/manual/conversion.rst +++ b/manual/conversion.rst @@ -606,7 +606,7 @@ Format specific tips Here you will find tips specific to the conversion of particular formats. Options specific to particular format, whether input or output are available in the conversion dialog under their own section, for example -`TXT Input` or `EPUB Output`. +`TXT input` or `EPUB output`. Convert Microsoft Word documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/manual/diff.rst b/manual/diff.rst index 14b7da3fc5..f96b107c1d 100644 --- a/manual/diff.rst +++ b/manual/diff.rst @@ -1,6 +1,6 @@ .. _diff: -Comparing E-books +Comparing e-books ======================== calibre includes an integrated e-book comparison tool that can be used to see diff --git a/manual/edit.rst b/manual/edit.rst index c5fa049fa0..6bd88f0c16 100644 --- a/manual/edit.rst +++ b/manual/edit.rst @@ -1,6 +1,6 @@ .. _edit: -Editing E-books +Editing e-books ======================== calibre has an integrated e-book editor that can be used to edit books in the @@ -507,14 +507,14 @@ the :guilabel:`Compare` button. The :guilabel:`Revert to` button restores the book to the selected checkpoint, undoing all changes since that checkpoint was created. -The Live Preview panel +The Live preview panel ------------------------ .. image:: images/live-preview.png - :alt: The Live Preview Panel + :alt: The Live preview Panel :class: float-left-img -The :guilabel:`File Preview` gives you an overview of the various files inside +The :guilabel:`File preview` gives you an overview of the various files inside The live preview panel shows you the changes you are making live (with a second or two of delay). As you edit HTML or CSS files, the preview panel is updated automatically to reflect your changes. As you move the cursor around in the @@ -572,7 +572,7 @@ The Live CSS panel --------------------- .. image:: images/live_css.png - :alt: The Live Preview Panel + :alt: The Live CSS Panel :class: float-left-img @@ -596,12 +596,12 @@ You can enable the Live CSS panel via :guilabel:`View->Live CSS`.
-Miscellaneous Tools +Miscellaneous tools ---------------------- There are a few more tools that can be useful while you edit the book. -The Table of Contents View +The Table of Contents view ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Table of Contents view shows you the current table of contents in the book. diff --git a/manual/faq.rst b/manual/faq.rst index 6d5281529c..8877e57923 100644 --- a/manual/faq.rst +++ b/manual/faq.rst @@ -7,7 +7,7 @@ Frequently Asked Questions :depth: 1 :local: -Ebook Format Conversion +Ebook format conversion ------------------------- .. contents:: Contents :depth: 1 diff --git a/manual/gui.rst b/manual/gui.rst index 50139c8dd4..7ceb7bfeb0 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -301,7 +301,7 @@ Many operations, such as adding books, deleting, viewing, etc., are context sens .. _search_sort: -Search & Sort +Search & sort --------------- .. image:: images/search_sort.png :align: center @@ -324,7 +324,7 @@ The Search & Sort section allows you to perform several powerful actions on your .. _search_interface: -The Search Interface +The search interface --------------------- You can search all the metadata by entering search terms in the search bar. Searches are case insensitive. For example:: diff --git a/manual/metadata.rst b/manual/metadata.rst index 09ca509dec..ea59ab85d9 100644 --- a/manual/metadata.rst +++ b/manual/metadata.rst @@ -1,6 +1,6 @@ .. _metadata: -Editing Ebook Metadata +Editing e-book metadata ======================== .. contents:: Contents diff --git a/manual/news.rst b/manual/news.rst index f054c2b3c1..8465895cbd 100644 --- a/manual/news.rst +++ b/manual/news.rst @@ -324,7 +324,7 @@ Further reading To learn more about writing advanced recipes using some of the facilities, available in ``BasicNewsRecipe`` you should consult the following sources: - :ref:`API Documentation ` + :ref:`API documentation ` Documentation of the ``BasicNewsRecipe`` class and all its important methods and fields. `BasicNewsRecipe `_ diff --git a/manual/news_recipe.rst b/manual/news_recipe.rst index 42088c3270..edd772a2ee 100644 --- a/manual/news_recipe.rst +++ b/manual/news_recipe.rst @@ -1,6 +1,6 @@ .. _news_recipe: -API Documentation for recipes +API documentation for recipes =============================== .. module:: calibre.web.feeds.news diff --git a/manual/sub_groups.rst b/manual/sub_groups.rst index 41012be16a..3e967198d7 100644 --- a/manual/sub_groups.rst +++ b/manual/sub_groups.rst @@ -60,7 +60,7 @@ You create the custom column in the usual way, using Preferences -> Add your own .. image:: images/sg_cc.jpg :align: center -Then after restarting calibre, you must tell calibre that the column is to be treated as a hierarchy. Go to :guilabel:`Preferences -> Look and Feel -> Tag browser` and enter the lookup name "#genre" into the "Categories with hierarchical items" box. Press Apply, and you are done with setting up. +Then after restarting calibre, you must tell calibre that the column is to be treated as a hierarchy. Go to :guilabel:`Preferences -> Look & feel -> Tag browser` and enter the lookup name "#genre" into the "Categories with hierarchical items" box. Press :guilabel:`Apply`, and you are done with setting up. .. image:: images/sg_pref.png :align: center diff --git a/src/calibre/customize/__init__.py b/src/calibre/customize/__init__.py index 8fc38ea23a..8e1bc4c3fa 100644 --- a/src/calibre/customize/__init__.py +++ b/src/calibre/customize/__init__.py @@ -803,7 +803,7 @@ class LibraryClosedPlugin(Plugin): # {{{ when the library is changed, or when a library is used in some other way. At the moment these plugins won't be called by the CLI functions. ''' - type = _('Library Closed') + type = _('Library closed') # minimum version 2.54 because that is when support was added minimum_calibre_version = (2, 54, 0) diff --git a/src/calibre/customize/conversion.py b/src/calibre/customize/conversion.py index 2d576472b0..7b2f5cf2dc 100644 --- a/src/calibre/customize/conversion.py +++ b/src/calibre/customize/conversion.py @@ -283,7 +283,7 @@ class OutputFormatPlugin(Plugin): The main action happens in :meth:`convert`. ''' - type = _('Conversion Output') + type = _('Conversion output') can_be_disabled = False supported_platforms = ['windows', 'osx', 'linux'] diff --git a/src/calibre/devices/kobo/kobotouch_config.py b/src/calibre/devices/kobo/kobotouch_config.py index 653c3e7e08..ad9df63828 100644 --- a/src/calibre/devices/kobo/kobotouch_config.py +++ b/src/calibre/devices/kobo/kobotouch_config.py @@ -226,7 +226,7 @@ class CollectionsGroupBox(DeviceOptionsGroupBox): device.get_pref('delete_empty_collections') ) - self.ignore_collections_names_label = QLabel(_('Ignore Collections:')) + self.ignore_collections_names_label = QLabel(_('Ignore collections:')) self.ignore_collections_names_edit = QLineEdit(self) self.ignore_collections_names_edit.setToolTip(_('List the names of collections to be ignored by ' + 'the collection management. The collections listed ' + @@ -422,7 +422,7 @@ class MetadataGroupBox(DeviceOptionsGroupBox): 'Be careful when doing this as it will take time and could make the initial connection take a long time.'))) self.update_series_checkbox = create_checkbox( - _("Set Series information"), + _("Set series information"), _('The book lists on the Kobo devices can display series information. ' 'This is not read by the device from the sideloaded books. ' 'Series information can only be added to the device after the book has been processed by the device. ' diff --git a/src/calibre/ebooks/conversion/plugins/snb_output.py b/src/calibre/ebooks/conversion/plugins/snb_output.py index c4900b0621..3ca336aa3b 100644 --- a/src/calibre/ebooks/conversion/plugins/snb_output.py +++ b/src/calibre/ebooks/conversion/plugins/snb_output.py @@ -134,9 +134,9 @@ class SNBOutput(OutputFormatPlugin): # the tocInfoTree directly instead of modifying the toc ch = etree.SubElement(tocBody, "chapter") ch.set("src", ProcessFileName(first.href) + ".snbc") - ch.text = _('Cover Pages') + ch.text = _('Cover pages') outputFiles[first.href] = [] - outputFiles[first.href].append(("", _("Cover Pages"))) + outputFiles[first.href].append(("", _("Cover pages"))) for tocitem in oeb_book.toc: if tocitem.href.find('#') != -1: @@ -250,6 +250,7 @@ class SNBOutput(OutputFormatPlugin): with lopen(imagePath, 'wb') as f: f.write(image_to_data(img, fmt=imagePath.rpartition('.')[-1])) + if __name__ == '__main__': from calibre.ebooks.oeb.reader import OEBReader from calibre.ebooks.oeb.base import OEBBook diff --git a/src/calibre/ebooks/covers.py b/src/calibre/ebooks/covers.py index 9b4b20c1a0..6bf63cd6e6 100644 --- a/src/calibre/ebooks/covers.py +++ b/src/calibre/ebooks/covers.py @@ -70,8 +70,8 @@ def set_use_roman(val): # }}} -# Draw text {{{ +# Draw text {{{ Point = namedtuple('Point', 'x y') @@ -235,6 +235,7 @@ def layout_text(prefs, img, title, subtitle, footer, max_height, style): def sanitize(s): return unicodedata.normalize('NFC', clean_xml_chars(clean_ascii_chars(force_unicode(s or '')))) + _formatter = None _template_cache = {} @@ -294,6 +295,7 @@ def format_text(mi, prefs): return tuple(format_fields(mi, prefs)) # }}} + # Colors {{{ ColorTheme = namedtuple('ColorTheme', 'color1 color2 contrast_color1 contrast_color2') @@ -301,6 +303,7 @@ ColorTheme = namedtuple('ColorTheme', 'color1 color2 contrast_color1 contrast_co def to_theme(x): return {k:v for k, v in zip(ColorTheme._fields[:4], x.split())} + fallback_colors = to_theme('ffffff 000000 000000 ffffff') default_color_themes = { @@ -381,7 +384,7 @@ class Cross(Style): class Half(Style): NAME = 'Half and Half' - GUI_NAME = _('Half and Half') + GUI_NAME = _('Half and half') def __call__(self, painter, rect, color_theme, title_block, subtitle_block, footer_block): g = QLinearGradient(QPointF(0, 0), QPointF(0, rect.height())) @@ -748,5 +751,6 @@ def test(scale=0.25): m.show() app.exec_() + if __name__ == '__main__': test() diff --git a/src/calibre/gui2/tweak_book/widgets.py b/src/calibre/gui2/tweak_book/widgets.py index 1709c2d1c0..9115ae4c51 100644 --- a/src/calibre/gui2/tweak_book/widgets.py +++ b/src/calibre/gui2/tweak_book/widgets.py @@ -762,8 +762,8 @@ class InsertSemantics(Dialog): 'dedication': _('Dedication'), 'epigraph': _('Epigraph'), 'foreword': _('Foreword'), - 'loi': _('List of Illustrations'), - 'lot': _('List of Tables'), + 'loi': _('List of illustrations'), + 'lot': _('List of tables'), 'notes': _('Notes'), 'preface': _('Preface'), 'text': _('Text'), diff --git a/src/calibre/web/feeds/news.py b/src/calibre/web/feeds/news.py index b87c3edcb6..7fd84398f0 100644 --- a/src/calibre/web/feeds/news.py +++ b/src/calibre/web/feeds/news.py @@ -405,7 +405,7 @@ class BasicNewsRecipe(Recipe): ignore it. :param url: The URL to be followed - :param tag: The Tag from which the URL was derived + :param tag: The tag from which the URL was derived ''' raise NotImplementedError diff --git a/src/pyj/book_list/views.pyj b/src/pyj/book_list/views.pyj index 1c5c172817..0bae2ccb36 100644 --- a/src/pyj/book_list/views.pyj +++ b/src/pyj/book_list/views.pyj @@ -294,8 +294,8 @@ def create_more_actions_panel(container_id): container = document.getElementById(container_id) create_top_bar(container, title=_('Sort books by…'), action=back, icon='close') items = [ - create_item(_('Book List Mode'), subtitle=_('Change how the list of books is displayed')), - create_item(_('A Random Book'), subtitle=_('Choose a random book from the library'), action=def(): + create_item(_('Book list mode'), subtitle=_('Change how the list of books is displayed')), + create_item(_('A random book'), subtitle=_('Choose a random book from the library'), action=def(): query = {'library_id': current_library_id(), 'book_id':'0'} show_panel('book_details', query=query, replace=True) ), diff --git a/src/pyj/read_book/globals.pyj b/src/pyj/read_book/globals.pyj index 55e390a694..08283feb27 100644 --- a/src/pyj/read_book/globals.pyj +++ b/src/pyj/read_book/globals.pyj @@ -62,8 +62,8 @@ def set_toc_anchor_map(val): default_color_schemes = { 'white':{'foreground':'#000000', 'background':'#ffffff', 'name':_('White')}, 'black':{'foreground':'#ffffff', 'background':'#000000', 'name':_('Black')}, - 'sepia-light':{'foreground':'#39322B', 'background':'#F6F3E9', 'name':_('Sepia Light')}, - 'sepia-dark': {'background':'#39322B', 'foreground':'#F6F3E9', 'name':_('Sepia Dark')}, + 'sepia-light':{'foreground':'#39322B', 'background':'#F6F3E9', 'name':_('Sepia light')}, + 'sepia-dark': {'background':'#39322B', 'foreground':'#F6F3E9', 'name':_('Sepia dark')}, } register_callback(def():