From 576d6d67ded60eac2133f324c20d3484904ea475 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 1 Oct 2009 10:20:30 -1000 Subject: 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. --- rescue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rescue.py') diff --git a/rescue.py b/rescue.py index b6e6c10a8..775f159e8 100644 --- a/rescue.py +++ b/rescue.py @@ -354,12 +354,12 @@ def runRescue(anaconda, instClass): log.info("System has been mounted under: %s" % anaconda.rootPath) else: ButtonChoiceWindow(screen, _("Rescue"), - _("Your system has been mounted under %s.\n\n" + _("Your system has been mounted under %(rootPath)s.\n\n" "Press to get a shell. If you would like to " "make your system the root environment, run the command:\n\n" - "\tchroot %s\n\nThe system will reboot " + "\tchroot %(rootPath)s\n\nThe system will reboot " "automatically when you exit from the shell.") % - (anaconda.rootPath, anaconda.rootPath), + {'rootPath': anaconda.rootPath}, [_("OK")] ) rootmounted = 1 -- cgit