fyi, this thread originates from the following Bug report:<div><a href="https://bugs.launchpad.net/nova/+bug/1075082">https://bugs.launchpad.net/nova/+bug/1075082</a></div><div><br></div><div>thanks,</div><div>dims<br><br>
<div class="gmail_quote">On Wed, Nov 7, 2012 at 10:43 AM, Ying Chun Guo <span dir="ltr"><<a href="mailto:guoyingc@cn.ibm.com" target="_blank">guoyingc@cn.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p><font face="sans-serif">Hi,</font><br>
<br>
<font face="sans-serif">From my observation, in the source codes, i18n of LOG messages (or strings) are lack of consistency. There is no coding standard for the i18n of LOG messages. Some LOG messages are wrapped with _(), some are not. Messages wrapped with _() will be extracted into PO template and will be translated. There is no rules to tell which kind of LOG messages should be translated and which should not. It all happens randomly, depending on the programming habits of developers. This is not good. We may need a wide discussion within the community, get an agreement, make a coding standard for all projects in OpenStack, and then change the codes to make them consistent.</font><br>

<br>
<font face="sans-serif">First of all, there is an agreement within community that user-facing string should be translated. As to LOG messages, there are arguments but no consensus yet. One argument says the LOG messages are useful for operators/administrators especially in the case of abnormal behavior and is certainly accessible to users and therefore just like all user-facing text, thus LOG messages should be translated. The opposing argument could say that LOG is primarily useful for developers, developers can read English LOG, and LOG in different languages will block the communication between developers and users, thus LOG should not be translated.</font><br>

<br>
<font face="sans-serif">Besides these arguments, there are some other questions we need to think about. What if the same message is both logged AND thrown back to the user? What about different log levels (EXCEPTION, ERROR, WARNING, AUDIT, INFO, DEBUG)? I think DEBUG messages should never be translated as they are only for developer consumption. What about the other levels? </font><br>

<br>
<font face="sans-serif">Of course, before we make the decision, we also need to consider the workload to change the existing codes in order to make them consistent. Below statistic data are gotten by scanning the existing codes. You may notice that LOG messages with _() are in the majority in the existing codes. We may need to compare the workload to add _() to the minority with the workload to remove _() from the majority. </font><br>

<br>
<font face="sans-serif">----------STATISTIC DATA-----------------</font><br>
<font face="sans-serif">Project name | Num of messages without _() | Num of messages with _()  </font><br>
<font face="sans-serif">Nova | 28 | 1988</font><br>
<font face="sans-serif">Glance | 22 | 233</font><br>
<font face="sans-serif">Keystone | 53 | 3</font><br>
<font face="sans-serif">Quantum | 228 | 246</font><br>
<font face="sans-serif">Cinder | 10 | 1525</font><br>
<font face="sans-serif">----------------------------------------</font><br>
<br>
<font face="sans-serif">Feel free to express your opinions. I'd love to hear feedback as much as possible, especially people from Non-English speaking countries. You can also help to do a survey within your customers, and let the community know the result.</font><br>

<br>
<font face="sans-serif">Thanks and regards</font><br>
<font face="sans-serif">Daisy</font></p></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Davanum Srinivas :: <a href="http://davanum.wordpress.com">http://davanum.wordpress.com</a><br>
</div>