Use named_arguments for translators (patch by MathieuMD)
svn: r19358
This commit is contained in:
@ -492,9 +492,12 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
|||||||
folder = os.path.split(filename)[0]
|
folder = os.path.split(filename)[0]
|
||||||
confirm_text = _(
|
confirm_text = _(
|
||||||
'The data will be saved as follows:\n\n'
|
'The data will be saved as follows:\n\n'
|
||||||
'Format:\t%s\nName:\t%s\nFolder:\t%s\n\n'
|
'Format:\t%(format)s\nName:\t%(name)s\nFolder:\t%(folder)s\n\n'
|
||||||
'Press Apply to proceed, Back to revisit '
|
'Press Apply to proceed, Back to revisit '
|
||||||
'your options, or Cancel to abort') % (format.replace("_",""), name, folder)
|
'your options, or Cancel to abort') % {
|
||||||
|
'format': format.replace("_",""),
|
||||||
|
'name': name,
|
||||||
|
'folder': folder}
|
||||||
page_complete = True
|
page_complete = True
|
||||||
else :
|
else :
|
||||||
confirm_text = _(
|
confirm_text = _(
|
||||||
|
@ -1681,9 +1681,9 @@ def make_unknown(class_arg, explanation, class_func, commit_func, transaction,
|
|||||||
elif isinstance(obj, gen.lib.Tag):
|
elif isinstance(obj, gen.lib.Tag):
|
||||||
if not hasattr(make_unknown, 'count'):
|
if not hasattr(make_unknown, 'count'):
|
||||||
make_unknown.count = 1 #primitive static variable
|
make_unknown.count = 1 #primitive static variable
|
||||||
obj.set_name(_("Unknown, was missing %s (%d)") %
|
obj.set_name(_("Unknown, was missing %(time)s (%(count)d)") % {
|
||||||
(time.strftime('%x %X', time.localtime()),
|
'time': time.strftime('%x %X', time.localtime()),
|
||||||
make_unknown.count))
|
'count': make_unknown.count})
|
||||||
make_unknown.count += 1
|
make_unknown.count += 1
|
||||||
else:
|
else:
|
||||||
raise TypeError("Object if of unsupported type")
|
raise TypeError("Object if of unsupported type")
|
||||||
|
@ -75,7 +75,9 @@ def _errordialog(title, errormessage):
|
|||||||
"""
|
"""
|
||||||
Show the error. A title for the error and an errormessage
|
Show the error. A title for the error and an errormessage
|
||||||
"""
|
"""
|
||||||
print _('ERROR: %s \n %s') % (title, errormessage)
|
print _('ERROR: %(title)s \n %(message)s') % {
|
||||||
|
'title': title,
|
||||||
|
'message': errormessage}
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -268,7 +268,10 @@ def load_addon_file(path, callback=None):
|
|||||||
# If the plugin is for another version; inform and do nothing
|
# If the plugin is for another version; inform and do nothing
|
||||||
if callback:
|
if callback:
|
||||||
callback(" " + (_("'%s' is NOT for this version of Gramps.") % id) + "\n")
|
callback(" " + (_("'%s' is NOT for this version of Gramps.") % id) + "\n")
|
||||||
callback(" " + (_("It is for version %d.%d" % vtup) + "\n"))
|
callback(" " + (_("It is for version %(v1)d.%(v2)d") % {
|
||||||
|
'v1': vtup[0],
|
||||||
|
'v2': vtup[1]}
|
||||||
|
+ "\n"))
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
# another register function doesn't have gramps_target_version
|
# another register function doesn't have gramps_target_version
|
||||||
|
@ -113,12 +113,12 @@ else: # normal case
|
|||||||
MIN_PYTHON_VERSION = (2, 6, 0, '', 0)
|
MIN_PYTHON_VERSION = (2, 6, 0, '', 0)
|
||||||
if not sys.version_info >= MIN_PYTHON_VERSION :
|
if not sys.version_info >= MIN_PYTHON_VERSION :
|
||||||
print (_("Your Python version does not meet the "
|
print (_("Your Python version does not meet the "
|
||||||
"requirements. At least python %d.%d.%d is needed to"
|
"requirements. At least python %(v1)d.%(v2)d.%(v3)d is needed to"
|
||||||
" start Gramps.\n\n"
|
" start Gramps.\n\n"
|
||||||
"Gramps will terminate now.") % (
|
"Gramps will terminate now.") % {
|
||||||
MIN_PYTHON_VERSION[0],
|
'v1': MIN_PYTHON_VERSION[0],
|
||||||
MIN_PYTHON_VERSION[1],
|
'v2': MIN_PYTHON_VERSION[1],
|
||||||
MIN_PYTHON_VERSION[2]))
|
'v3': MIN_PYTHON_VERSION[2]})
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -46,8 +46,10 @@ def make_filter(dbstate, uistate, objclass, gramps_ids, title=None):
|
|||||||
title = title()
|
title = title()
|
||||||
filter.set_name(title)
|
filter.set_name(title)
|
||||||
struct_time = time.localtime()
|
struct_time = time.localtime()
|
||||||
filter.set_comment( _("Created on %4d/%02d/%02d") %
|
filter.set_comment( _("Created on %(year)4d/%(month)02d/%(day)02d") % {
|
||||||
(struct_time.tm_year, struct_time.tm_mon, struct_time.tm_mday))
|
'year': struct_time.tm_year,
|
||||||
|
'month': struct_time.tm_mon,
|
||||||
|
'day': struct_time.tm_mday})
|
||||||
re = "|".join(["^%s$" % gid for gid in sorted(gramps_ids)])
|
re = "|".join(["^%s$" % gid for gid in sorted(gramps_ids)])
|
||||||
filter.add_rule(rule([re]))
|
filter.add_rule(rule([re]))
|
||||||
filterdb = Filters.FilterList(const.CUSTOM_FILTERS)
|
filterdb = Filters.FilterList(const.CUSTOM_FILTERS)
|
||||||
|
@ -841,7 +841,10 @@ class GuiFamilyOption(gtk.HBox):
|
|||||||
else:
|
else:
|
||||||
mother_name = _("unknown mother")
|
mother_name = _("unknown mother")
|
||||||
|
|
||||||
name = _("%s and %s (%s)") % (father_name, mother_name, family_id)
|
name = _("%(father_name)s and %(mother_name)s (%(family_id)s)") % {
|
||||||
|
'father_name': father_name,
|
||||||
|
'mother_name': mother_name,
|
||||||
|
'family_id': family_id}
|
||||||
|
|
||||||
self.__family_label.set_text( name )
|
self.__family_label.set_text( name )
|
||||||
self.__option.set_value(family_id)
|
self.__option.set_value(family_id)
|
||||||
|
Reference in New Issue
Block a user