diff --git a/manual/db_api.rst b/manual/db_api.rst index 40ba1eca75..5233fc8aa9 100644 --- a/manual/db_api.rst +++ b/manual/db_api.rst @@ -1,6 +1,6 @@ .. _db_api: -API Documentation for the database interface +API documentation for the database interface ====================================================== .. module:: calibre.db.cache diff --git a/manual/polish.rst b/manual/polish.rst index a853838fba..2a66dd4bce 100644 --- a/manual/polish.rst +++ b/manual/polish.rst @@ -1,6 +1,6 @@ .. _polish_api: -API Documentation for the ebook editing tools +API documentation for the e-book editing tools =============================================== The ebook editing tools consist of a diff --git a/manual/viewer.rst b/manual/viewer.rst index 2d67eb48ab..56c4407292 100644 --- a/manual/viewer.rst +++ b/manual/viewer.rst @@ -1,9 +1,9 @@ .. _viewer: -The Ebook Viewer +The E-book viewer ============================= -calibre includes a built-in ebook viewer that can view all the major ebook formats. +calibre includes a built-in e-book viewer that can view all the major e-book formats. The viewer is highly customizable and has many advanced features. .. contents:: @@ -14,11 +14,11 @@ Starting the viewer -------------------- You can view any of the books in your calibre library by selecting the book and pressing the :guilabel:`View` button. This -will open up the book in the ebook viewer. You can also launch the viewer by itself from the Start menu in Windows +will open up the book in the e-book viewer. You can also launch the viewer by itself from the Start menu in Windows or using the command :command:`ebook-viewer` in Linux and OS X (you have to install the command line tools on OS X first by going to :guilabel:`Preferences->Advanced->Miscellaneous`). -Navigating around an ebook +Navigating around an e-book ----------------------------- .. |pni| image:: images/prev_next.png @@ -33,7 +33,7 @@ Navigating around an ebook You can "turn pages" in a book by using the :guilabel:`Page Next` and :guilabel:`Page Previous` buttons |pni|, or by pressing -the Page Down/Page Up keys. Unlike most ebook viewers, calibre does not force you to view books in paged mode. You can +the Page Down/Page Up keys. Unlike most e-book viewers, calibre does not force you to view books in paged mode. You can scroll by amounts less than a page by using the scroll bar or various customizable keyboard shortcuts. Bookmarks @@ -53,7 +53,7 @@ This will bring up a list of sections in the book. You can click on any of them Navigating by location ^^^^^^^^^^^^^^^^^^^^^^^^ -Ebooks, unlike paper books, have no concept of pages. Instead, +E-books, unlike paper books, have no concept of pages. Instead, as you read through the book, you will notice that your position in the book is displayed in the upper left corner in a box like this |navposi|. This is both your current position and the total length of the book. These numbers are independent of the screen size and font size you are viewing the book at, and they play a similar role to page numbers in paper books. @@ -70,7 +70,7 @@ You can use this number to unambiguously refer to parts of the books when discus in other works. You can enter these numbers in the box marked Go to at the top of the window to go to a particular reference location. -If you click on links inside the ebook to take you to different parts of the book, such as an endnote, you can use the :guilabel:`Back` and :guilabel:`Forward` buttons +If you click on links inside the e-book to take you to different parts of the book, such as an endnote, you can use the :guilabel:`Back` and :guilabel:`Forward` buttons in the top left corner to return to where you were. These buttons behave just like those in a web browser. Customizing the look and feel of your reading experience diff --git a/src/calibre/gui2/open_with.py b/src/calibre/gui2/open_with.py index f3c0251e2c..ba7ce3349a 100644 --- a/src/calibre/gui2/open_with.py +++ b/src/calibre/gui2/open_with.py @@ -63,6 +63,7 @@ def entry_to_icon_text(entry, only_text=False): icon = QIcon(pmap) return icon, entry.get('name', entry.get('Name')) or _('Unknown') + if iswindows: # Windows {{{ from calibre.utils.winreg.default_programs import find_programs, friendly_app_name @@ -300,6 +301,7 @@ class ChooseProgram(Dialog): # {{{ self.select_manually = True self.reject() + oprefs.defaults['entries'] = {} @@ -353,7 +355,7 @@ class EditPrograms(Dialog): # {{{ self.bb.clear(), self.bb.setStandardButtons(self.bb.Close) self.rb = b = self.bb.addButton(_('&Remove'), self.bb.ActionRole) b.clicked.connect(self.remove), b.setIcon(QIcon(I('list_remove.png'))) - self.cb = b = self.bb.addButton(_('Change &Icon'), self.bb.ActionRole) + self.cb = b = self.bb.addButton(_('Change &icon'), self.bb.ActionRole) b.clicked.connect(self.change_icon), b.setIcon(QIcon(I('icon_choose.png'))) l.addWidget(self.bb) @@ -408,6 +410,7 @@ def edit_programs(file_type, parent): d.exec_() # }}} + registered_shortcuts = {} @@ -436,6 +439,7 @@ def register_keyboard_shortcuts(gui=None, finalize=False): if finalize: gui.keyboard.finalize() + if __name__ == '__main__': from pprint import pprint app = Application([]) diff --git a/src/calibre/gui2/tag_browser/view.py b/src/calibre/gui2/tag_browser/view.py index ff3e86aca0..c7d5511438 100644 --- a/src/calibre/gui2/tag_browser/view.py +++ b/src/calibre/gui2/tag_browser/view.py @@ -353,7 +353,7 @@ class TagsView(QTreeView): # {{{ if action == 'set_icon': try: path = choose_files(self, 'choose_category_icon', - _('Change Icon for: %s')%key, filters=[ + _('Change icon for: %s')%key, filters=[ ('Images', ['png', 'gif', 'jpg', 'jpeg'])], all_files=False, select_only_single_file=True) if path: diff --git a/src/calibre/gui2/tweak_book/editor/snippets.py b/src/calibre/gui2/tweak_book/editor/snippets.py index 1056a048e6..e014202613 100644 --- a/src/calibre/gui2/tweak_book/editor/snippets.py +++ b/src/calibre/gui2/tweak_book/editor/snippets.py @@ -42,6 +42,7 @@ def contains(l1, r1, l2, r2): # True iff (l2, r2) if contained in (l1, r1) return l2 > l1 and r2 < r1 + builtin_snippets = { # {{{ snip_key('Lorem', 'html', 'xml'): { 'description': _('Insert filler text'), @@ -162,6 +163,7 @@ def parse_template(template, start_offset=0, is_toplevel=True, grouped=True): # }}} + _snippets = None user_snippets = JSONConfig('editor_snippets') @@ -565,7 +567,7 @@ class EditSnippet(QWidget): class UserSnippets(Dialog): def __init__(self, parent=None): - Dialog.__init__(self, _('Create/Edit snippets'), 'snippet-editor', parent=parent) + Dialog.__init__(self, _('Create/edit snippets'), 'snippet-editor', parent=parent) self.setWindowIcon(QIcon(I('snippets.png'))) def setup_ui(self): @@ -712,6 +714,7 @@ class UserSnippets(Dialog): self.edit_snip.apply_snip(lw.currentItem().data(Qt.UserRole), creating_snippet=True) # }}} + if __name__ == '__main__': from calibre.gui2 import Application app = Application([]) diff --git a/src/calibre/gui2/tweak_book/file_list.py b/src/calibre/gui2/tweak_book/file_list.py index d4a3a8f65d..b2d1726a2c 100644 --- a/src/calibre/gui2/tweak_book/file_list.py +++ b/src/calibre/gui2/tweak_book/file_list.py @@ -739,7 +739,7 @@ class FileList(QTreeWidget): filters = [oext] fname = _('Files') if mt in OEB_DOCS: - fname = _('HTML Files') + fname = _('HTML files') filters = 'html htm xhtm xhtml shtml'.split() elif is_raster_image(mt): fname = _('Images') diff --git a/src/calibre/gui2/tweak_book/polish.py b/src/calibre/gui2/tweak_book/polish.py index 5ec6fec23d..bc8c22b782 100644 --- a/src/calibre/gui2/tweak_book/polish.py +++ b/src/calibre/gui2/tweak_book/polish.py @@ -137,7 +137,7 @@ class ImageItemDelegate(QStyledItemDelegate): class CompressImages(Dialog): def __init__(self, parent=None): - Dialog.__init__(self, _('Compress Images'), 'compress-images', parent=parent) + Dialog.__init__(self, _('Compress images'), 'compress-images', parent=parent) def setup_ui(self): from calibre.ebooks.oeb.polish.images import get_compressible_images @@ -200,7 +200,7 @@ class CompressImagesProgress(Dialog): self.names, self.jpeg_quality = names, jpeg_quality self.keep_going = True self.result = (None, '') - Dialog.__init__(self, _('Compressing Images...'), 'compress-images-progress', parent=parent) + Dialog.__init__(self, _('Compressing images...'), 'compress-images-progress', parent=parent) self.gui_loop.connect(self.update_progress, type=Qt.QueuedConnection) self.cidone.connect(self.accept, type=Qt.QueuedConnection) t = Thread(name='RunCompressImages', target=self.run_compress) diff --git a/src/calibre/gui2/tweak_book/search.py b/src/calibre/gui2/tweak_book/search.py index 90ba9202ff..342c7c9550 100644 --- a/src/calibre/gui2/tweak_book/search.py +++ b/src/calibre/gui2/tweak_book/search.py @@ -202,7 +202,7 @@ class ModeBox(QComboBox): def __init__(self, parent): QComboBox.__init__(self, parent) - self.addItems([_('Normal'), _('Regex'), _('Regex-Function')]) + self.addItems([_('Normal'), _('Regex'), _('Regex-function')]) self.setToolTip('' + _( '''Select how the search expression is interpreted
' + re.sub(r'(https:\S+)', r'{}'.format(_('here')),
job.details[idx:].partition(':')[2].strip())
- d = error_dialog(self, _('Conversion Failed'), msg, det_msg=job.details)
+ d = error_dialog(self, _('Conversion failed'), msg, det_msg=job.details)
d.setModal(False)
d.show()
self._modeless_dialogs.append(d)
@@ -890,7 +890,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
if self.proceed_question.questions:
msg = _('There are library updates waiting. Are you sure you want to quit?')
- if not question_dialog(self, _('Library Updates Waiting'), msg):
+ if not question_dialog(self, _('Library updates waiting'), msg):
return False
from calibre.db.delete_service import has_jobs
diff --git a/src/calibre/gui2/viewer/bookmarkmanager.py b/src/calibre/gui2/viewer/bookmarkmanager.py
index b2ea37f347..1a1c60dc66 100644
--- a/src/calibre/gui2/viewer/bookmarkmanager.py
+++ b/src/calibre/gui2/viewer/bookmarkmanager.py
@@ -196,15 +196,15 @@ class BookmarkManager(QWidget):
def export_bookmarks(self):
filename = choose_save_file(
- self, 'export-viewer-bookmarks', _('Export Bookmarks'),
- filters=[(_('Saved Bookmarks'), ['pickle'])], all_files=False, initial_filename='bookmarks.pickle')
+ self, 'export-viewer-bookmarks', _('Export bookmarks'),
+ filters=[(_('Saved bookmarks'), ['pickle'])], all_files=False, initial_filename='bookmarks.pickle')
if filename:
with open(filename, 'wb') as fileobj:
cPickle.dump(self.get_bookmarks(), fileobj, -1)
def import_bookmarks(self):
- files = choose_files(self, 'export-viewer-bookmarks', _('Import Bookmarks'),
- filters=[(_('Saved Bookmarks'), ['pickle'])], all_files=False, select_only_single_file=True)
+ files = choose_files(self, 'export-viewer-bookmarks', _('Import bookmarks'),
+ filters=[(_('Saved bookmarks'), ['pickle'])], all_files=False, select_only_single_file=True)
if not files:
return
filename = files[0]
@@ -230,4 +230,3 @@ class BookmarkManager(QWidget):
bookmarks.append(bm)
self.set_bookmarks([bm for bm in bookmarks if bm['title'] != 'calibre_current_page_bookmark'])
self.edited.emit(self.get_bookmarks())
-
diff --git a/src/calibre/gui2/viewer/config.ui b/src/calibre/gui2/viewer/config.ui
index c528a05450..8d7c6496e7 100644
--- a/src/calibre/gui2/viewer/config.ui
+++ b/src/calibre/gui2/viewer/config.ui
@@ -11,7 +11,7 @@