[Sugar-devel] [PATCH] Wireless key dialog: Translate more strings (OLPC#9268)
Sascha Silbe
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):
>
> self.set_has_separator(False)
>
> - 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.
Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 500 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110801/9cad08ca/attachment.pgp>
More information about the Sugar-devel
mailing list