On Tue, May 4, 2010 at 04:40, Tim McNamara paperl...@timmcnamara.co.nz wrote:
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
I'm a bit surprised that all locales will want the same punctuation
mark and in the same position, but then, I know nothing about the
scripts in which it could be different.
I would say that the localization team can come with whatever
recommendation is better for them and add it to that wiki page. I
don't think the performance difference between + and % is significant
enough in the contexts where strings will be formatted for display.
Regards,
Tomeu
-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
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel