mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
String changes
This commit is contained in:
parent
5cb5c5d0c9
commit
1c9d837e08
@ -547,7 +547,7 @@ class ChooseLibraryAction(InterfaceAction):
|
||||
return
|
||||
else:
|
||||
return error_dialog(self.gui, _('Failed'),
|
||||
_('Database integrity check failed, click Show details'
|
||||
_('Database integrity check failed, click "Show details"'
|
||||
' for details.'), show=True, det_msg=d.error[1])
|
||||
|
||||
self.gui.status_bar.show_message(
|
||||
|
@ -518,13 +518,13 @@ class CopyToLibraryAction(InterfaceAction):
|
||||
err, tb = self.worker.failed_books[book_id]
|
||||
title = db.title(book_id, index_is_id=True)
|
||||
return _('Copying: {0} failed, with error:\n{1}').format(title, tb)
|
||||
title, msg = _('Failed to copy some books'), _('Could not copy some books, click "Show Details" for more information.')
|
||||
title, msg = _('Failed to copy some books'), _('Could not copy some books, click "Show details" for more information.')
|
||||
tb = '\n\n'.join(map(fmt_err, self.worker.failed_books))
|
||||
tb = ngettext('Failed to copy a book, see below for details',
|
||||
'Failed to copy {} books, see below for details', len(self.worker.failed_books)).format(
|
||||
len(self.worker.failed_books)) + '\n\n' + tb
|
||||
if len(ids) == len(self.worker.failed_books):
|
||||
title, msg = _('Failed to copy books'), _('Could not copy any books, click "Show Details" for more information.')
|
||||
title, msg = _('Failed to copy books'), _('Could not copy any books, click "Show details" for more information.')
|
||||
error_dialog(self.gui, title, msg, det_msg=tb, show=True)
|
||||
return self.worker.duplicate_ids
|
||||
|
||||
|
@ -903,7 +903,7 @@ class EditMetadataAction(InterfaceAction):
|
||||
|
||||
error_dialog(self.gui, _('Some failures'),
|
||||
_('Failed to apply updated metadata for some books'
|
||||
' in your library. Click "Show Details" to see '
|
||||
' in your library. Click "Show details" to see '
|
||||
'details.'), det_msg='\n\n'.join(msg), show=True)
|
||||
changed_books = len(self.applied_ids or ())
|
||||
self.refresh_gui(self.applied_ids)
|
||||
|
@ -188,7 +188,7 @@ class UnpackBook(QDialog):
|
||||
|
||||
if det_msg is not None:
|
||||
return error_dialog(self, _('Failed to unpack'),
|
||||
_('Could not explode the %s file. Click "Show Details" for '
|
||||
_('Could not explode the %s file. Click "Show details" for '
|
||||
'more information.')%self.current_format, det_msg=det_msg,
|
||||
show=True)
|
||||
|
||||
|
@ -180,7 +180,7 @@ class RegexBuilder(QDialog, Ui_RegexBuilder):
|
||||
def open_book(self, pathtoebook):
|
||||
with TemporaryFile('_prepprocess_gui') as tf:
|
||||
err_msg = _('Failed to generate markup for testing. Click '
|
||||
'"Show Details" to learn more.')
|
||||
'"Show details" to learn more.')
|
||||
try:
|
||||
fork_job('calibre.ebooks.oeb.iterator', 'get_preprocess_html',
|
||||
(pathtoebook, tf))
|
||||
|
@ -118,7 +118,7 @@ class AddFromISBN(QDialog):
|
||||
if self.books:
|
||||
if not question_dialog(self, _('Some invalid ISBNs'),
|
||||
_('Some of the ISBNs you entered were invalid. They will'
|
||||
' be ignored. Click Show Details to see which ones.'
|
||||
' be ignored. Click "Show details" to see which ones.'
|
||||
' Do you want to proceed?'), det_msg='\n'.join(bad),
|
||||
show_copy_button=True):
|
||||
return
|
||||
|
@ -120,12 +120,12 @@ class CheckLibraryDialog(QDialog):
|
||||
correct form to be a book title.</li>
|
||||
<li><b>Extra titles</b>: These are extra files in your calibre
|
||||
library that appear to be correctly-formed titles, but have no corresponding
|
||||
entries in the database</li>
|
||||
entries in the database.</li>
|
||||
<li><b>Invalid authors</b>: These are files appearing
|
||||
in the library where only author folders should be.</li>
|
||||
<li><b>Extra authors</b>: These are folders in the
|
||||
calibre library that appear to be authors but that do not have entries
|
||||
in the database</li>
|
||||
in the database.</li>
|
||||
<li><b>Missing book formats</b>: These are book formats that are in
|
||||
the database but have no corresponding format file in the book's folder.
|
||||
<li><b>Extra book formats</b>: These are book format files found in
|
||||
|
@ -131,7 +131,7 @@ class RunAction(QDialog):
|
||||
if self.abort.is_set():
|
||||
return QDialog.reject(self)
|
||||
if self.tb is not None:
|
||||
error_dialog(self, _('Failed'), self.err_msg + ' ' + _('Click "Show Details" for more information.'),
|
||||
error_dialog(self, _('Failed'), self.err_msg + ' ' + _('Click "Show details" for more information.'),
|
||||
det_msg=self.tb, show=True)
|
||||
self.accept()
|
||||
|
||||
|
@ -87,7 +87,7 @@ def _show_success_msg(restorer, parent=None):
|
||||
if r.errors_occurred:
|
||||
warning_dialog(parent, _('Success'),
|
||||
_('Restoring the database succeeded with some warnings'
|
||||
' click Show details to see the details. %s')%olddb,
|
||||
' click "Show details" to see the details. %s')%olddb,
|
||||
det_msg=r.report, show=True)
|
||||
else:
|
||||
info_dialog(parent, _('Success'),
|
||||
@ -118,7 +118,7 @@ def restore_database(db, parent=None):
|
||||
return True
|
||||
if r.tb is not None:
|
||||
error_dialog(parent, _('Failed'),
|
||||
_('Restoring database failed, click Show details to see details'),
|
||||
_('Restoring database failed, click "Show details" to see details'),
|
||||
det_msg=r.tb, show=True)
|
||||
else:
|
||||
_show_success_msg(r, parent=parent)
|
||||
@ -133,7 +133,7 @@ def repair_library_at(library_path, parent=None, wait_time=2):
|
||||
r = d.restorer
|
||||
if r.tb is not None:
|
||||
error_dialog(parent, _('Failed to repair library'),
|
||||
_('Restoring database failed, click Show details to see details'),
|
||||
_('Restoring database failed, click "Show details" to see details'),
|
||||
det_msg=r.tb, show=True)
|
||||
return False
|
||||
_show_success_msg(r, parent=parent)
|
||||
|
@ -706,7 +706,7 @@ class ChooseTheme(Dialog):
|
||||
self.end_spinner()
|
||||
if not isinstance(self.themes, list):
|
||||
error_dialog(self, _('Failed to download list of themes'), _(
|
||||
'Failed to download list of themes, click "Show Details" for more information'),
|
||||
'Failed to download list of themes, click "Show details" for more information'),
|
||||
det_msg=self.themes, show=True)
|
||||
self.reject()
|
||||
return
|
||||
@ -783,7 +783,7 @@ class ChooseTheme(Dialog):
|
||||
|
||||
if self.downloaded_theme and not isinstance(self.downloaded_theme, BytesIO):
|
||||
return error_dialog(self, _('Download failed'), _(
|
||||
'Failed to download icon theme, click "Show Details" for more information.'), show=True, det_msg=self.downloaded_theme)
|
||||
'Failed to download icon theme, click "Show details" for more information.'), show=True, det_msg=self.downloaded_theme)
|
||||
if ret == QDialog.DialogCode.Rejected or not self.keep_downloading or d.canceled or self.downloaded_theme is None:
|
||||
return
|
||||
dt = self.downloaded_theme
|
||||
|
@ -1152,13 +1152,13 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
det_msg=p+force_unicode(traceback.format_exc()), show=True)
|
||||
return False
|
||||
error_dialog(get_gui(), _('Failed to set data'),
|
||||
_('Could not set data, click Show Details to see why.'),
|
||||
_('Could not set data, click "Show details" to see why.'),
|
||||
det_msg=traceback.format_exc(), show=True)
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
error_dialog(get_gui(), _('Failed to set data'),
|
||||
_('Could not set data, click Show Details to see why.'),
|
||||
_('Could not set data, click "Show details" to see why.'),
|
||||
det_msg=traceback.format_exc(), show=True)
|
||||
return False
|
||||
|
||||
|
@ -318,7 +318,7 @@ class GuiRunner(QObject):
|
||||
details = ''
|
||||
self.show_error(_('Startup error'), _(
|
||||
'There was an error during {0} startup. Parts of {0} may not function.'
|
||||
' Click Show details to learn more.').format(__appname__), det_msg=details)
|
||||
' Click "Show details" to learn more.').format(__appname__), det_msg=details)
|
||||
|
||||
def initialize_db(self):
|
||||
from calibre.db.legacy import LibraryDatabase
|
||||
|
@ -737,7 +737,7 @@ class Boss(QObject):
|
||||
def rename_done(self, name_map, job, from_filelist=None):
|
||||
if job.traceback is not None:
|
||||
return error_dialog(self.gui, _('Failed to rename files'),
|
||||
_('Failed to rename files, click Show details for more information.'),
|
||||
_('Failed to rename files, click "Show details" for more information.'),
|
||||
det_msg=job.traceback, show=True)
|
||||
self.gui.file_list.build(current_container())
|
||||
self.set_modified()
|
||||
@ -1263,7 +1263,7 @@ class Boss(QObject):
|
||||
def copy_saved(self, job):
|
||||
if job.traceback is not None:
|
||||
return error_dialog(self.gui, _('Failed to save copy'),
|
||||
_('Failed to save copy, click Show details for more information.'), det_msg=job.traceback, show=True)
|
||||
_('Failed to save copy, click "Show details" for more information.'), det_msg=job.traceback, show=True)
|
||||
msg = _('Copy saved to %s') % job.result
|
||||
info_dialog(self.gui, _('Copy saved'), msg, show=True)
|
||||
self.gui.show_status_message(msg, 5)
|
||||
|
@ -276,7 +276,7 @@ class CompletionPopup(ChoosePopupWidget):
|
||||
prints(result.traceback)
|
||||
if not self.completion_error_shown:
|
||||
error_dialog(self, _('Completion failed'), _(
|
||||
'Failed to get completions, click "Show Details" for more information.'
|
||||
'Failed to get completions, click "Show details" for more information.'
|
||||
' Future errors during completion will be suppressed.'), det_msg=result.traceback, show=True)
|
||||
self.completion_error_shown = True
|
||||
self.hide()
|
||||
|
@ -145,7 +145,7 @@ class DownloadResources(Dialog):
|
||||
return self.reject()
|
||||
if tb is not None:
|
||||
error_dialog(self, _('Scan failed'), _(
|
||||
'Failed to scan for external resources, click "Show Details" for more information.'),
|
||||
'Failed to scan for external resources, click "Show details" for more information.'),
|
||||
det_msg=tb, show=True)
|
||||
self.reject()
|
||||
else:
|
||||
@ -174,7 +174,7 @@ class DownloadResources(Dialog):
|
||||
return self.reject()
|
||||
if tb is not None:
|
||||
error_dialog(self, _('Download failed'), _(
|
||||
'Failed to download external resources, click "Show Details" for more information.'),
|
||||
'Failed to download external resources, click "Show details" for more information.'),
|
||||
det_msg=tb, show=True)
|
||||
self.reject()
|
||||
else:
|
||||
@ -183,13 +183,13 @@ class DownloadResources(Dialog):
|
||||
tb = ['{}\n\t{}\n'.format(url, err) for url, err in iteritems(failures)]
|
||||
if not replacements:
|
||||
error_dialog(self, _('Download failed'), _(
|
||||
'Failed to download external resources, click "Show Details" for more information.'),
|
||||
'Failed to download external resources, click "Show details" for more information.'),
|
||||
det_msg='\n'.join(tb), show=True)
|
||||
self.reject()
|
||||
return
|
||||
else:
|
||||
warning_dialog(self, _('Some downloads failed'), _(
|
||||
'Failed to download some external resources, click "Show Details" for more information.'),
|
||||
'Failed to download some external resources, click "Show details" for more information.'),
|
||||
det_msg='\n'.join(tb), show=True)
|
||||
self.state = 2
|
||||
self.wait.msg = _('Updating resources in book...')
|
||||
@ -216,7 +216,7 @@ class DownloadResources(Dialog):
|
||||
def _replace_done(self, ret, tb):
|
||||
if tb is not None:
|
||||
error_dialog(self, _('Replace failed'), _(
|
||||
'Failed to replace external resources, click "Show Details" for more information.'),
|
||||
'Failed to replace external resources, click "Show details" for more information.'),
|
||||
det_msg=tb, show=True)
|
||||
Dialog.reject(self)
|
||||
else:
|
||||
|
@ -133,7 +133,7 @@ class AddDictionary(QDialog): # {{{
|
||||
except:
|
||||
import traceback
|
||||
return error_dialog(self, _('Failed to import dictionaries'), _(
|
||||
'Failed to import dictionaries from %s. Click "Show Details" for more information') % oxt,
|
||||
'Failed to import dictionaries from %s. Click "Show details" for more information') % oxt,
|
||||
det_msg=traceback.format_exc(), show=True)
|
||||
if num == 0:
|
||||
return error_dialog(self, _('No dictionaries'), _(
|
||||
|
@ -126,7 +126,7 @@ class TOCView(QTreeView):
|
||||
m.addAction(_('Expand all items at the level of {}').format(index.data()), partial(self.expand_at_level, index))
|
||||
m.addAction(_('Collapse all items at the level of {}').format(index.data()), partial(self.collapse_at_level, index))
|
||||
m.addSeparator()
|
||||
m.addAction(_('Copy table of contents to clipboard'), self.copy_to_clipboard)
|
||||
m.addAction(_('Copy Table of Contents to clipboard'), self.copy_to_clipboard)
|
||||
m.exec_(self.mapToGlobal(pos))
|
||||
|
||||
def copy_to_clipboard(self):
|
||||
|
@ -329,7 +329,7 @@ class ReadUI:
|
||||
return
|
||||
if end_type is not 'load':
|
||||
return self.show_error(_('Failed to load book manifest'),
|
||||
_('The book manifest failed to load, click "Show Details" for more information.').format(title=self.current_metadata.title),
|
||||
_('The book manifest failed to load, click "Show details" for more information.').format(title=self.current_metadata.title),
|
||||
xhr.error_html)
|
||||
try:
|
||||
manifest = JSON.parse(xhr.responseText)
|
||||
@ -474,7 +474,7 @@ class ReadUI:
|
||||
return
|
||||
if end_type is not 'load':
|
||||
return self.show_error(_('Failed to load MathJax manifest'),
|
||||
_('The MathJax manifest failed to load, click "Show Details" for more information.').format(title=self.current_metadata.title),
|
||||
_('The MathJax manifest failed to load, click "Show details" for more information.').format(title=self.current_metadata.title),
|
||||
xhr.error_html)
|
||||
try:
|
||||
manifest = JSON.parse(xhr.responseText)
|
||||
|
Loading…
x
Reference in New Issue
Block a user