Add mappings formats of a few strings

So translations can change the order of the variables
This commit is contained in:
Pk11 2020-10-19 17:42:07 -05:00 committed by Jim Miller
parent a353a54374
commit c9d7092f3a
2 changed files with 6 additions and 6 deletions

View file

@ -1352,7 +1352,7 @@ class FanFicFarePlugin(InterfaceAction):
<p>%s</p>
<p>%s</p>'''%(
_('Change Story URL?'),
_('<b>%s</b> by <b>%s</b> is already in your library with a different source URL:')%(mi.title,', '.join(mi.author)),
_('<b>%(title)s</b> by <b>%(author)s</b> is already in your library with a different source URL:')%{'title':mi.title,'author':', '.join(mi.author)},
_('In library: <a href="%(liburl)s">%(liburl)s</a>')%{'liburl':liburl},
_('New URL: <a href="%(newurl)s">%(newurl)s</a>')%{'newurl':book['url']},
_("Click '<b>Yes</b>' to update/overwrite book with new URL."),
@ -1366,7 +1366,7 @@ class FanFicFarePlugin(InterfaceAction):
<p>%s</p>
<p>%s</p>'''%(
_('Download as New Book?'),
_('<b>%s</b> by <b>%s</b> is already in your library with a different source URL.')%(mi.title,', '.join(mi.author)),
_('<b>%(title)s</b> by <b>%(author)s</b> is already in your library with a different source URL.')%{'title':mi.title,'author':', '.join(mi.author)},
_('You chose not to update the existing book. Do you want to add a new book for this URL?'),
_('New URL: <a href="%(newurl)s">%(newurl)s</a>')%{'newurl':book['url']},
_("Click '<b>Yes</b>' to a new book with new URL."),
@ -2700,7 +2700,7 @@ class FanFicFarePlugin(InterfaceAction):
book['comments'] = '<div>'+d+'<p>' +_("Anthology containing:")+"</p>\n\n"
wraptitle = lambda x : '<p><b>'+x+'</b></p>\n'
if len(book['author']) > 1:
mkbooktitle = lambda x : wraptitle(_("%s by %s") % (x['title'],' & '.join(x['author'])))
mkbooktitle = lambda x : wraptitle(_("%(title)s by %(author)s") % {'title':x['title'],'author':' & '.join(x['author'])})
else:
mkbooktitle = lambda x : wraptitle(x['title'])

View file

@ -90,7 +90,7 @@ def do_download_worker(book_list,
book_list.append(job.result)
book_id = job._book['calibre_id']
count = count + 1
notification(float(count)/total, _('%d of %d stories finished downloading')%(count,total))
notification(float(count)/total, _('%(count)d of %(total)d stories finished downloading')%{'count':count,'total':total})
# Add this job's output to the current log
logger.info('Logfile for book ID %s (%s)'%(book_id, job._book['title']))
logger.info(job.details)
@ -297,8 +297,8 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
inject_cal_cols(book,story,configuration)
writer.writeStory(outfilename=outfile, forceOverwrite=True)
book['comment'] = _('Update %s completed, added %s chapters for %s total.')%\
(options['fileform'],(urlchaptercount-chaptercount),urlchaptercount)
book['comment'] = _('Update %(fileform)s completed, added %(added)s chapters for %(total)s total.')%\
{'fileform':options['fileform'],'added':(urlchaptercount-chaptercount),'total':urlchaptercount)
book['all_metadata'] = story.getAllMetadata(removeallentities=True)
if options['savemetacol'] != '':
book['savemetacol'] = story.dump_html_metadata()