String changes

This commit is contained in:
Kovid Goyal 2017-04-23 20:24:31 +05:30
parent 7d67de8217
commit 6250435cd9
19 changed files with 73 additions and 77 deletions

View File

@ -12,7 +12,7 @@ you just want greater control over the conversion system, calibre has a lot of
options to fine tune the conversion process. Note however that calibre's
conversion system is not a substitute for a full blown ebook editor. To edit
ebooks, I recommend first converting them to EPUB or AZW3 using calibre and
then using the Edit Book feature to get them into perfect shape. You can then
then using the :guilabel:`Edit book` feature to get them into perfect shape. You can then
use the edited ebook as input for conversion into other formats in calibre.
This document will refer mainly to the conversion settings as found in the
@ -323,7 +323,7 @@ remove all non-breaking-space entities, or may include false positive matches re
tags, i.e. horizontal rules, and <img> tags are exceptions. Horizontal rules can optionally be specified with styles, if you
choose to add your own style be sure to include the 'width' setting, otherwise the style information will be discarded. Image
tags can used, but calibre does not provide the ability to add the image during conversion, this must be done after the fact using
the 'Edit Book' feature.
the 'Edit book' feature.
Example image tag (place the image within an 'Images' folder inside the epub after conversion):
<img style="width:10%" src="../Images/scenebreak.png" />
@ -443,8 +443,8 @@ generate a Table of Contents in the converted ebook, based on the actual content
create entries in the Table of Contents by simply clicking the place in the
book where you want the entry to point. You can also use the ToC Editor by
itself, without doing a conversion. Go to :guilabel:`Preferences->Toolbars`
and add the ToC Editor to the main toolbar. Then just select the book you
want to edit and click the ToC Editor button.
and add the :guilabel:`ToC Editor` to the main toolbar. Then just select the book you
want to edit and click the :guilabel:`ToC Editor` button.
The first option is :guilabel:`Force use of auto-generated Table of Contents`. By checking this option
you can have calibre override any Table of Contents found in the metadata of the input document with the
@ -570,11 +570,11 @@ You can also change settings in the conversion dialog for each book conversion.
When you convert a book, calibre remembers the settings you used for that book,
so that if you convert it again, the saved settings for the individual book
will take precedence over the defaults set in Preferences. You can restore the
individual settings to defaults by using the Restore to defaults button in the
individual book conversion dialog. You can remove the saved settings for a
group of books by selecting all the books and then clicking the edit metadata
button to bring up the bulk metadata edit dialog, near the bottom of the dialog
is an option to remove stored conversion settings.
individual settings to defaults by using the :guilabel:`Restore to defaults`
button in the individual book conversion dialog. You can remove the saved
settings for a group of books by selecting all the books and then clicking the
edit metadata button to bring up the bulk metadata edit dialog, near the bottom
of the dialog is an option to remove stored conversion settings.
When you Bulk Convert a set of books, settings are taken in the following order (last one wins):
@ -622,7 +622,7 @@ the latest version of calibre as support for ``.docx`` files is very new).
calibre will automatically generate a Table of Contents based on headings if you mark
your headings with the ``Heading 1``, ``Heading 2``, etc. styles in Word. Open
the output ebook in the calibre viewer and click the Table of Contents button
the output ebook in the calibre viewer and click the :guilabel:`Table of Contents` button
to view the generated Table of Contents.
Older .doc files
@ -649,11 +649,11 @@ conventions.
TXT input supports a number of options to differentiate how paragraphs are detected.
:guilabel:`Paragraph Style: Auto`
:guilabel:`Paragraph style: Auto`
Analyzes the text file and attempts to automatically determine how paragraphs are defined. This
option will generally work fine, if you achieve undesirable results try one of the manual options.
:guilabel:`Paragraph Style: Block`
:guilabel:`Paragraph style: Block`
Assumes one or more blank lines are a paragraph boundary::
This is the first.
@ -661,14 +661,14 @@ TXT input supports a number of options to differentiate how paragraphs are detec
This is the
second paragraph.
:guilabel:`Paragraph Style: Single`
:guilabel:`Paragraph style: Single`
Assumes that every line is a paragraph::
This is the first.
This is the second.
This is the third.
:guilabel:`Paragraph Style: Print`
:guilabel:`Paragraph style: Print`
Assumes that every paragraph starts with an indent (either a tab or 2+ spaces). Paragraphs end when
the next line that starts with an indent is reached::
@ -679,26 +679,26 @@ TXT input supports a number of options to differentiate how paragraphs are detec
This is the
third.
:guilabel:`Paragraph Style: Unformatted`
:guilabel:`Paragraph style: Unformatted`
Assumes that the document has no formatting, but does use hard line breaks. Punctuation
and median line length are used to attempt to re-create paragraphs.
:guilabel:`Formatting Style: Auto`
:guilabel:`Formatting style: Auto`
Attempts to detect the type of formatting markup being used. If no markup is used then heuristic
formatting will be applied.
:guilabel:`Formatting Style: Heuristic`
:guilabel:`Formatting style: Heuristic`
Analyzes the document for common chapter headings, scene breaks, and italicized words and applies the
appropriate html markup during conversion.
:guilabel:`Formatting Style: Markdown`
:guilabel:`Formatting style: Markdown`
calibre also supports running TXT input though a transformation preprocessor known as markdown. Markdown
allows for basic formatting to be added to TXT documents, such as bold, italics, section headings, tables,
lists, a Table of Contents, etc. Marking chapter headings with a leading # and setting the chapter XPath detection
expression to "//h:h1" is the easiest way to have a proper table of contents generated from a TXT document.
You can learn more about the markdown syntax at `daringfireball <https://daringfireball.net/projects/markdown/syntax>`_.
:guilabel:`Formatting Style: None`
:guilabel:`Formatting style: None`
Applies no special formatting to the text, the document is converted to html with no other changes.
.. _pdfconversion:
@ -731,7 +731,7 @@ Some limitations of PDF input are:
To re-iterate **PDF is a really, really bad** format to use as input. If you absolutely must use PDF, then be prepared for an
output ranging anywhere from decent to unusable, depending on the input PDF.
Comic Book Collections
Comic book collections
~~~~~~~~~~~~~~~~~~~~~~~~~
A comic book collection is a .cbc file. A .cbc file is a zip file that contains other CBZ/CBR files. In addition the

View File

@ -180,7 +180,7 @@ You can see the ``prefs`` object being used in main.py:
:lines: 151-
Edit Book plugins
Edit book plugins
------------------------------------------
Now let's change gears for a bit and look at creating a plugin to add tools to
@ -302,7 +302,7 @@ The first, most important step is to run calibre in debug mode. You can do this
calibre-debug -g
Or from within calibre by right-clicking the preferences button or using the `Ctrl+Shift+R` keyboard shortcut.
Or from within calibre by right-clicking the :guilabel:`Preferences` button or using the `Ctrl+Shift+R` keyboard shortcut.
When running from the command line, debug output will be printed to the console, when running from within calibre the output will go to a txt file.

View File

@ -13,7 +13,7 @@ You can use this editor by right clicking on any book in calibre and selecting
:guilabel:`Edit book`.
.. image:: images/edit-book.png
:alt: The Edit Book tool
:alt: The Edit book tool
:align: center
:class: fit-img
@ -206,14 +206,14 @@ right click and choose Link stylesheets to have calibre automatically insert the
Search & Replace
-------------------
Edit Book has a very powerful search and replace interface that allows you to
Edit book has a very powerful search and replace interface that allows you to
search and replace text in the current file, across all files and even in a
marked region of the current file. You can search using a normal search or
using regular expressions. To learn how to use regular expressions for advanced
searching, see :ref:`regexptutorial`.
.. image:: images/sr.png
:alt: The Edit Book tool
:alt: The Edit book tool
:align: center
Start the search and replace via the :guilabel:`Search->Find/replace` menu

View File

@ -125,7 +125,7 @@ to all the other files in the desired order. Such a file looks like::
</body>
</html>
Then, just add this HTML file to the GUI and use the convert button to create
Then, just add this HTML file to the GUI and use the :guilabel:`Convert` button to create
your ebook. You can use the option in the Table of Contents section in the
conversion dialog to control how the Table of Contents is generated.
@ -326,7 +326,7 @@ over the net. First perform the following steps in calibre
* Set the output profile to iPad (this will work for iPhone/iPods as well),
under :guilabel:`Preferences->Conversion->Common options->Page setup`
* Convert the books you want to read on your iDevice to EPUB format by
selecting them and clicking the Convert button.
selecting them and clicking the :guilabel:`Convert` button.
* Turn on the Content Server by clicking the :guilabel:`Connect/Share` button
and leave calibre running. You can also tell calibre to automatically start the
content server via :guilabel:`Preferences->Sharing over the net`.
@ -407,7 +407,7 @@ Using a USB cable
Simply plug your device into the computer with a USB cable. calibre should
automatically detect the device and then you can transfer books to it by
clicking the Send to Device button. calibre does not have support for every
clicking the :guilabel:`Send to device` button. calibre does not have support for every
single android device out there, so if your device is not automatically
detected, follow the instructions at :ref:`devsupport` to get your device
supported in calibre.
@ -439,8 +439,8 @@ calibre content server, which makes your collection available over the net.
First perform the following steps in calibre
* Set the :guilabel:`Preferred Output Format` in calibre to EPUB for normal Android devices or MOBI for Kindles (The output format can be set under :guilabel:`Preferences->Interface->Behavior`)
* Convert the books you want to read on your device to EPUB/MOBI format by selecting them and clicking the Convert button.
* Turn on the Content Server in calibre's preferences and leave calibre running.
* Convert the books you want to read on your device to EPUB/MOBI format by selecting them and clicking the :guilabel:`Convert` button.
* Turn on the :guilabel:`Content Server` in calibre's preferences and leave calibre running.
Now on your Android device, open the browser and browse to
@ -903,17 +903,16 @@ There are several possible things I know of, that can cause this:
monitoring/managing application you have running. Turn it off and you
should be fine.
* If the crashes happen specifically when you are using a file dialog,
like clicking on the Add Books button or the Save to Disk button, then
you have some software that has installed broken Shell extensions on your
computer. Known culprits include: *SpiderOak*, *odrive sync* and *Dell
Backup and Recovery*. If you have one of these, uninstall them and you
will be fine. You can also use the
`NirSoft Shell Extension Viewer <https://www.nirsoft.net/utils/shexview.html>`_
to see what shell extensions are installed on your system
and disable them individually, if you dont want to uninstall the full program.
Remember to use "Restart Explorer" or reboot your computer after
disabling the shell extensions.
* If the crashes happen specifically when you are using a file dialog, like
clicking on the :guilabel:`Add books` button or the :guilabel:`Save to
Disk button`, then you have some software that has installed broken Shell
extensions on your computer. Known culprits include: *SpiderOak*, *odrive
sync* and *Dell Backup and Recovery*. If you have one of these, uninstall
them and you will be fine. You can also use the `NirSoft Shell Extension
Viewer <https://www.nirsoft.net/utils/shexview.html>`_ to see what shell
extensions are installed on your system and disable them individually, if
you dont want to uninstall the full program. Remember to use "Restart
Explorer" or reboot your computer after disabling the shell extensions.
If none of the above apply to you, then there is some other program on your
computer that is interfering with calibre. First reboot your computer in safe
@ -1044,7 +1043,7 @@ Can I have the comment metadata show up on my reader?
Most readers do not support this. You should complain to the manufacturer about it and hopefully if enough people complain, things will change. In the meantime, you can insert the metadata, including comments into a "Jacket page" at the start of the ebook, by using the option to "Insert metadata as page at start of book" during conversion. The option is found in the :guilabel:`Structure detection` section of the conversion settings. Note that for this to have effect you have to *convert* the book. If your book is already in a format that does not need conversion, you can convert from that format to the same format.
Another alternative is to create a catalog in ebook form containing a listing of all the books in your calibre library, with their metadata. Click-and-hold the convert button to access the catalog creation tool. And before you ask, no you cannot have the catalog "link directly to" books on your reader.
Another alternative is to create a catalog in ebook form containing a listing of all the books in your calibre library, with their metadata. Click-and-hold the :guilabel:`Convert` button to access the catalog creation tool. And before you ask, no you cannot have the catalog "link directly to" books on your reader.
How do I get calibre to use my HTTP proxy?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -297,7 +297,7 @@ A *catalog* is a collection of books. calibre can manage two types of different
2. **Device**: This is a collection of books stored in your ebook reader. It will be available when you connect the reader to your computer.
Many operations, such as adding books, deleting, viewing, etc., are context sensitive. So, for example, if you click the View button when you have the **Device** catalog selected, calibre will open the files on the device to view. If you have the **Library** catalog selected, files in your calibre library will be opened instead.
Many operations, such as adding books, deleting, viewing, etc., are context sensitive. So, for example, if you click the :guilabel:`View` button when you have the **Device** catalog selected, calibre will open the files on the device to view. If you have the **Library** catalog selected, files in your calibre library will be opened instead.
.. _search_sort:
@ -624,7 +624,7 @@ The Jobs panel shows the number of currently running jobs. Jobs are tasks that r
Keyboard Shortcuts
---------------------
calibre has several keyboard shortcuts to save you time and mouse movement. These shortcuts are active in the book list view (when you're not editing the details of a particular book), and most of them affect the title you have selected. The calibre ebook viewer has its own shortcuts which can be customised by clicking the Preferences button in the viewer.
calibre has several keyboard shortcuts to save you time and mouse movement. These shortcuts are active in the book list view (when you're not editing the details of a particular book), and most of them affect the title you have selected. The calibre ebook viewer has its own shortcuts which can be customised by clicking the :guilabel:`Preferences` button in the viewer.
.. note::
@ -634,7 +634,7 @@ calibre has several keyboard shortcuts to save you time and mouse movement. Thes
:widths: 10 100
:header-rows: 1
* - Keyboard Shortcut
* - Keyboard shortcut
- Action
* - :kbd:`F2 (Enter in OS X)`
- Edit the metadata of the currently selected field in the book list.
@ -667,7 +667,7 @@ calibre has several keyboard shortcuts to save you time and mouse movement. Thes
* - :kbd:`S`
- Save to Disk
* - :kbd:`T`
- Edit Book
- Edit book
* - :kbd:`V`
- View
* - :kbd:`Alt+V/Cmd+V in OS X`

View File

@ -47,7 +47,7 @@ Editing the metadata of many books at a time
First select the books you want to edit by holding Ctrl or Shift and clicking on them. If you select more than one book, clicking the :guilabel:`Edit metadata` button will cause a new *Bulk* metadata edit dialog to open. Using this dialog, you can quickly set the author/publisher/rating/tags/series etc of a bunch of books to the same value. This is particularly useful if you have just imported a number of books that have some metadata in common. This dialog is very powerful, for example, it has a Search and Replace tab that you can use to perform bulk operations on metadata and even copy metadata from one column to another.
The normal edit metadata dialog also has Next and Previous buttons that you can use to edit the metadata of several books one after the other.
The normal edit metadata dialog also has :guilabel:`Next` and :guilabel:`Previous` buttons that you can use to edit the metadata of several books one after the other.
Search and replace
^^^^^^^^^^^^^^^^^^^^

View File

@ -87,7 +87,7 @@ Conversion plugins
:members:
:member-order: bysource
Device Drivers
Device drivers
-----------------
.. module:: calibre.devices.interface
@ -168,7 +168,7 @@ If you are adding your own plugin in a zip file, you should subclass both Interf
:member-order: bysource
Preferences Plugins
Preferences plugins
--------------------------
.. autoclass:: calibre.customize.PreferencesPlugin

View File

@ -118,7 +118,7 @@ Working with the Table of Contents
.. autofunction:: create_inline_toc
Edit Book Tool
Edit book tool
--------------------
.. autoclass:: calibre.gui2.tweak_book.plugin.Tool

View File

@ -481,7 +481,7 @@ The same thing happens for authors, but using a different character for the cut,
Plugboards affect the metadata written into the book when it is saved to disk or written to the device. Plugboards do not affect the metadata used by ``save to disk`` and ``send to device`` to create the file names. Instead, file names are constructed using the templates entered on the appropriate preferences window.
Helpful Tips
Helpful tips
------------
You might find the following tips useful.

View File

@ -791,7 +791,7 @@ class ViewerPlugin(Plugin): # {{{
class EditBookToolPlugin(Plugin): # {{{
type = _('Edit Book Tool')
type = _('Edit book tool')
minimum_calibre_version = (1, 46, 0)
# }}}

View File

@ -58,7 +58,7 @@ Everything after the -- is passed to the script.
default=False,
help=_('Inspect the MOBI file(s) at the specified path(s)'))
parser.add_option('-t', '--edit-book', action='store_true',
help=_('Launch the calibre Edit Book tool in debug mode.'))
help=_('Launch the calibre Edit book tool in debug mode.'))
parser.add_option('-x', '--explode-book', default=None,
help=_('Explode the book (exports the book as a collection of HTML '
'files and metadata, which you can edit using standard HTML '
@ -318,5 +318,6 @@ def main(args=sys.argv):
return 0
if __name__ == '__main__':
sys.exit(main())

View File

@ -170,7 +170,7 @@ class BookUploadsGroupBox(DeviceOptionsGroupBox):
def __init__(self, parent, device):
super(BookUploadsGroupBox, self).__init__(parent, device)
self.setTitle(_("Book Uploading"))
self.setTitle(_("Book uploading"))
self.options_layout = QGridLayout()
self.options_layout.setObjectName("options_layout")
@ -316,7 +316,7 @@ class DeviceListGroupBox(DeviceOptionsGroupBox):
self.setLayout(self.options_layout)
self.show_recommendations_checkbox = create_checkbox(
_("Show Recommendations"),
_("Show recommendations"),
_('Kobo shows recommendations on the device. In some cases these have '
'files but in other cases they are just pointers to the web site to buy. '
'Enable if you wish to see/delete them.'),
@ -331,7 +331,7 @@ class DeviceListGroupBox(DeviceOptionsGroupBox):
)
self.show_previews_checkbox = create_checkbox(
_('Show Previews'),
_('Show previews'),
_('Kobo previews are included on the Touch and some other versions'
' by default they are no longer displayed as there is no good reason to '
'see them. Enable if you wish to see/delete them.'),
@ -359,7 +359,7 @@ class DeviceListGroupBox(DeviceOptionsGroupBox):
class AdvancedGroupBox(DeviceOptionsGroupBox):
def __init__(self, parent, device):
super(AdvancedGroupBox, self).__init__(parent, device, _("Advanced Options"))
super(AdvancedGroupBox, self).__init__(parent, device, _("Advanced options"))
# self.setTitle(_("Advanced Options"))
self.options_layout = QGridLayout()

View File

@ -17,14 +17,14 @@ def sanity_check(on_card, files, card_prefixes, free_space):
if on_card == 'carda' and not card_prefixes[0]:
raise WrongDestinationError(_(
'The reader has no storage card %s. You may have changed '
'the default send to device action. Right click on the send '
'to device button and reset the default action to be '
'the default send to device action. Right click on the "Send '
'to device" button and reset the default action to be '
'"Send to main memory".')%'A')
elif on_card == 'cardb' and not card_prefixes[1]:
raise WrongDestinationError(_(
'The reader has no storage card %s. You may have changed '
'the default send to device action. Right click on the send '
'to device button and reset the default action to be '
'the default send to device action. Right click on the "Send '
'to device" button and reset the default action to be '
'"Send to main memory".')%'B')
elif on_card and on_card not in ('carda', 'cardb'):
raise DeviceError(_('Selected slot: %s is not supported.') % on_card)
@ -148,6 +148,3 @@ def create_upload_path(mdata, fname, template, sanitize,
filepath = path_type.join(*components)
return filepath

View File

@ -107,7 +107,7 @@ def option_recommendation_to_cli_option(add_option, rec):
' in this book. The easiest way to create such a file is to'
' use the wizard for creating rules in the calibre GUI. Access'
' it in the "Look & feel->Transform styles" section of the conversion'
' dialog. Once you create the rules, you can use the Export button'
' dialog. Once you create the rules, you can use the "Export" button'
' to save them to a file.'
)
if opt.name in DEFAULT_TRUE_OPTIONS and rec.recommended_value is True:

View File

@ -91,7 +91,7 @@ class TweakEpubAction(InterfaceAction):
def tweak_book(self):
row = self.gui.library_view.currentIndex()
if not row.isValid():
return error_dialog(self.gui, _('Cannot Edit Book'),
return error_dialog(self.gui, _('Cannot Edit book'),
_('No book selected'), show=True)
book_id = self.gui.library_view.model().id(row)
@ -99,7 +99,7 @@ class TweakEpubAction(InterfaceAction):
def do_tweak(self, book_id):
if self.gui.current_view() is not self.gui.library_view:
return error_dialog(self.gui, _('Cannot Edit Book'), _(
return error_dialog(self.gui, _('Cannot Edit book'), _(
'Editing of books on the device is not supported'), show=True)
from calibre.ebooks.oeb.polish.main import SUPPORTED
db = self.gui.library_view.model().db
@ -107,7 +107,7 @@ class TweakEpubAction(InterfaceAction):
fmts = [x.upper().strip() for x in fmts.split(',')]
tweakable_fmts = set(fmts).intersection(SUPPORTED)
if not tweakable_fmts:
return error_dialog(self.gui, _('Cannot Edit Book'),
return error_dialog(self.gui, _('Cannot Edit book'),
_('The book must be in the %s formats to edit.'
'\n\nFirst convert the book to one of these formats.') % (_(' or ').join(SUPPORTED)),
show=True)

View File

@ -36,7 +36,7 @@ class ConfigWidgetInterface(object):
#: Set to True iff the :meth:`restore_to_defaults` method is implemented.
supports_restoring_to_defaults = True
#: The tooltip for the Restore to defaults button
#: The tooltip for the "Restore to defaults" button
restore_defaults_desc = _('Restore settings to default values. '
'You have to click Apply to actually save the default settings.')
@ -408,8 +408,7 @@ def test_all():
test_widget(plugin.category, plugin.name, gui=gui)
gui.shutdown()
if __name__ == '__main__':
test_all()
# }}}

View File

@ -662,7 +662,7 @@ class Preferences(QDialog):
QDialog.__init__(self, gui)
self.l = l = QGridLayout(self)
self.setLayout(l)
self.setWindowTitle(_('Preferences for Edit Book'))
self.setWindowTitle(_('Preferences for Edit book'))
self.setWindowIcon(QIcon(I('config.png')))
self.stacks = QStackedWidget(self)

View File

@ -233,7 +233,7 @@ class CursorPositionWidget(QWidget): # {{{
class Main(MainWindow):
APP_NAME = _('Edit Book')
APP_NAME = _('Edit book')
STATE_VERSION = 0
def __init__(self, opts, notify=None):

View File

@ -19,11 +19,11 @@ def create_goto_list(onclick):
id_map = get_toc_maps(toc)[1]
before, after = get_border_nodes(toc, id_map)
if after:
items.push(create_item(_('Next Section'), icon='caret-right', subtitle=after.title, action=onclick.bind(None, after.dest, after.frag)))
items.push(create_item(_('Next section'), icon='caret-right', subtitle=after.title, action=onclick.bind(None, after.dest, after.frag)))
if before:
items.push(create_item(_('Previous Section'), icon='caret-left', subtitle=before.title, action=onclick.bind(None, before.dest, before.frag)))
items.push(create_item(_('Document Start'), action=onclick.bind(None, def(view): view.goto_doc_boundary(True);)))
items.push(create_item(_('Document End'), action=onclick.bind(None, def(view): view.goto_doc_boundary(False);)))
items.push(create_item(_('Previous section'), icon='caret-left', subtitle=before.title, action=onclick.bind(None, before.dest, before.frag)))
items.push(create_item(_('Document start'), action=onclick.bind(None, def(view): view.goto_doc_boundary(True);)))
items.push(create_item(_('Document end'), action=onclick.bind(None, def(view): view.goto_doc_boundary(False);)))
for l in landmarks:
items.push(create_item(l.title, action=onclick.bind(None, l.dest, l.frag)))
build_list(ans, items)