<div dir="ltr">Hi all,<br><div><br>I understand that i18n is an important feature to customers and that having gettextutils wrapped on all log messages will benefit<br>in packing custom .pot files to ship with a product.<br>
<br></div><div>However seeing the number of _()'s increasing in source code, its now kind of bothering me now to see all the messages go through<br></div><div>the heavy process of gettext.translation() even when I don't need i18n.<br>
<br></div><div>Therefore I propose a flag, e.g i18n=true|false, so that a developer can choose the behavior of the _().<br><br></div><div>in openstack.common.gettextutils.py...<br><br></div><div>def _(msg):<br></div><div>
   if cfg.CONF.i18n:<br>       return t.ugettext(msg)<br></div><div>   else:<br></div><div>       return msg<br><br></div><div>Well you can have the if/else outside of the function to prevent looking up the conf every time it gets called but you get the idea.<br>
<br></div><div>Any thoughts?<br></div></div>