[Sugar-devel] [PATCH] Wireless key dialog: Translate more strings (OLPC#9268)
sascha-ml-reply-to-2011-3 at silbe.org
Mon Aug 1 13:11:19 EDT 2011
Excerpts from Daniel Drake's message of Mon Aug 01 18:08:15 +0200 2011:
> Various user-visible strings here were not being translated.
> Use _() to mark them as translatable.
Looks good in general, thanks!
> @@ -90,8 +90,9 @@ class KeyDialog(gtk.Dialog):
> - label = gtk.Label("A wireless encryption key is required for\n" \
> - " the wireless network '%s'." % self._ssid)
> + label = gtk.Label(_("A wireless encryption key is required for "
> + "the wireless network '%s'.") % self._ssid)
> + label.set_line_wrap(True)
Letting GTK do the line wrapping automatically is fine, but should be
mentioned in the patch description.
As you are already touching this code, please consider replacing the %s
with %r (the difference is in how strings containing special characters
and quotes get displayed) and using a singleton tuple for the string
formatting parameter (self._ssid) for consistency with other code.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 500 bytes
Desc: not available
More information about the Sugar-devel