diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-10-01 10:20:30 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-10-01 10:20:30 -1000 |
commit | 576d6d67ded60eac2133f324c20d3484904ea475 (patch) | |
tree | 278161e765bfd939d2fb113aae9e7bf6f1fed06a /iw/network_gui.py | |
parent | 89f97834a415fa9aafa0824e7603fe8091058efb (diff) | |
download | anaconda-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 'iw/network_gui.py')
-rw-r--r-- | iw/network_gui.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/iw/network_gui.py b/iw/network_gui.py index 2ba129557..c3086d563 100644 --- a/iw/network_gui.py +++ b/iw/network_gui.py @@ -71,9 +71,11 @@ class NetworkWindow(InstallWindow): if herrors is not None: self.intf.messageWindow(_("Error with Hostname"), - _("The hostname \"%s\" is not valid for the " - "following reason:\n\n%s") - % (hostname, herrors,), + _("The hostname \"%(hostname)s\" is not " + "valid for the following reason:\n\n" + "%(herrors)s") + % {'hostname': hostname, + 'herrors': herrors}, custom_icon="error") self.hostnameError() |