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
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to