<br><div><span class="gmail_quote">2006/7/6, Charles Lepple &lt;<a href="mailto:clepple@gmail.com">clepple@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 7/6/06, Arnaud Quette &lt;<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>&gt; wrote:<br>&gt; just in time, since I'm finishing 2.0.4-pre1.<br>&gt; I'll release it tomorrow, and I'll check to include your patch.
<br><br>One more thing: the patch changes the solis driver language to<br>Portuguese. Are these units sold outside of Brazil?<br><br>At some point, if we start supporting more drivers that are sold<br>regionally, it might be good to use gettext so that people see driver
<br>messages in their native language, but when debugging, they can switch<br>to the POSIX &quot;C&quot; locale and get English messages without recompiling.</blockquote><div><br>I'm thinking about i18n in nut for some time...
<br><br>here are some randoms thoughts:<br><br>* we have two kinds of translatable data:<br>(1) daemons msg: {drivers, upsd, upsmon} debug and log messages<br>(2) data tree descriptions, obtained via upsd <br><br>* IIRC, gettext is only capable of translating automagically strings, considering the local system's locale (I might be wrong, not checked!)
<br><br>* It means that we would:<br>(a) limit (the optional) gettext use to (1),<br>(b) support (2) within nut.<br><br>* For (b), we need:<br>- to translate cmdvartab, and call it cmdvartab.lg_LG, using the standard codes,
<br>- to improve the &quot;GET DESC&quot; request of the network protocol:<br><br></div>GET DESC &lt;upsname&gt; &lt;varname&gt; &lt;language&gt;<br>GET DESC su700 ups.status fr_FR<br></div><br clear="all">&lt;language&gt; is optional. If it's blank, or if the matching file (ie 
<a href="http://cmdvartab.fr">cmdvartab.fr</a> or cmdvartab.fr_FR) doesn't exist, the standard (C) file (cmdvartab) will be used. That case would need either a way to feed back, or warn the requester.<br><br>The best and simpler solution is to embed the local used in the answer, ie:
<br><br>DESC &lt;upsname&gt; &lt;varname&gt; &lt;language&gt; &quot;&lt;description&gt;&quot;<br>DESC su700 ups.status &quot;UPS status&quot;<br><br>Arnaud<br>-- <br>Linux / Unix Expert - MGE UPS SYSTEMS - R&amp;D Dpt<br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://people.debian.org/~aquette/">http://people.debian.org/~aquette/</a>
<br>OpenSource Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a>