String changes

This commit is contained in:
Kovid Goyal 2017-04-19 10:12:19 +05:30
parent ffb99ad1d7
commit a90966fa4c
4 changed files with 12 additions and 8 deletions

View File

@ -903,7 +903,7 @@ def load_builtin_fonts():
def setup_gui_option_parser(parser): def setup_gui_option_parser(parser):
if islinux: if islinux:
parser.add_option('--detach', default=False, action='store_true', parser.add_option('--detach', default=False, action='store_true',
help=_('Detach from the controlling terminal, if any (linux only)')) help=_('Detach from the controlling terminal, if any (Linux only)'))
def show_temp_dir_error(err): def show_temp_dir_error(err):

View File

@ -133,8 +133,10 @@ class AddAction(InterfaceAction):
override = formats.intersection(nformats) override = formats.intersection(nformats)
if override: if override:
title = db.title(ids[0], index_is_id=True) title = db.title(ids[0], index_is_id=True)
msg = _('The {0} format(s) will be replaced in the book {1}. Are you sure?').format( msg = ngettext(
', '.join(override), title) 'The {0} format will be replaced in the book {1}. Are you sure?',
'The {0} formats will be replaced in the book {1}. Are you sure?',
len(override)).format(', '.join(override), title)
if not confirm(msg, 'confirm_format_override_on_add', title=_('Are you sure?'), parent=self.gui): if not confirm(msg, 'confirm_format_override_on_add', title=_('Are you sure?'), parent=self.gui):
return return

View File

@ -132,7 +132,7 @@ class StoreAction(InterfaceAction):
def show_disclaimer(self): def show_disclaimer(self):
confirm(('<p>' + confirm(('<p>' +
_('Calibre helps you find the ebooks you want by searching ' _('calibre helps you find the ebooks you want by searching '
'the websites of various commercial and public domain ' 'the websites of various commercial and public domain '
'book sources for you.') + 'book sources for you.') +
'<p>' + '<p>' +
@ -141,7 +141,7 @@ class StoreAction(InterfaceAction):
'You also get DRM status and other useful information.') + '<p>' + 'You also get DRM status and other useful information.') + '<p>' +
_('All transactions (paid or otherwise) are handled between ' _('All transactions (paid or otherwise) are handled between '
'you and the book seller. ' 'you and the book seller. '
'Calibre is not part of this process and any issues related ' 'calibre is not part of this process and any issues related '
'to a purchase should be directed to the website you are ' 'to a purchase should be directed to the website you are '
'buying from. Be sure to double check that any books you get ' 'buying from. Be sure to double check that any books you get '
'will work with your e-book reader, especially if the book you ' 'will work with your e-book reader, especially if the book you '

View File

@ -171,8 +171,9 @@ class Adder(QObject):
unreadable_files.append(path) unreadable_files.append(path)
if unreadable_files: if unreadable_files:
if not self.file_groups: if not self.file_groups:
self.scan_error = _('You do not have permission to read the selected file(s).') + '\n' m = ngettext('You do not have permission to read the selected file.',
self.scan_error += '\n'.join(unreadable_files) 'You do not have permission to read the selected files.', len(unreadable_files))
self.scan_error = m + '\n' + '\n'.join(unreadable_files)
else: else:
a = self.report.append a = self.report.append
for f in unreadable_files: for f in unreadable_files:
@ -281,7 +282,8 @@ class Adder(QObject):
a = self.report.append a = self.report.append
paths = self.file_groups[group_id] paths = self.file_groups[group_id]
a(''), a('-' * 70) a(''), a('-' * 70)
a(_('Failed to read metadata from the file(s):')) m = ngettext('Failed to read metadata from the file:', 'Failed to read metadata from the files:', len(paths))
a(m)
[a('\t' + f) for f in paths] [a('\t' + f) for f in paths]
a(_('With error:')), a(details) a(_('With error:')), a(details)
mi = Metadata(_('Unknown')) mi = Metadata(_('Unknown'))