String changes

This commit is contained in:
Kovid Goyal 2017-05-09 17:16:46 +05:30
parent 995b789b38
commit 70622c0774
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
9 changed files with 20 additions and 20 deletions

View File

@ -595,7 +595,7 @@ class InterfaceActionBase(Plugin): # {{{
supported_platforms = ['windows', 'osx', 'linux'] supported_platforms = ['windows', 'osx', 'linux']
author = 'Kovid Goyal' author = 'Kovid Goyal'
type = _('User Interface Action') type = _('User interface action')
can_be_disabled = False can_be_disabled = False
actual_plugin = None actual_plugin = None

View File

@ -1187,7 +1187,7 @@ class Adding(PreferencesPlugin):
icon = I('add_book.png') icon = I('add_book.png')
gui_name = _('Adding books') gui_name = _('Adding books')
category = 'Import/Export' category = 'Import/Export'
gui_category = _('Import/Export') gui_category = _('Import/export')
category_order = 3 category_order = 3
name_order = 1 name_order = 1
config_widget = 'calibre.gui2.preferences.adding' config_widget = 'calibre.gui2.preferences.adding'
@ -1200,7 +1200,7 @@ class Saving(PreferencesPlugin):
icon = I('save.png') icon = I('save.png')
gui_name = _('Saving books to disk') gui_name = _('Saving books to disk')
category = 'Import/Export' category = 'Import/Export'
gui_category = _('Import/Export') gui_category = _('Import/export')
category_order = 3 category_order = 3
name_order = 2 name_order = 2
config_widget = 'calibre.gui2.preferences.saving' config_widget = 'calibre.gui2.preferences.saving'
@ -1213,7 +1213,7 @@ class Sending(PreferencesPlugin):
icon = I('sync.png') icon = I('sync.png')
gui_name = _('Sending books to devices') gui_name = _('Sending books to devices')
category = 'Import/Export' category = 'Import/Export'
gui_category = _('Import/Export') gui_category = _('Import/export')
category_order = 3 category_order = 3
name_order = 3 name_order = 3
config_widget = 'calibre.gui2.preferences.sending' config_widget = 'calibre.gui2.preferences.sending'

View File

@ -124,7 +124,7 @@ class SNBOutput(OutputFormatPlugin):
log.warn('This SNB file has no Table of Contents. ' log.warn('This SNB file has no Table of Contents. '
'Creating a default TOC') 'Creating a default TOC')
first = iter(oeb_book.spine).next() first = iter(oeb_book.spine).next()
oeb_book.toc.add(_('Start Page'), first.href) oeb_book.toc.add(_('Start page'), first.href)
else: else:
first = iter(oeb_book.spine).next() first = iter(oeb_book.spine).next()
if oeb_book.toc[0].href != first.href: if oeb_book.toc[0].href != first.href:

View File

@ -1368,7 +1368,7 @@ class Guide(object):
a fragment identifier. a fragment identifier.
""" """
_TYPES_TITLES = [('cover', __('Cover')), _TYPES_TITLES = [('cover', __('Cover')),
('title-page', __('Title Page')), ('title-page', __('Title page')),
('toc', __('Table of Contents')), ('toc', __('Table of Contents')),
('index', __('Index')), ('index', __('Index')),
('glossary', __('Glossary')), ('glossary', __('Glossary')),
@ -1379,11 +1379,11 @@ class Guide(object):
('dedication', __('Dedication')), ('dedication', __('Dedication')),
('epigraph', __('Epigraph')), ('epigraph', __('Epigraph')),
('foreword', __('Foreword')), ('foreword', __('Foreword')),
('loi', __('List of Illustrations')), ('loi', __('List of illustrations')),
('lot', __('List of Tables')), ('lot', __('List of tables')),
('notes', __('Notes')), ('notes', __('Notes')),
('preface', __('Preface')), ('preface', __('Preface')),
('text', __('Main Text'))] ('text', __('Main text'))]
TYPES = set(t for t, _ in _TYPES_TITLES) # noqa TYPES = set(t for t, _ in _TYPES_TITLES) # noqa
TITLES = dict(_TYPES_TITLES) TITLES = dict(_TYPES_TITLES)
ORDER = dict((t, i) for i, (t, _) in enumerate(_TYPES_TITLES)) # noqa ORDER = dict((t, i) for i, (t, _) in enumerate(_TYPES_TITLES)) # noqa

View File

@ -349,7 +349,7 @@ def check_links(container):
elif purl.path and purl.path.startswith('/') and purl.scheme in {'', 'file'}: elif purl.path and purl.path.startswith('/') and purl.scheme in {'', 'file'}:
a(LocalLink(_('The link %s points to a file outside the book') % fl(href), name, lnum, col)) a(LocalLink(_('The link %s points to a file outside the book') % fl(href), name, lnum, col))
elif purl.path and purl.scheme in {'', 'file'} and ':' in urlunquote(purl.path): elif purl.path and purl.scheme in {'', 'file'} and ':' in urlunquote(purl.path):
a(InvalidCharInLink(_('The link %s contains a : character, this will cause errors on windows computers') % fl(href), name, lnum, col)) a(InvalidCharInLink(_('The link %s contains a : character, this will cause errors on Windows computers') % fl(href), name, lnum, col))
spine_docs = {name for name, linear in container.spine_names} spine_docs = {name for name, linear in container.spine_names}
spine_styles = {tname for name in spine_docs for tname in links_map[name] if container.mime_map.get(tname, None) in OEB_STYLES} spine_styles = {tname for name in spine_docs for tname in links_map[name] if container.mime_map.get(tname, None) in OEB_STYLES}

View File

@ -135,9 +135,9 @@ class IgnoredFolders(QDialog):
QDialogButtonBox.Cancel) QDialogButtonBox.Cancel)
self.bb.accepted.connect(self.accept) self.bb.accepted.connect(self.accept)
self.bb.rejected.connect(self.reject) self.bb.rejected.connect(self.reject)
self.sab = self.bb.addButton(_('Select &All'), self.bb.ActionRole) self.sab = self.bb.addButton(_('Select &all'), self.bb.ActionRole)
self.sab.clicked.connect(self.select_all) self.sab.clicked.connect(self.select_all)
self.snb = self.bb.addButton(_('Select &None'), self.bb.ActionRole) self.snb = self.bb.addButton(_('Select &none'), self.bb.ActionRole)
self.snb.clicked.connect(self.select_none) self.snb.clicked.connect(self.select_none)
l.addWidget(self.bb) l.addWidget(self.bb)
self.setWindowTitle(_('Choose folders to scan')) self.setWindowTitle(_('Choose folders to scan'))
@ -243,7 +243,7 @@ def ignored_folders():
dev.shutdown() dev.shutdown()
return d.ignored_folders return d.ignored_folders
if __name__ == '__main__': if __name__ == '__main__':
print (browse()) print (browse())
# print ('Ignored:', ignored_folders()) # print ('Ignored:', ignored_folders())

View File

@ -551,7 +551,7 @@ class PluginUpdaterDialog(SizePersistedDialog):
sep1.setSeparator(True) sep1.setSeparator(True)
self.plugin_view.addAction(sep1) self.plugin_view.addAction(sep1)
self.toggle_enabled_action = QAction(_('Enable/&Disable plugin'), self) self.toggle_enabled_action = QAction(_('Enable/&disable plugin'), self)
self.toggle_enabled_action.setToolTip(_('Enable or disable this plugin')) self.toggle_enabled_action.setToolTip(_('Enable or disable this plugin'))
self.toggle_enabled_action.triggered.connect(self._toggle_enabled_clicked) self.toggle_enabled_action.triggered.connect(self._toggle_enabled_clicked)
self.toggle_enabled_action.setEnabled(False) self.toggle_enabled_action.setEnabled(False)

View File

@ -146,7 +146,7 @@
<normaloff>:/images/next.png</normaloff>:/images/next.png</iconset> <normaloff>:/images/next.png</normaloff>:/images/next.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Next Page</string> <string>Next page</string>
</property> </property>
</action> </action>
<action name="action_previous_page"> <action name="action_previous_page">

View File

@ -139,7 +139,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
idx = self.gst_names.currentIndex() idx = self.gst_names.currentIndex()
name = icu_lower(unicode(self.gst_names.currentText())) name = icu_lower(unicode(self.gst_names.currentText()))
if not name: if not name:
return error_dialog(self.gui, _('Grouped Search Terms'), return error_dialog(self.gui, _('Grouped search terms'),
_('The search term cannot be blank'), _('The search term cannot be blank'),
show=True) show=True)
if idx != 0: if idx != 0:
@ -149,17 +149,17 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
if name != orig_name: if name != orig_name:
if name in self.db.field_metadata.get_search_terms() and \ if name in self.db.field_metadata.get_search_terms() and \
name not in self.orig_gst_keys: name not in self.orig_gst_keys:
return error_dialog(self.gui, _('Grouped Search Terms'), return error_dialog(self.gui, _('Grouped search terms'),
_('That name is already used for a column or grouped search term'), _('That name is already used for a column or grouped search term'),
show=True) show=True)
if name in [icu_lower(p) for p in self.db.prefs.get('user_categories', {})]: if name in [icu_lower(p) for p in self.db.prefs.get('user_categories', {})]:
return error_dialog(self.gui, _('Grouped Search Terms'), return error_dialog(self.gui, _('Grouped search terms'),
_('That name is already used for user category'), _('That name is already used for user category'),
show=True) show=True)
val = [v.strip() for v in unicode(self.gst_value.text()).split(',') if v.strip()] val = [v.strip() for v in unicode(self.gst_value.text()).split(',') if v.strip()]
if not val: if not val:
return error_dialog(self.gui, _('Grouped Search Terms'), return error_dialog(self.gui, _('Grouped search terms'),
_('The value box cannot be empty'), show=True) _('The value box cannot be empty'), show=True)
if orig_name and name != orig_name: if orig_name and name != orig_name:
@ -172,7 +172,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
def gst_delete_clicked(self): def gst_delete_clicked(self):
if self.gst_names.currentIndex() == 0: if self.gst_names.currentIndex() == 0:
return error_dialog(self.gui, _('Grouped Search Terms'), return error_dialog(self.gui, _('Grouped search terms'),
_('The empty grouped search term cannot be deleted'), show=True) _('The empty grouped search term cannot be deleted'), show=True)
name = unicode(self.gst_names.currentText()) name = unicode(self.gst_names.currentText())
if name in self.gst: if name in self.gst: