<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Olaf,
<div class=""><br class="">
</div>
<div class="">I got it.</div>
<div class="">Thank you for your explain.</div>
<div class="">
<div class=""><br style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 5 Jul 2017, at 7:52 PM, Olaf Meeuwissen <<a href="mailto:paddy-hack@member.fsf.org" class="">paddy-hack@member.fsf.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi,<br class="">
<br class="">
<a href="mailto:DanTan@pek.destiny.com.cn" class="">DanTan@pek.destiny.com.cn</a> writes:<br class="">
<br class="">
<blockquote type="cite" class="">Hey guys,<br class="">
<br class="">
I have working on the source code of sane-backends, I found the macro<br class="">
SANE_I18N is used to sane’s localization. But I just found the follow<br class="">
lines of it’s define<br class="">
<br class="">
#ifndef SANE_I18N<br class="">
#define SANE_I18N(text) text<br class="">
#endif<br class="">
<br class="">
The above lines, dose nothing. So I wonder how SANE_I18N translate<br class="">
these backends?<br class="">
</blockquote>
<br class="">
The backends don't translate.  It's the responsibility of the *frontend*<br class="">
to translate the strings.  The SANE_I18N macro is only the marker we use<br class="">
to tell xgettext which strings should be translated.  These strings end<br class="">
up in po/sane-backends.pot.<br class="">
<br class="">
The reasoning behind making the frontend responsible for translation is<br class="">
that the backend may be executing remotely (e.g. via saned).  You don't<br class="">
want to get the translations suitable for a remotely executing process.<br class="">
This process may execute under a different LANG setting than your local<br class="">
SANE frontend.<br class="">
<br class="">
Let's say you run your frontend with LANG=zh_CN and scan via the net<br class="">
backend on a server that just happens to run saned with LANG=fr_FR.<br class="">
Would you be happy with French messages?  Probably not ;-)<br class="">
<br class="">
Hope this helps,<br class="">
--<br class="">
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27<br class="">
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9<br class="">
Support Free Software                        <a href="https://my.fsf.org/donate" class="">https://my.fsf.org/donate</a><br class="">
Join the Free Software Foundation              <a href="https://my.fsf.org/join" class="">https://my.fsf.org/join</a><br class="">
</div>
</div>
</blockquote>
<br class="">
</div>
Dan Tan<br class="">
<a href="mailto:dantan@pek.destiny.com.cn" class="">dantan@pek.destiny.com.cn</a></div>
<br>
<hr>
<font face="Arial" color="Black" size="2"><br>
The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination,
 distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.<br>
<br>
本郵件(含所有附件)包含受法律保護以及機密之資訊,僅供本郵件指定的收件人使用。如果您並非指定的收件人,請立即以電子郵件通知寄件人,並將本郵件及所有複印本刪除。請注意,非經授權,嚴格禁止閱覽、散播、散佈或複製本郵件及其內容。<br>
</font>
</body>
</html>