give "update_po.py -p" fewer things to moan about

This commit is contained in:
Paul Franklin 2015-03-01 15:01:52 -08:00
parent e70bb04f82
commit dd20212156
4 changed files with 81 additions and 67 deletions

View File

@ -416,7 +416,9 @@ class ArgHandler(object):
for item in sorted(summary): for item in sorted(summary):
if item != "Family Tree": if item != "Family Tree":
# translators: needed for French, ignore otherwise # translators: needed for French, ignore otherwise
print(_(" %s: %s") % (item, summary[item])) print(_(" %(item)s: %(summary)s") % {
'item' : item,
'summary' : summary[item] } )
sys.exit(0) sys.exit(0)
# Handle the "-t" List Family Trees, tab delimited option. # Handle the "-t" List Family Trees, tab delimited option.

View File

@ -375,13 +375,13 @@ def gramps_upgrade_16(self):
SOURCE_KEY : 6, SOURCE_KEY : 6,
} }
key2string = { key2string = {
PERSON_KEY : _('%6d People upgraded with %6d citations in %6d secs\n'), PERSON_KEY : _('%(n1)6d People upgraded with %(n2)6d citations in %(n3)6d secs\n'),
FAMILY_KEY : _('%6d Families upgraded with %6d citations in %6d secs\n'), FAMILY_KEY : _('%(n1)6d Families upgraded with %(n2)6d citations in %(n3)6d secs\n'),
EVENT_KEY : _('%6d Events upgraded with %6d citations in %6d secs\n'), EVENT_KEY : _('%(n1)6d Events upgraded with %(n2)6d citations in %(n3)6d secs\n'),
MEDIA_KEY : _('%6d Media Objects upgraded with %6d citations in %6d secs\n'), MEDIA_KEY : _('%(n1)6d Media Objects upgraded with %(n2)6d citations in %(n3)6d secs\n'),
PLACE_KEY : _('%6d Places upgraded with %6d citations in %6d secs\n'), PLACE_KEY : _('%(n1)6d Places upgraded with %(n2)6d citations in %(n3)6d secs\n'),
REPOSITORY_KEY : _('%6d Repositories upgraded with %6d citations in %6d secs\n'), REPOSITORY_KEY : _('%(n1)6d Repositories upgraded with %(n2)6d citations in %(n3)6d secs\n'),
SOURCE_KEY : _('%6d Sources upgraded with %6d citations in %6d secs\n'), SOURCE_KEY : _('%(n1)6d Sources upgraded with %(n2)6d citations in %(n3)6d secs\n'),
} }
data_upgradeobject = [0] * 7 data_upgradeobject = [0] * 7
@ -769,7 +769,10 @@ def gramps_upgrade_16(self):
txt = _("Number of new objects upgraded:\n") txt = _("Number of new objects upgraded:\n")
for key in keyorder: for key in keyorder:
try: try:
txt += key2string[key] % data_upgradeobject[key2data[key]] txt += key2string[key] % {
'n1' : data_upgradeobject[key2data[key]][0],
'n2' : data_upgradeobject[key2data[key]][1],
'n3' : data_upgradeobject[key2data[key]][2] }
except: except:
txt += key2string[key] txt += key2string[key]
txt += _("\n\nYou may want to run\n" txt += _("\n\nYou may want to run\n"

View File

@ -654,7 +654,9 @@ class DbManager(CLIDbManager):
store, node = self.selection.get_selected() store, node = self.selection.get_selected()
# New title: # New title:
date_string = time.strftime("%d %b %Y %H:%M:%S", time.gmtime()) date_string = time.strftime("%d %b %Y %H:%M:%S", time.gmtime())
title = _("%s (copy, %s)") % (store[node][NAME_COL], date_string) title = _("%(new_DB_name)s (copied %(date_string)s)") % {
'new_DB_name' : store[node][NAME_COL],
'date_string' : date_string }
# Create the row and directory, awaits user edit of title: # Create the row and directory, awaits user edit of title:
(new_dir, title) = self._create_new_db(title, create_db=False) (new_dir, title) = self._create_new_db(title, create_db=False)
# Copy the files: # Copy the files:

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-02-28 18:58-0800\n" "POT-Creation-Date: 2015-03-01 15:00-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -672,7 +672,7 @@ msgstr ""
msgid "%(full_DB_path)s with name \"%(f_t_name)s\"" msgid "%(full_DB_path)s with name \"%(f_t_name)s\""
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:411 ../gramps/cli/arghandler.py:424 #: ../gramps/cli/arghandler.py:411 ../gramps/cli/arghandler.py:426
msgid "Gramps Family Trees:" msgid "Gramps Family Trees:"
msgstr "" msgstr ""
@ -684,9 +684,9 @@ msgstr ""
#. #.
#. ------------------------------------------------------------------------- #. -------------------------------------------------------------------------
#: ../gramps/cli/arghandler.py:414 ../gramps/cli/arghandler.py:415 #: ../gramps/cli/arghandler.py:414 ../gramps/cli/arghandler.py:415
#: ../gramps/cli/arghandler.py:430 ../gramps/cli/arghandler.py:432 #: ../gramps/cli/arghandler.py:432 ../gramps/cli/arghandler.py:434
#: ../gramps/cli/arghandler.py:436 ../gramps/cli/arghandler.py:437 #: ../gramps/cli/arghandler.py:438 ../gramps/cli/arghandler.py:439
#: ../gramps/cli/arghandler.py:439 ../gramps/cli/clidbman.py:73 #: ../gramps/cli/arghandler.py:441 ../gramps/cli/clidbman.py:73
#: ../gramps/cli/clidbman.py:220 ../gramps/gui/clipboard.py:955 #: ../gramps/cli/clidbman.py:220 ../gramps/gui/clipboard.py:955
#: ../gramps/gui/configure.py:1389 #: ../gramps/gui/configure.py:1389
msgid "Family Tree" msgid "Family Tree"
@ -700,115 +700,115 @@ msgstr ""
#. translators: needed for French, ignore otherwise #. translators: needed for French, ignore otherwise
#: ../gramps/cli/arghandler.py:419 #: ../gramps/cli/arghandler.py:419
#, python-format #, python-format
msgid " %s: %s" msgid " %(item)s: %(summary)s"
msgstr "" msgstr ""
#. translators: ignore unless your quotation marks differ #. translators: ignore unless your quotation marks differ
#: ../gramps/cli/arghandler.py:437 ../gramps/cli/arghandler.py:441 #: ../gramps/cli/arghandler.py:439 ../gramps/cli/arghandler.py:443
#: ../gramps/gen/plug/report/endnotes.py:199 #: ../gramps/gen/plug/report/endnotes.py:199
#, python-format #, python-format
msgid "\"%s\"" msgid "\"%s\""
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:449 #: ../gramps/cli/arghandler.py:451
#, python-format #, python-format
msgid "Performing action: %s." msgid "Performing action: %s."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:451 #: ../gramps/cli/arghandler.py:453
#, python-format #, python-format
msgid "Using options string: %s" msgid "Using options string: %s"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:456 #: ../gramps/cli/arghandler.py:458
#, python-format #, python-format
msgid "Exporting: file %(filename)s, format %(format)s." msgid "Exporting: file %(filename)s, format %(format)s."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:463 #: ../gramps/cli/arghandler.py:465
msgid "Exiting." msgid "Exiting."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:467 #: ../gramps/cli/arghandler.py:469
msgid "Cleaning up." msgid "Cleaning up."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:498 #: ../gramps/cli/arghandler.py:500
msgid "Created empty Family Tree successfully" msgid "Created empty Family Tree successfully"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:501 ../gramps/cli/arghandler.py:526 #: ../gramps/cli/arghandler.py:503 ../gramps/cli/arghandler.py:528
msgid "Error opening the file." msgid "Error opening the file."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:502 ../gramps/cli/arghandler.py:527 #: ../gramps/cli/arghandler.py:504 ../gramps/cli/arghandler.py:529
msgid "Exiting..." msgid "Exiting..."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:506 #: ../gramps/cli/arghandler.py:508
#, python-format #, python-format
msgid "Importing: file %(filename)s, format %(format)s." msgid "Importing: file %(filename)s, format %(format)s."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:524 #: ../gramps/cli/arghandler.py:526
msgid "Opened successfully!" msgid "Opened successfully!"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:538 #: ../gramps/cli/arghandler.py:540
msgid "Database is locked, cannot open it!" msgid "Database is locked, cannot open it!"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:539 #: ../gramps/cli/arghandler.py:541
#, python-format #, python-format
msgid " Info: %s" msgid " Info: %s"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:542 #: ../gramps/cli/arghandler.py:544
msgid "Database needs recovery, cannot open it!" msgid "Database needs recovery, cannot open it!"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:593 ../gramps/cli/arghandler.py:641 #: ../gramps/cli/arghandler.py:595 ../gramps/cli/arghandler.py:643
#: ../gramps/cli/arghandler.py:688 #: ../gramps/cli/arghandler.py:690
msgid "Ignoring invalid options string." msgid "Ignoring invalid options string."
msgstr "" msgstr ""
#. name exists, but is not in the list of valid report names #. name exists, but is not in the list of valid report names
#: ../gramps/cli/arghandler.py:617 #: ../gramps/cli/arghandler.py:619
msgid "Unknown report name." msgid "Unknown report name."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:619 #: ../gramps/cli/arghandler.py:621
#, python-format #, python-format
msgid "Report name not given. Please use one of %(donottranslate)s=reportname" msgid "Report name not given. Please use one of %(donottranslate)s=reportname"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:623 ../gramps/cli/arghandler.py:671 #: ../gramps/cli/arghandler.py:625 ../gramps/cli/arghandler.py:673
#: ../gramps/cli/arghandler.py:704 #: ../gramps/cli/arghandler.py:706
#, python-format #, python-format
msgid "" msgid ""
"%s\n" "%s\n"
" Available names are:" " Available names are:"
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:665 #: ../gramps/cli/arghandler.py:667
msgid "Unknown tool name." msgid "Unknown tool name."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:667 #: ../gramps/cli/arghandler.py:669
#, python-format #, python-format
msgid "Tool name not given. Please use one of %(donottranslate)s=toolname." msgid "Tool name not given. Please use one of %(donottranslate)s=toolname."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:698 #: ../gramps/cli/arghandler.py:700
msgid "Unknown book name." msgid "Unknown book name."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:700 #: ../gramps/cli/arghandler.py:702
#, python-format #, python-format
msgid "Book name not given. Please use one of %(donottranslate)s=bookname." msgid "Book name not given. Please use one of %(donottranslate)s=bookname."
msgstr "" msgstr ""
#: ../gramps/cli/arghandler.py:709 #: ../gramps/cli/arghandler.py:711
#, python-format #, python-format
msgid "Unknown action: %s." msgid "Unknown action: %s."
msgstr "" msgstr ""
@ -2200,44 +2200,51 @@ msgstr ""
#: ../gramps/gen/db/upgrade.py:378 #: ../gramps/gen/db/upgrade.py:378
#, python-format #, python-format
msgid "%6d People upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d People upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:379 #: ../gramps/gen/db/upgrade.py:379
#, python-format #, python-format
msgid "%6d Families upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Families upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:380 #: ../gramps/gen/db/upgrade.py:380
#, python-format #, python-format
msgid "%6d Events upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Events upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:381 #: ../gramps/gen/db/upgrade.py:381
#, python-format #, python-format
msgid "%6d Media Objects upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Media Objects upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:382 #: ../gramps/gen/db/upgrade.py:382
#, python-format #, python-format
msgid "%6d Places upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Places upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:383 #: ../gramps/gen/db/upgrade.py:383
#, python-format #, python-format
msgid "%6d Repositories upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Repositories upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:384 #: ../gramps/gen/db/upgrade.py:384
#, python-format #, python-format
msgid "%6d Sources upgraded with %6d citations in %6d secs\n" msgid ""
"%(n1)6d Sources upgraded with %(n2)6d citations in %(n3)6d secs\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:769 #: ../gramps/gen/db/upgrade.py:769
msgid "Number of new objects upgraded:\n" msgid "Number of new objects upgraded:\n"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:775 #: ../gramps/gen/db/upgrade.py:778
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
@ -2247,7 +2254,7 @@ msgid ""
"information" "information"
msgstr "" msgstr ""
#: ../gramps/gen/db/upgrade.py:779 #: ../gramps/gen/db/upgrade.py:782
msgid "Upgrade Statistics" msgid "Upgrade Statistics"
msgstr "" msgstr ""
@ -9183,14 +9190,14 @@ msgstr ""
#: ../gramps/gui/dbman.py:657 #: ../gramps/gui/dbman.py:657
#, python-format #, python-format
msgid "%s (copy, %s)" msgid "%(new_DB_name)s (copied %(date_string)s)"
msgstr ""
#: ../gramps/gui/dbman.py:679
msgid "Repair Family Tree?"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:681 #: ../gramps/gui/dbman.py:681
msgid "Repair Family Tree?"
msgstr ""
#: ../gramps/gui/dbman.py:683
#, python-format #, python-format
msgid "" msgid ""
"If you click %(bold_start)sProceed%(bold_end)s, Gramps will attempt to " "If you click %(bold_start)sProceed%(bold_end)s, Gramps will attempt to "
@ -9217,31 +9224,31 @@ msgid ""
"%(recover_file)s in the Family Tree directory." "%(recover_file)s in the Family Tree directory."
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:712 #: ../gramps/gui/dbman.py:714
msgid "Proceed, I have taken a backup" msgid "Proceed, I have taken a backup"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:713 #: ../gramps/gui/dbman.py:715
msgid "Stop" msgid "Stop"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:736 #: ../gramps/gui/dbman.py:738
msgid "Rebuilding database from backup files" msgid "Rebuilding database from backup files"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:741 #: ../gramps/gui/dbman.py:743
msgid "Error restoring backup data" msgid "Error restoring backup data"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:776 #: ../gramps/gui/dbman.py:778
msgid "Could not create Family Tree" msgid "Could not create Family Tree"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:893 #: ../gramps/gui/dbman.py:895
msgid "Retrieve failed" msgid "Retrieve failed"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:894 #: ../gramps/gui/dbman.py:896
#, python-format #, python-format
msgid "" msgid ""
"An attempt to retrieve the data failed with the following message:\n" "An attempt to retrieve the data failed with the following message:\n"
@ -9249,11 +9256,11 @@ msgid ""
"%s" "%s"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:934 ../gramps/gui/dbman.py:962 #: ../gramps/gui/dbman.py:936 ../gramps/gui/dbman.py:964
msgid "Archiving failed" msgid "Archiving failed"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:935 #: ../gramps/gui/dbman.py:937
#, python-format #, python-format
msgid "" msgid ""
"An attempt to create the archive failed with the following message:\n" "An attempt to create the archive failed with the following message:\n"
@ -9261,15 +9268,15 @@ msgid ""
"%s" "%s"
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:940 #: ../gramps/gui/dbman.py:942
msgid "Creating data to be archived..." msgid "Creating data to be archived..."
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:949 #: ../gramps/gui/dbman.py:951
msgid "Saving archive..." msgid "Saving archive..."
msgstr "" msgstr ""
#: ../gramps/gui/dbman.py:963 #: ../gramps/gui/dbman.py:965
#, python-format #, python-format
msgid "" msgid ""
"An attempt to archive the data failed with the following message:\n" "An attempt to archive the data failed with the following message:\n"