[Sugar-devel] Code Guidelines & L10N

Tim McNamara paperless at timmcnamara.co.nz
Mon May 3 22:40:03 EDT 2010


Hi all,

Am seeking clarification on coding style, notably the use of trailing white
space & punctuation.

import gettext as _
...

_("Enter your name: ") => Generally used
_("Enter your name")+": " => Best for translators, slower to run,
readability decreases
_("Enter your name%s") % (": ",) => Avoids concat, readability low

Trailing white space & punctuation marks can be irritating to deal with. As
a translator, it's hard to know the significance of the white space without
context if you notice it. When the translator interprets things incorrectly,
the reader then experiences the irritation.

I've looked through the Code Guidelines[1], but can't see any reference
the appropriate way to use gettext

-Tim

[1] http://wiki.sugarlabs.org/go/Development_Team/Code_Guidelines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100504/996d94bf/attachment.htm 


More information about the Sugar-devel mailing list