Hi all,<div><br></div><div>Am seeking clarification on coding style, notably the use of trailing white space &amp; punctuation.</div><div><br></div><div>import gettext as _</div><div>...</div><div><br></div><div>_(&quot;Enter your name: &quot;) =&gt; Generally used</div>
<div>_(&quot;Enter your name&quot;)+&quot;: &quot; =&gt; Best for translators, slower to run, readability decreases</div><div>_(&quot;Enter your name%s&quot;) % (&quot;: &quot;,) =&gt; Avoids concat, readability low</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Trailing white space &amp; punctuation marks can be irritating to deal with. As a translator, it&#39;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.</div>
<div><br></div><div>I&#39;ve looked through the Code Guidelines[1], but can&#39;t see any reference the appropriate way to use gettext</div><div><br></div><div>-Tim </div><div><br></div><div>[1] <a href="http://wiki.sugarlabs.org/go/Development_Team/Code_Guidelines">http://wiki.sugarlabs.org/go/Development_Team/Code_Guidelines</a></div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8">