diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-02-10 14:28:26 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2012-03-16 21:23:29 (GMT) |
commit | 97bab1747047eefc2109119a1651deb25b30691f (patch) | |
tree | c4b85c635c301f0672a7e4611e279f9648d092d6 /model.py | |
parent | d7629a8196e68d42fe0d22aff520d94f3c928b62 (diff) |
Use named parameters in gettext strings -v2
When there are more than one parameter with the same type
gettext need named parameters to enable the translators to change
the order if needed.
Pootle server complain about this format strings in Record activity,
and you can see the same error doing "./setup.py genpot"
v2: Fixed typo
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -180,7 +180,8 @@ class Model: mins = value / 60 secs = value % 60 - text = _('%d:%02d remaining') % (mins, secs) + text = _('%(mins)d:%(secs)02d remaining') % {'mins': mins, + 'secs': secs} self.set_progress(progress_value, text) @@ -381,7 +382,8 @@ class Model: stringType = constants.MEDIA_INFO[type]['istr'] # Translators: photo by photographer, e.g. "Photo by Mary" - recd.title = _('%s by %s') % (stringType, recd.recorderName) + recd.title = _('%(type)s by %(name)s') % {'type': stringType, + 'name': recd.recorderName} color = sugar.profile.get_color() recd.colorStroke = color.get_stroke_color() |