summaryrefslogtreecommitdiffstats
path: root/partIntfHelpers.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-10-01 10:20:30 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-10-01 10:20:30 -1000
commit576d6d67ded60eac2133f324c20d3484904ea475 (patch)
tree278161e765bfd939d2fb113aae9e7bf6f1fed06a /partIntfHelpers.py
parent89f97834a415fa9aafa0824e7603fe8091058efb (diff)
downloadanaconda-576d6d67ded60eac2133f324c20d3484904ea475.tar.gz
anaconda-576d6d67ded60eac2133f324c20d3484904ea475.tar.xz
anaconda-576d6d67ded60eac2133f324c20d3484904ea475.zip
Use named parameters for translatable strings with multiple params.
This is a cleanup for the po files. xgettext displays the following messages for some Python files: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. This patch modifies the reported format strings to use named parameters per the warning message. We were already using these style format strings in users.py and possibly other files. Basically when there is more than one parameter in the format string, we should use a hash table with named parameters.
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r--partIntfHelpers.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index a8cde971d..08c7ce99f 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -260,8 +260,10 @@ def partitionSanityErrors(intf, errors):
"scheme. "
"These errors must be corrected prior "
"to continuing with your install of "
- "%s.\n\n%s") %(productName, errorstr),
- custom_icon="error")
+ "%(productName)s.\n\n%(errorstr)s") \
+ % {'productName': productName,
+ 'errorstr': errorstr},
+ custom_icon="error")
return rc
def partitionSanityWarnings(intf, warnings):
@@ -332,8 +334,8 @@ def confirmDelete(intf, device):
% device.path)
else:
# we may want something a little bit prettier than device.type
- errmsg = (_("You are about to delete the %s %s") % (device.type,
- device.name))
+ errmsg = (_("You are about to delete the %(type)s %(name)s") \
+ % {'type': device.type, 'name': device.name})
rc = intf.messageWindow(_("Confirm Delete"), errmsg, type="custom",
custom_buttons=[_("Cancel"), _("_Delete")],