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 /vnc.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 'vnc.py')
-rw-r--r-- | vnc.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -134,9 +134,15 @@ class VncServer: # figure out product info if self.name is not None: - self.desktop = _("%s %s installation on host %s") % (product.productName, product.productVersion, self.name) + self.desktop = _("%(productName)s %(productVersion)s installation " + "on host %(name)s") \ + % {'productName': product.productName, + 'productVersion': product.productVersion, + 'name': self.name} else: - self.desktop = _("%s %s installation") % (product.productName, product.productVersion) + self.desktop = _("%(productName)s %(productVersion)s installation")\ + % {'productName': product.productName, + 'productVersion': product.productVersion} def setVNCParam(self, param, value): """Set a parameter in the Xvnc server. |