<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 16, 2013 at 2:04 PM, Mathew R Odden <span dir="ltr"><<a href="mailto:mrodden@us.ibm.com" target="_blank">mrodden@us.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><tt><font>Łukasz Jernaś <<a href="mailto:deejay1@srem.org" target="_blank">deejay1@srem.org</a>> wrote on 10/16/2013 02:26:28 AM:</font></tt></p><div class="im"><tt><font><br>
<br>
> I'm still trying to wrap my head around the need for translating API<br>
> messages and log messages as IMHO it adds a lot more problems for app<br>
> developers and log analysis tools, eg. a log analysis tool would be<br>
> usable only for the locale it was developed for and break with _every_<br>
> update of the translations. As a translator myself I don't really want<br>
> to check every system in existence if it uses my messages to do some<br>
> sort analysis and often change the strings to more proper form in my<br>
> language as reviews and feedback on the translation comes in - even<br>
> though the original English string doesn't change at all.<br>
> I feel that translating mostly computer facing stuff is just crying<br>
> for bugs, weird issues popping up for users, API-s should be readable<br>
> by humans, but translating them is a bit too far in my opinion.</font></tt></div><br>
<br>
<tt><font>The original reason I got involved with the i18n stuff in OpenStack was</font></tt><br>
<tt><font>because we had a need to be able to debug issues on system running a </font></tt><br>
<tt><font>non-English locale, and therefore spitting out logs of translated messages.</font></tt><br>
<tt><font>This makes it extremely difficult to debug for two reasons, the inline</font></tt><br>
<tt><font>messages in code are English, and if the person doing the debugging doesn't</font></tt><br>
<tt><font>understand the language the logs are in, it is obviously harder to find </font></tt><br>
<tt><font>issues on the system.</font></tt><div class="im"><br>
<tt><font> <br>
> If I get it right the Message objects are supposed to move stuff<br>
> around internally in a C/en locale, but we will still end up dropping<br>
> translated messages to computers if the don't explicitly specify the<br>
> locale which the request should use...</font></tt><br>
<br>
</div><tt><font>Messages are designed to wrap the original inline English string, so</font></tt><br>
<tt><font>that at a later time, such as outputting to a log handler or at the</font></tt><br>
<tt><font>API layer when outputting an HTTP response, we can translate the </font></tt><br>
<tt><font>internal string to a requested locale we may know at that time.</font></tt><br>
<tt><font>The way the _() gettext function works is to translate everything</font></tt><br>
<tt><font>immediately to the system locale.</font></tt><br>
<br>
<tt><font>This leads to the two problems Messages is supposed to address:</font></tt><br>
<tt><font> 1. localizable messages coming out of the API will be</font></tt><br>
<tt><font> translated to the system locale (which doesn't really make sense IMO)</font></tt><br>
<tt><font> 2. log records are translated to the system locale as well, making</font></tt><br>
<tt><font> debugging issues that much more difficult on a non-English locale</font></tt><br>
<br>
<tt><font>These could also be addressed by removing the original gettext </font></tt><br>
<tt><font>immediate translation of log/API messages.</font></tt><br>
<br>
<tt><font>Removing translation from the OpenStack server projects actually</font></tt><br>
<tt><font>makes more sense to me, because, as you pointed out, they are services</font></tt><br>
<tt><font>with APIs that are meant to utilized by other programs, not users</font></tt><br>
<tt><font>directly. Also, there is the matter of log messages being translated,</font></tt><br>
<tt><font>which makes auditing and debugging difficult, which is the primary use</font></tt><br>
<tt><font>of logging facilities IMHO.</font></tt><br>
<br>
<tt><font>I have been told several times that we can't remove the i18n functionality</font></tt><br>
<tt><font>from the projects because some users want it still. I would be interested</font></tt><br>
<tt><font>in hearing more from the users and developers that would like to keep</font></tt><br>
<tt><font>the functionality around.</font></tt></div></blockquote><div><br></div><div>Error messages from the server processes are presented to the user through the command line interface and through Horizon, so they do need to be translated.</div>
<div><br></div><div>Log message translation is meant to help deployers, rather than end-users. Not all deployers are going to have strong English reading skills, so having messages translated into their native language makes it easier to administer OpenStack.</div>
<div><br></div><div>Doug</div><div><br></div></div></div></div>