Add additional strings for translations.

This commit is contained in:
Jim Miller 2016-03-21 20:24:03 -05:00
parent 67b44a991b
commit 6de973fe2d
4 changed files with 761 additions and 469 deletions

View file

@ -1695,14 +1695,14 @@ class FanFicFarePlugin(InterfaceAction):
if 'status' in book:
status = book['status']
else:
status = 'Good'
status = _('Good')
htmllog = htmllog + '<tr><td>' + '</td><td>'.join([escapehtml(status),escapehtml(book['title']),escapehtml(", ".join(book['author'])),escapehtml(book['comment']),book['url']]) + '</td></tr>'
for book in bad_list:
if 'status' in book:
status = book['status']
else:
status = 'Bad'
status = _('Bad')
htmllog = htmllog + '<tr><td>' + '</td><td>'.join([escapehtml(status),escapehtml(book['title']),escapehtml(", ".join(book['author'])),escapehtml(book['comment']),book['url']]) + '</td></tr>'
htmllog = htmllog + '</table></body></html>'
@ -2231,7 +2231,7 @@ class FanFicFarePlugin(InterfaceAction):
book = self.convert_url_to_book(url)
if book['url'] in uniqueurls:
book['good'] = False
book['comment'] = "Same story already included."
book['comment'] = _("Same story already included.")
uniqueurls.add(book['url'])
book['listorder']=i # BG d/l jobs don't come back in order.
# Didn't matter until anthologies & 'marked' successes

View file

@ -23,6 +23,12 @@ from calibre.library.comments import sanitize_comments_html
from calibre_plugins.fanficfare_plugin.wordcount import get_word_count
from calibre_plugins.fanficfare_plugin.prefs import (SAVE_YES, SAVE_YES_UNLESS_SITE)
# pulls in translation files for _() strings
try:
load_translations()
except NameError:
pass # load_translations() added in calibre 1.9
# ------------------------------------------------------------------------------
#
# Functions to perform downloads using worker jobs
@ -82,7 +88,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, _('%d of %d stories finished downloading')%(count,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)
@ -189,7 +195,7 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
## No need to download at all. Shouldn't ever get down here.
if options['collision'] in (CALIBREONLY, CALIBREONLYSAVECOL):
logger.info("Skipping CALIBREONLY 'update' down inside worker--this shouldn't be happening...")
book['comment'] = 'Metadata collected.'
book['comment'] = _('Metadata collected.')
book['all_metadata'] = story.getAllMetadata(removeallentities=True)
if options['savemetacol'] != '':
book['savemetacol'] = story.dump_html_metadata()
@ -221,7 +227,7 @@ 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'] = 'Download %s completed, %s chapters.'%(options['fileform'],story.getMetadata("numChapters"))
book['comment'] = _('Download %s completed, %s chapters.')%(options['fileform'],story.getMetadata("numChapters"))
book['all_metadata'] = story.getAllMetadata(removeallentities=True)
if options['savemetacol'] != '':
book['savemetacol'] = story.dump_html_metadata()
@ -311,7 +317,7 @@ def do_download_for_worker(book,options,merge,notification=lambda x,y:x):
book['good']=False
book['comment']=unicode(e)
book['icon']='dialog_error.png'
book['status'] = 'Error'
book['status'] = _('Error')
logger.info("Exception: %s:%s"%(book,unicode(e)))
traceback.print_exc()

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2016-03-11 11:48+Central Standard Time\n"
"POT-Creation-Date: 2016-03-21 20:15+Central Daylight Time\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1721,23 +1721,23 @@ msgstr ""
msgid "Different URL"
msgstr ""
#: fff_plugin.py:1305
#: fff_plugin.py:1305 jobs.py:198
msgid "Metadata collected."
msgstr ""
#: fff_plugin.py:1321 jobs.py:256
#: fff_plugin.py:1321 jobs.py:262
msgid "Already contains %d chapters."
msgstr ""
#: fff_plugin.py:1323 jobs.py:258
#: fff_plugin.py:1323 jobs.py:264
msgid "Existing epub contains %d chapters, web site only has %d. Use Overwrite to force update."
msgstr ""
#: fff_plugin.py:1325 jobs.py:260
#: fff_plugin.py:1325 jobs.py:266
msgid "FanFicFare doesn't recognize chapters in existing epub, epub is probably from a different source. Use Overwrite to force update."
msgstr ""
#: fff_plugin.py:1342 jobs.py:217
#: fff_plugin.py:1342 jobs.py:223
msgid "Not Overwriting, web site is not newer."
msgstr ""
@ -1753,7 +1753,7 @@ msgstr ""
msgid "Proceed with updating your library(Error Column, if configured)?"
msgstr ""
#: fff_plugin.py:1469 fff_plugin.py:1671
#: fff_plugin.py:1469 fff_plugin.py:1671 fff_plugin.py:1705
msgid "Bad"
msgstr ""
@ -1821,7 +1821,7 @@ msgstr ""
msgid "Proceed with updating this anthology and your library?"
msgstr ""
#: fff_plugin.py:1669
#: fff_plugin.py:1669 fff_plugin.py:1698
msgid "Good"
msgstr ""
@ -1865,7 +1865,7 @@ msgstr ""
msgid "Adding format to book failed for some reason..."
msgstr ""
#: fff_plugin.py:1823
#: fff_plugin.py:1823 jobs.py:320
msgid "Error"
msgstr ""
@ -1885,6 +1885,10 @@ msgstr ""
msgid "You configured FanFicFare to automatically update \"Send to Device\" Reading Lists, but you don't have any lists set?"
msgstr ""
#: fff_plugin.py:2234
msgid "Same story already included."
msgstr ""
#: fff_plugin.py:2294
msgid "No story URL found."
msgstr ""
@ -1917,31 +1921,39 @@ msgstr ""
msgid "(was set, removed for security)"
msgstr ""
#: jobs.py:69
#: jobs.py:75
msgid "Downloading FanFiction Stories"
msgstr ""
#: jobs.py:97
#: jobs.py:91
msgid "%d of %d stories finished downloading"
msgstr ""
#: jobs.py:103
msgid "Download Results:"
msgstr ""
#: jobs.py:99
#: jobs.py:105
msgid "Successful:"
msgstr ""
#: jobs.py:100
#: jobs.py:106
msgid "Unsuccessful:"
msgstr ""
#: jobs.py:125
#: jobs.py:131
msgid "Download started..."
msgstr ""
#: jobs.py:249
#: jobs.py:230
msgid "Download %s completed, %s chapters."
msgstr ""
#: jobs.py:255
msgid "Already contains %d chapters. Reuse as is."
msgstr ""
#: jobs.py:272
#: jobs.py:278
msgid "Update %s completed, added %s chapters for %s total."
msgstr ""

File diff suppressed because it is too large Load diff