From e8a3258dcb6db8d95aa28bf056c96eab074cb052 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 25 Apr 2017 10:01:23 +0530 Subject: [PATCH] String changes --- src/calibre/devices/kindle/driver.py | 4 ++-- src/calibre/gui2/add.py | 2 +- src/calibre/gui2/convert/regex_builder.py | 2 +- src/calibre/gui2/device_drivers/mtp_config.py | 4 ++-- src/calibre/gui2/dialogs/add_empty_book.py | 5 +++-- src/calibre/gui2/dialogs/metadata_bulk.ui | 2 +- src/calibre/gui2/dialogs/search.ui | 2 +- src/calibre/gui2/ebook_download.py | 4 ++-- src/calibre/gui2/filename_pattern.ui | 2 +- src/calibre/gui2/lrf_renderer/main.py | 5 ++--- src/calibre/gui2/preferences/behavior.ui | 2 +- src/calibre/gui2/preferences/create_custom_column.py | 2 +- src/calibre/gui2/store/config/chooser/models.py | 6 +++--- src/calibre/gui2/store/web_control.py | 6 +++--- src/calibre/gui2/tools.py | 4 ++-- src/calibre/gui2/tweak_book/boss.py | 2 +- src/calibre/gui2/tweak_book/preview.py | 4 ++-- src/calibre/gui2/ui.py | 4 ++-- src/calibre/gui2/viewer/config.py | 4 ++-- src/calibre/gui2/viewer/config.ui | 4 ++-- src/calibre/gui2/viewer/main.py | 6 +++--- src/calibre/gui2/viewer/ui.py | 2 +- src/calibre/library/cli.py | 4 ++-- src/calibre/linux.py | 4 ++-- 24 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index b565354a75..eddc7d34f9 100644 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -215,13 +215,13 @@ class KINDLE(USBMS): spanTag['style'] = 'font-weight:bold' if bookmark.book_format == 'pdf': spanTag.insert(0,NavigableString( - _("%(time)s
Last Page Read: %(loc)d (%(pr)d%%)") % dict( + _("%(time)s
Last page read: %(loc)d (%(pr)d%%)") % dict( time=strftime(u'%x', timestamp.timetuple()), loc=last_read_location, pr=percent_read))) else: spanTag.insert(0,NavigableString( - _("%(time)s
Last Page Read: Location %(loc)d (%(pr)d%%)") % dict( + _("%(time)s
Last page read: Location %(loc)d (%(pr)d%%)") % dict( time=strftime(u'%x', timestamp.timetuple()), loc=last_read_location, pr=percent_read))) diff --git a/src/calibre/gui2/add.py b/src/calibre/gui2/add.py index d74452be6a..0953d5139e 100644 --- a/src/calibre/gui2/add.py +++ b/src/calibre/gui2/add.py @@ -210,7 +210,7 @@ class Adder(QObject): return if not self.file_groups: error_dialog(self.pd, _('Could not add'), _( - 'No ebook files were found in %s') % self.source, show=True) + 'No e-book files were found in %s') % self.source, show=True) self.break_cycles() return self.pd.max = len(self.file_groups) diff --git a/src/calibre/gui2/convert/regex_builder.py b/src/calibre/gui2/convert/regex_builder.py index 74d6996ce3..eac54b9825 100644 --- a/src/calibre/gui2/convert/regex_builder.py +++ b/src/calibre/gui2/convert/regex_builder.py @@ -216,7 +216,7 @@ class RegexEdit(QWidget, Ui_Edit): def builder(self): if self.db is None: self.doc_cache = _('Click the "Open" button below to open a ' - 'ebook to use for testing.') + 'e-book to use for testing.') bld = RegexBuilder(self.db, self.book_id, self.edit.text(), self.doc_cache, self) if bld.cancelled: return diff --git a/src/calibre/gui2/device_drivers/mtp_config.py b/src/calibre/gui2/device_drivers/mtp_config.py index 90d420adf3..ef0522b252 100644 --- a/src/calibre/gui2/device_drivers/mtp_config.py +++ b/src/calibre/gui2/device_drivers/mtp_config.py @@ -130,7 +130,7 @@ class SendToConfig(QWidget): # {{{ self.l = l = QGridLayout(self) self.setLayout(l) self.m = m = QLabel('

'+_('''A list of &folders on the device to - which to send ebooks. The first one that exists will be used:''')) + which to send e-books. The first one that exists will be used:''')) m.setWordWrap(True) m.setBuddy(t) l.addWidget(m, 0, 0, 1, 2) @@ -281,7 +281,7 @@ class FormatRules(QGroupBox): self.l = l = QVBoxLayout() self.setLayout(l) self.la = la = QLabel('

'+_( - '''You can create rules that control where ebooks of a specific + '''You can create rules that control where e-books of a specific format are sent to on the device. These will take precedence over the folders specified above.''')) la.setWordWrap(True) diff --git a/src/calibre/gui2/dialogs/add_empty_book.py b/src/calibre/gui2/dialogs/add_empty_book.py index c920d9dd7d..dbf66191e1 100644 --- a/src/calibre/gui2/dialogs/add_empty_book.py +++ b/src/calibre/gui2/dialogs/add_empty_book.py @@ -77,7 +77,7 @@ class AddEmptyBookDialog(QDialog): self.tclear_button.clicked.connect(self.title_edit.clear) self._layout.addWidget(self.tclear_button, 7, 1, 1, 1) - self.format_label = QLabel(_('Also create an empty ebook in format:')) + self.format_label = QLabel(_('Also create an empty e-book in format:')) self._layout.addWidget(self.format_label, 8, 0, 1, 2) c = self.format_value = QComboBox(self) from calibre.ebooks.oeb.polish.create import valid_empty_formats @@ -97,7 +97,7 @@ class AddEmptyBookDialog(QDialog): self.copy_formats = cf = QCheckBox(_('Also copy book &formats when duplicating a book'), self) cf.setToolTip(_( - 'Also copy all ebook files into the newly created duplicate' + 'Also copy all e-book files into the newly created duplicate' ' books.')) cf.setChecked(gprefs.get('create_empty_copy_dup_formats', False)) self._layout.addWidget(cf, 10, 0, 1, -1) @@ -171,6 +171,7 @@ class AddEmptyBookDialog(QDialog): def selected_title(self): return self.title_edit.text().strip() + if __name__ == '__main__': from calibre.library import db db = db() diff --git a/src/calibre/gui2/dialogs/metadata_bulk.ui b/src/calibre/gui2/dialogs/metadata_bulk.ui index 4ff008c347..52f33fd7dd 100644 --- a/src/calibre/gui2/dialogs/metadata_bulk.ui +++ b/src/calibre/gui2/dialogs/metadata_bulk.ui @@ -637,7 +637,7 @@ title and author are swapped before the title case is set - Set from &ebook file(s) + Set from &e-book file(s) diff --git a/src/calibre/gui2/dialogs/search.ui b/src/calibre/gui2/dialogs/search.ui index db9129d02b..1994ae7288 100644 --- a/src/calibre/gui2/dialogs/search.ui +++ b/src/calibre/gui2/dialogs/search.ui @@ -201,7 +201,7 @@ - Titl&e/Author/Series... + Titl&e/author/series... diff --git a/src/calibre/gui2/ebook_download.py b/src/calibre/gui2/ebook_download.py index 0d7b3da313..50739ce13d 100644 --- a/src/calibre/gui2/ebook_download.py +++ b/src/calibre/gui2/ebook_download.py @@ -105,7 +105,7 @@ class EbookDownload(object): return ext = os.path.splitext(filename)[1][1:].lower() if ext not in BOOK_EXTENSIONS: - raise Exception(_('Not a support ebook format.')) + raise Exception(_('Not a support e-book format.')) from calibre.ebooks.metadata.meta import get_metadata with open(filename, 'rb') as f: @@ -148,7 +148,7 @@ class EbookDownloadMixin(object): def downloaded_ebook(self, job): if job.failed: - self.job_exception(job, dialog_title=_('Failed to download ebook')) + self.job_exception(job, dialog_title=_('Failed to download e-book')) return self.status_bar.show_message(job.description + ' ' + _('finished'), 5000) diff --git a/src/calibre/gui2/filename_pattern.ui b/src/calibre/gui2/filename_pattern.ui index ef76361042..d70724b59d 100644 --- a/src/calibre/gui2/filename_pattern.ui +++ b/src/calibre/gui2/filename_pattern.ui @@ -18,7 +18,7 @@ <div style="font-size:10pt;"> -<p>Set a regular expression pattern to use when trying to guess ebook metadata from filenames. </p> +<p>Set a regular expression pattern to use when trying to guess e-book metadata from filenames. </p> <p>A <a href="%s">tutorial</a> on using regular expressions is available.</p> <p>Use the <b>Test</b> functionality below to test your regular expression on a few sample filenames (remember to include the file extension). The group names for the various metadata entries are documented in tooltips. Note that underscores in filenames are auto-replaced by spaces.</p></div> diff --git a/src/calibre/gui2/lrf_renderer/main.py b/src/calibre/gui2/lrf_renderer/main.py index 8c0d1c1d09..6107cb0714 100644 --- a/src/calibre/gui2/lrf_renderer/main.py +++ b/src/calibre/gui2/lrf_renderer/main.py @@ -272,7 +272,7 @@ def option_parser(): parser = option_parser(_('''\ %prog [options] book.lrf -Read the LRF ebook book.lrf +Read the LRF e-book book.lrf ''')) parser.add_option('--verbose', default=False, action='store_true', dest='verbose', help=_('Print more information about the rendering process')) @@ -322,7 +322,6 @@ def main(args=sys.argv, logger=None): return app.exec_() return 0 + if __name__ == '__main__': sys.exit(main()) - - diff --git a/src/calibre/gui2/preferences/behavior.ui b/src/calibre/gui2/preferences/behavior.ui index 2926f767b9..b6d210ce54 100644 --- a/src/calibre/gui2/preferences/behavior.ui +++ b/src/calibre/gui2/preferences/behavior.ui @@ -35,7 +35,7 @@ If not checked, the values can be Yes or No. - Automatically send downloaded &news to ebook reader + Automatically send downloaded &news to e-book reader diff --git a/src/calibre/gui2/preferences/create_custom_column.py b/src/calibre/gui2/preferences/create_custom_column.py index 70c508dfe0..9604fc4491 100644 --- a/src/calibre/gui2/preferences/create_custom_column.py +++ b/src/calibre/gui2/preferences/create_custom_column.py @@ -384,7 +384,7 @@ class CreateCustomColumn(QDialog): 'An Oblique Approach [Belisarius [1]]". The template ' '

<a href="https://www.beam-ebooks.de/ebook/{identifiers'
                   ':select(beam)}">Beam book</a>
' - 'will generate a link to the book on the Beam ebooks site.') + '

') + 'will generate a link to the book on the Beam e-books site.') + '

') l.addWidget(cch) add_row(None, l) diff --git a/src/calibre/gui2/store/config/chooser/models.py b/src/calibre/gui2/store/config/chooser/models.py index b379101b34..f3d7e7fdcf 100644 --- a/src/calibre/gui2/store/config/chooser/models.py +++ b/src/calibre/gui2/store/config/chooser/models.py @@ -132,16 +132,16 @@ class Matches(QAbstractItemModel): return ('

%s

' % result.description) elif col == 2: if result.drm_free_only: - return ('

' + _('This store only distributes ebooks without DRM.') + '

') + return ('

' + _('This store only distributes e-books without DRM.') + '

') else: - return ('

' + _('This store distributes ebooks with DRM. It may have some titles without DRM, but you will need to check on a per title basis.') + '

') # noqa + return ('

' + _('This store distributes e-books with DRM. It may have some titles without DRM, but you will need to check on a per title basis.') + '

') # noqa elif col == 3: return ('

' + _('This store is headquartered in %s. This is a good indication of what market the store caters to. However, this does not necessarily mean that the store is limited to that market only.') % result.headquarters + '

') # noqa elif col == 4: if result.affiliate: return ('

' + _('Buying from this store supports the calibre developer: %s.') % result.author + '

') elif col == 5: - return ('

' + _('This store distributes ebooks in the following formats: %s') % ', '.join(result.formats) + '

') + return ('

' + _('This store distributes e-books in the following formats: %s') % ', '.join(result.formats) + '

') return None def setData(self, index, data, role): diff --git a/src/calibre/gui2/store/web_control.py b/src/calibre/gui2/store/web_control.py index 210c353f48..b1e1fe0e10 100644 --- a/src/calibre/gui2/store/web_control.py +++ b/src/calibre/gui2/store/web_control.py @@ -79,18 +79,18 @@ class NPWebView(QWebView): if ext not in BOOK_EXTENSIONS: if ext == 'acsm': from calibre.gui2.dialogs.confirm_delete import confirm - if not confirm('

' + _('This ebook is a DRMed EPUB file. ' + if not confirm('

' + _('This e-book is a DRMed EPUB file. ' 'You will be prompted to save this file to your ' 'computer. Once it is saved, open it with ' '' 'Adobe Digital Editions (ADE).

ADE, in turn ' - 'will download the actual ebook, which will be a ' + 'will download the actual e-book, which will be a ' '.epub file. You can add this book to calibre ' 'using "Add Books" and selecting the file from ' 'the ADE library folder.'), 'acsm_download', self): return - name = choose_save_file(self, 'web-store-download-unknown', _('File is not a supported ebook type. Save to disk?'), initial_filename=filename) + name = choose_save_file(self, 'web-store-download-unknown', _('File is not a supported e-book type. Save to disk?'), initial_filename=filename) if name: self.gui.download_ebook(url, cf, name, name, False, create_browser=self.create_browser) else: diff --git a/src/calibre/gui2/tools.py b/src/calibre/gui2/tools.py index cd8b2349c9..0c56399ed3 100644 --- a/src/calibre/gui2/tools.py +++ b/src/calibre/gui2/tools.py @@ -101,7 +101,7 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, # {{{ if len(bad) == 1 and not bad[0][1]: title = db.title(bad[0][0], True) warning_dialog(parent, _('Could not convert'), '

'+ - _('Could not convert %s as it has no ebook files. If you ' + _('Could not convert %s as it has no e-book files. If you ' 'think it should have files, but calibre is not finding ' 'them, that is most likely because you moved the book\'s ' 'files around outside of calibre. You will need to find those files ' @@ -114,7 +114,7 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, # {{{ msg = _('No supported formats (Available formats: %s)')%( ', '.join(available_formats)) else: - msg = _('This book has no actual ebook files') + msg = _('This book has no actual e-book files') res.append('%s - %s'%(title, msg)) msg = '%s' % '\n'.join(res) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index d1722dae3b..05040b9d47 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -661,7 +661,7 @@ class Boss(QObject): _('The name you have chosen {0} contains special characters, internally' ' it will look like: {1}Try to use only the English alphabet [a-z], numbers [0-9],' ' hyphens and underscores for file names. Other characters can cause problems for ' - ' different ebook viewers. Are you sure you want to proceed?').format( + ' different e-book viewers. Are you sure you want to proceed?').format( '

%s
'%newname, '
%s
' % urlnormalize(newname)), 'confirm-urlunsafe-change', parent=self.gui, title=_('Are you sure?'), config_set=tprefs): return diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index f607ffe58a..18ed430b46 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -386,8 +386,8 @@ class WebView(QWebView): The preview will update automatically as you make changes.

Note that this is a quick preview - only, it is not intended to simulate an actual ebook reader. Some - aspects of your ebook will not work, such as page breaks and page margins. + only, it is not intended to simulate an actual e-book reader. Some + aspects of your e-book will not work, such as page breaks and page margins. ''')) def inspect(self): diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 6e7df1502e..981fb8a613 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -773,7 +773,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ title = job.description.split(':')[-1].partition('(')[-1][:-1] msg = _('

Failed to convert: %s')%title msg += '

'+_(''' - Many older ebook reader devices are incapable of displaying + Many older e-book reader devices are incapable of displaying EPUB files that have internal components over a certain size. Therefore, when converting to EPUB, calibre automatically tries to split up the EPUB into smaller sized pieces. For some @@ -783,7 +783,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ maximum split size under EPUB Output in the conversion dialog, or by turning on Heuristic Processing, also in the conversion dialog. Note that if you make the maximum split size too large, - your ebook reader may have trouble with the EPUB. + your e-book reader may have trouble with the EPUB. ''') if not minz: d = error_dialog(self, _('Conversion Failed'), msg, diff --git a/src/calibre/gui2/viewer/config.py b/src/calibre/gui2/viewer/config.py index a76796e28f..2f9cb2932f 100644 --- a/src/calibre/gui2/viewer/config.py +++ b/src/calibre/gui2/viewer/config.py @@ -25,7 +25,7 @@ from calibre.gui2.viewer.config_ui import Ui_Dialog def config(defaults=None): - desc = _('Options to customize the ebook viewer') + desc = _('Options to customize the e-book viewer') if defaults is None: c = Config('viewer', desc) else: @@ -53,7 +53,7 @@ def config(defaults=None): c.add_opt('remember_current_page', default=True, help=_('Save the current position in the document, when quitting')) c.add_opt('copy_bookmarks_to_file', default=True, - help=_('Copy bookmarks to the ebook file for easy sharing, if possible')) + help=_('Copy bookmarks to the e-book file for easy sharing, if possible')) c.add_opt('wheel_flips_pages', default=False, help=_('Have the mouse wheel turn pages')) c.add_opt('wheel_scroll_fraction', default=100, diff --git a/src/calibre/gui2/viewer/config.ui b/src/calibre/gui2/viewer/config.ui index 8d7c6496e7..70ea633dec 100644 --- a/src/calibre/gui2/viewer/config.ui +++ b/src/calibre/gui2/viewer/config.ui @@ -842,10 +842,10 @@ You must enter the search URL for the search engine, with the placeholder - Keep a copy of all bookmarks/current page information inside the ebook file, so that you can share them by simply sending the ebook file itself. Currently only works with ebooks in the EPUB format. + Keep a copy of all bookmarks/current page information inside the e-book file, so that you can share them by simply sending the e-book file itself. Currently only works with e-books in the EPUB format. - Keep a copy of &bookmarks/current page inside the ebook file, for easy sharing + Keep a copy of &bookmarks/current page inside the e-book file, for easy sharing diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index 6fa14f1ebc..f5508b20f0 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -87,7 +87,7 @@ class Worker(Thread): self.exception = self.traceback = None except BadZipfile: self.exception = _( - 'This ebook is corrupted and cannot be opened. If you ' + 'This e-book is corrupted and cannot be opened. If you ' 'downloaded it from somewhere, try downloading it again.') self.traceback = '' except WorkerError as err: @@ -1160,7 +1160,7 @@ class EbookViewer(MainWindow): def config(defaults=None): - desc = _('Options to control the ebook viewer') + desc = _('Options to control the e-book viewer') if defaults is None: c = Config('viewer', desc) else: @@ -1192,7 +1192,7 @@ def option_parser(): parser = c.option_parser(usage=_('''\ %prog [options] file -View an ebook. +View an e-book. ''')) setup_gui_option_parser(parser) return parser diff --git a/src/calibre/gui2/viewer/ui.py b/src/calibre/gui2/viewer/ui.py index 5a2f0db0f1..5e36055560 100644 --- a/src/calibre/gui2/viewer/ui.py +++ b/src/calibre/gui2/viewer/ui.py @@ -388,7 +388,7 @@ class Main(MainWindow): a('forward', _('Forward'), 'forward.png') self.tool_bar.addSeparator() - a('open_ebook', _('Open ebook'), 'document_open.png', menu_name='open_history') + a('open_ebook', _('Open e-book'), 'document_open.png', menu_name='open_history') a('copy', _('Copy to clipboard'), 'edit-copy.png').setDisabled(True) a('font_size_larger', _('Increase font size'), 'font_size_larger.png') a('font_size_smaller', _('Decrease font size'), 'font_size_smaller.png') diff --git a/src/calibre/library/cli.py b/src/calibre/library/cli.py index 341732bb62..17459176b0 100644 --- a/src/calibre/library/cli.py +++ b/src/calibre/library/cli.py @@ -432,7 +432,7 @@ the directory related options below. ' Can be specified multiple times for multiple patterns. For e.g.: *.pdf will ignore all pdf files')) fadd('--add', 'add', _( 'A filename (glob) pattern, files matching this pattern will be added when scanning directories for files,' - ' even if they are not of a known ebook file type. Can be specified multiple times for multiple patterns.')) + ' even if they are not of a known e-book file type. Can be specified multiple times for multiple patterns.')) parser.add_option_group(g) return parser @@ -551,7 +551,7 @@ def add_format_option_parser(): '''\ %prog add_format [options] id ebook_file -Add the ebook in ebook_file to the available formats for the logical book identified \ +Add the e-book in ebook_file to the available formats for the logical book identified \ by id. You can get id by using the search command. If the format already exists, \ it is replaced, unless the do not replace option is specified.\ ''')) diff --git a/src/calibre/linux.py b/src/calibre/linux.py index b0cae1a895..78a882c383 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -158,7 +158,7 @@ for f in mr: print () -if mimetype_icons and raw_input('Remove the ebook format icons? [y/n]:').lower() in ['', 'y']: +if mimetype_icons and raw_input('Remove the e-book format icons? [y/n]:').lower() in ['', 'y']: for i, (name, size) in enumerate(mimetype_icons): remove_icon('mimetypes', name, size, update=i == len(mimetype_icons) - 1) ''' @@ -1050,7 +1050,7 @@ def get_appdata(): 'summary':_('The one stop solution to all your e-book needs'), 'description':( _('calibre is the one stop solution to all your e-book needs.'), - _('You can use calibre to catalog your books, fetch metadata for them automatically, convert them from and to all the various ebook formats, send them to your e-book reader devices, read the books on your computer, edit the books in a dedicated e-book editor and even make them available over the network with the built-in content server. You can also download news and periodicals in e-book format from over a thousand different news and magazine websites.') # noqa + _('You can use calibre to catalog your books, fetch metadata for them automatically, convert them from and to all the various e-book formats, send them to your e-book reader devices, read the books on your computer, edit the books in a dedicated e-book editor and even make them available over the network with the built-in content server. You can also download news and periodicals in e-book format from over a thousand different news and magazine websites.') # noqa ), 'screenshots':( (1408, 792, 'https://lh4.googleusercontent.com/-bNE1hc_3pIc/UvHLwKPGBPI/AAAAAAAAASA/8oavs_c6xoU/w1408-h792-no/main-default.png',),