From d1bb088d884286cd06dcbf198cc9b6b0758855f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 13 Apr 2015 14:37:30 +0530 Subject: [PATCH] Various string fixes. Fixes #1443028 [missing strings in .po file](https://bugs.launchpad.net/calibre/+bug/1443028) --- src/calibre/devices/kobo/driver.py | 8 ++++---- src/calibre/devices/nokia/driver.py | 5 +---- src/calibre/ebooks/oeb/polish/subset.py | 10 +++++----- src/calibre/gui2/actions/random.py | 2 +- src/calibre/gui2/convert/comic_input.ui | 2 +- src/calibre/gui2/convert/txt_input.py | 4 ---- src/calibre/gui2/dialogs/search.ui | 2 +- src/calibre/gui2/preferences/adding.ui | 2 +- src/calibre/gui2/preferences/coloring.py | 6 +++--- src/calibre/gui2/preferences/texture_chooser.py | 2 +- .../gui2/store/config/chooser/adv_search_builder.ui | 2 +- src/calibre/gui2/store/search/adv_search_builder.ui | 2 +- .../gui2/store/stores/mobileread/adv_search_builder.ui | 2 +- src/calibre/gui2/tweak_book/preview.py | 4 +--- src/calibre/gui2/wizard/send_email.py | 5 ++--- 15 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 31c4f93726..60747119a2 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -116,7 +116,7 @@ class KOBO(USBMS): ' by default they are no longer displayed as there is no good reason to ' 'see them. Enable if you wish to see/delete them.'), _('Show Recommendations') + - ':::'+_('Kobo now shows recommendations on the device. In some case these have ' + ':::'+_('Kobo now 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.'), _('Attempt to support newer firmware') + @@ -693,8 +693,8 @@ class KOBO(USBMS): if extension == '.kobo': from calibre.devices.errors import UserFeedback raise UserFeedback(_("Not Implemented"), - _('".kobo" files do not exist on the device as books ' - 'instead, they are rows in the sqlite database. ' + _('".kobo" files do not exist on the device as books; ' + 'instead they are rows in the sqlite database. ' 'Currently they cannot be exported or viewed.'), UserFeedback.WARN) @@ -1374,7 +1374,7 @@ class KOBOTOUCH(KOBO): BCD = [0x0110, 0x0326] # Image file name endings. Made up of: image size, min_dbversion, max_dbversion, isFullSize, - # Note: "200" has been used just as a much larger number than the current versions. It is just a lazy + # Note: "200" has been used just as a much larger number than the current versions. It is just a lazy # way of making it open ended. COVER_FILE_ENDINGS = { ' - N3_FULL.parsed':[(600,800),0, 200,True,], # Used for screensaver, home screen diff --git a/src/calibre/devices/nokia/driver.py b/src/calibre/devices/nokia/driver.py index 7749f85e26..c5afb2d71d 100644 --- a/src/calibre/devices/nokia/driver.py +++ b/src/calibre/devices/nokia/driver.py @@ -50,7 +50,7 @@ class E71X(USBMS): name = 'Nokia E71X device interface' gui_name = 'Nokia E71X' - description = 'Communicate with the Nokia E71X' + description = _('Communicate with the Nokia E71X') author = 'Kovid Goyal' supported_platforms = ['windows', 'linux', 'osx'] @@ -58,7 +58,6 @@ class E71X(USBMS): PRODUCT_ID = [0x1a0] BCD = [0x100] - FORMATS = ['mobi', 'prc'] EBOOK_DIR_MAIN = 'eBooks' @@ -79,7 +78,6 @@ class E52(USBMS): PRODUCT_ID = [0x1CD, 0x273, 0x00aa] BCD = [0x100] - FORMATS = ['epub', 'fb2', 'mobi', 'prc', 'txt'] EBOOK_DIR_MAIN = 'eBooks' @@ -87,4 +85,3 @@ class E52(USBMS): VENDOR_NAME = 'NOKIA' WINDOWS_MAIN_MEM = ['S60', 'E71'] - diff --git a/src/calibre/ebooks/oeb/polish/subset.py b/src/calibre/ebooks/oeb/polish/subset.py index a0b144edd8..36c0ae8081 100644 --- a/src/calibre/ebooks/oeb/polish/subset.py +++ b/src/calibre/ebooks/oeb/polish/subset.py @@ -44,7 +44,7 @@ def subset_all_fonts(container, font_stats, report): total_old += f.tell() if not chars: remove.add(name) - report('Removed unused font: %s'%name) + report(_('Removed unused font: %s')%name) continue with container.open(name, 'r+b') as f: raw = f.read() @@ -72,9 +72,9 @@ def subset_all_fonts(container, font_stats, report): nlen = sum(new_sizes.itervalues()) total_new += len(nraw) if nlen == olen: - report('The font %s was already subset'%font_name) + report(_('The font %s was already subset')%font_name) else: - report('Decreased the font %s to %.1f%% of its original size'% + report(_('Decreased the font %s to %.1f%% of its original size')% (font_name, nlen/olen * 100)) changed = True f.seek(0), f.truncate(), f.write(nraw) @@ -97,10 +97,10 @@ def subset_all_fonts(container, font_stats, report): style.text = sheet.cssText container.dirty(name) if total_old > 0: - report('Reduced total font size to %.1f%% of original'%( + report(_('Reduced total font size to %.1f%% of original')%( total_new/total_old*100)) else: - report('No embedded fonts found') + report(_('No embedded fonts found')) return changed if __name__ == '__main__': diff --git a/src/calibre/gui2/actions/random.py b/src/calibre/gui2/actions/random.py index 40f37060aa..87c029fd2a 100644 --- a/src/calibre/gui2/actions/random.py +++ b/src/calibre/gui2/actions/random.py @@ -15,7 +15,7 @@ class PickRandomAction(InterfaceAction): name = 'Pick Random Book' action_spec = (_('Pick a random book'), 'random.png', - 'Select a random book from your calibre library', ()) + _('Select a random book from your calibre library'), ()) dont_add_to = frozenset(['context-menu-device']) def genesis(self): diff --git a/src/calibre/gui2/convert/comic_input.ui b/src/calibre/gui2/convert/comic_input.ui index 676032942f..ca1953d6b2 100644 --- a/src/calibre/gui2/convert/comic_input.ui +++ b/src/calibre/gui2/convert/comic_input.ui @@ -143,7 +143,7 @@ - Override image &size: + Override image &size: opt_comic_image_size diff --git a/src/calibre/gui2/convert/txt_input.py b/src/calibre/gui2/convert/txt_input.py index c8793e7029..c3adcbb5d3 100644 --- a/src/calibre/gui2/convert/txt_input.py +++ b/src/calibre/gui2/convert/txt_input.py @@ -35,10 +35,6 @@ class PluginWidget(Widget, Ui_Form): self.initialize_options(get_option, get_help, db, book_id) - def setup_widget_help(self, g): - g._help = _('Specify which markdown extensions to enable') - return Widget.setup_widget_help(self, g) - def set_value_handler(self, g, val): if g is self.opt_markdown_extensions: for i in self.md_map.itervalues(): diff --git a/src/calibre/gui2/dialogs/search.ui b/src/calibre/gui2/dialogs/search.ui index f35946c92c..b2ee849dac 100644 --- a/src/calibre/gui2/dialogs/search.ui +++ b/src/calibre/gui2/dialogs/search.ui @@ -161,7 +161,7 @@ - But dont show entries that have... + But don't show entries that have... diff --git a/src/calibre/gui2/preferences/adding.ui b/src/calibre/gui2/preferences/adding.ui index 874eac5a9c..98835bea38 100644 --- a/src/calibre/gui2/preferences/adding.ui +++ b/src/calibre/gui2/preferences/adding.ui @@ -275,7 +275,7 @@ that have been explicitly ignored below. - If set, this option will causes calibre to check if a file + If set, this option will cause calibre to check if a file being auto-added is already in the calibre library. If it is, a message will pop up asking you whether you want to add it anyway. diff --git a/src/calibre/gui2/preferences/coloring.py b/src/calibre/gui2/preferences/coloring.py index a8bab42f70..ca30563703 100644 --- a/src/calibre/gui2/preferences/coloring.py +++ b/src/calibre/gui2/preferences/coloring.py @@ -303,7 +303,7 @@ class RuleEditor(QDialog): # {{{ self.setLayout(l) self.l1 = l1 = QLabel(_('Create a {0} rule by' - ' filling in the boxes below'.format(rule_text))) + ' filling in the boxes below').format(rule_text)) l.addWidget(l1, 0, 0, 1, 8) self.f1 = QFrame(self) @@ -503,7 +503,7 @@ class RuleEditor(QDialog): # {{{ try: path = choose_files(self, 'choose_category_icon', _('Select Icon'), filters=[ - ('Images', ['png', 'gif', 'jpg', 'jpeg'])], + (_('Images'), ['png', 'gif', 'jpg', 'jpeg'])], all_files=False, select_only_single_file=True) if path: icon_path = path[0] @@ -929,7 +929,7 @@ class EditRules(QWidget): # {{{ self.enabled.setText(_('Show &emblems next to the covers')) self.enabled.stateChanged.connect(self.enabled_toggled) self.enabled.setToolTip(_( - 'If checked, you can tell calibre to displays icons of your choosing' + 'If checked, you can tell calibre to display icons of your choosing' ' next to the covers shown in the cover grid, controlled by the' ' metadata of the book.')) self.enabled_toggled() diff --git a/src/calibre/gui2/preferences/texture_chooser.py b/src/calibre/gui2/preferences/texture_chooser.py index 5edbeb592d..124ea0c982 100644 --- a/src/calibre/gui2/preferences/texture_chooser.py +++ b/src/calibre/gui2/preferences/texture_chooser.py @@ -140,7 +140,7 @@ class TextureChooser(QDialog): return if self.selected_fname.startswith(':'): return error_dialog(self, _('Cannot remove'), - _('Cannot remover builtin textures'), show=True) + _('Cannot remove builtin textures'), show=True) os.remove(unicode(self.selected_item.data(Qt.UserRole+1) or '')) self.images.takeItem(self.images.row(self.selected_item)) diff --git a/src/calibre/gui2/store/config/chooser/adv_search_builder.ui b/src/calibre/gui2/store/config/chooser/adv_search_builder.ui index e2d36c4e15..d20c366235 100644 --- a/src/calibre/gui2/store/config/chooser/adv_search_builder.ui +++ b/src/calibre/gui2/store/config/chooser/adv_search_builder.ui @@ -120,7 +120,7 @@ - But dont show entries that have... + But don't show entries that have... diff --git a/src/calibre/gui2/store/search/adv_search_builder.ui b/src/calibre/gui2/store/search/adv_search_builder.ui index 0e7d5edf73..e47713bc0d 100644 --- a/src/calibre/gui2/store/search/adv_search_builder.ui +++ b/src/calibre/gui2/store/search/adv_search_builder.ui @@ -120,7 +120,7 @@ - But dont show entries that have... + But don't show entries that have... diff --git a/src/calibre/gui2/store/stores/mobileread/adv_search_builder.ui b/src/calibre/gui2/store/stores/mobileread/adv_search_builder.ui index 5e8f01d1f2..6e34cc4f96 100644 --- a/src/calibre/gui2/store/stores/mobileread/adv_search_builder.ui +++ b/src/calibre/gui2/store/stores/mobileread/adv_search_builder.ui @@ -120,7 +120,7 @@ - But dont show entries that have... + But don't show entries that have... diff --git a/src/calibre/gui2/tweak_book/preview.py b/src/calibre/gui2/tweak_book/preview.py index 4c0a72eace..3becb5849f 100644 --- a/src/calibre/gui2/tweak_book/preview.py +++ b/src/calibre/gui2/tweak_book/preview.py @@ -400,9 +400,7 @@ class WebView(QWebView):

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. - + aspects of your ebook will not work, such as page breaks and page margins. ''')) self.page().current_root = None diff --git a/src/calibre/gui2/wizard/send_email.py b/src/calibre/gui2/wizard/send_email.py index dfe4889e97..a71e25edb0 100644 --- a/src/calibre/gui2/wizard/send_email.py +++ b/src/calibre/gui2/wizard/send_email.py @@ -81,13 +81,12 @@ class RelaySetup(QDialog): self.ptoggle = QCheckBox(_('&Show password'), self) l.addWidget(self.ptoggle, r, 2) self.ptoggle.stateChanged.connect( - lambda s: self.password.setEchoMode(self.password.Normal if s - == Qt.Checked else self.password.Password)) + lambda s: self.password.setEchoMode(self.password.Normal if s == Qt.Checked else self.password.Password)) self.username.setText(service['username']) self.password.setEchoMode(self.password.Password) self.bl = QLabel('

' + _( 'If you plan to use email to send books to your Kindle, remember to' - ' add the your %s email address to the allowed email addresses in your ' + ' add your %s email address to the allowed email addresses in your ' 'Amazon.com Kindle management page.')%service['name']) self.bl.setWordWrap(True) l.addWidget(self.bl, l.rowCount(), 0, 3, 0)