Hi Olaf, I got it. Thank you for your explain.
On 5 Jul 2017, at 7:52 PM, Olaf Meeuwissen <[email protected]<mailto:[email protected]>> wrote: Hi, [email protected]<mailto:[email protected]> writes: Hey guys, I have working on the source code of sane-backends, I found the macro SANE_I18N is used to sane’s localization. But I just found the follow lines of it’s define #ifndef SANE_I18N #define SANE_I18N(text) text #endif The above lines, dose nothing. So I wonder how SANE_I18N translate these backends? The backends don't translate. It's the responsibility of the *frontend* to translate the strings. The SANE_I18N macro is only the marker we use to tell xgettext which strings should be translated. These strings end up in po/sane-backends.pot. The reasoning behind making the frontend responsible for translation is that the backend may be executing remotely (e.g. via saned). You don't want to get the translations suitable for a remotely executing process. This process may execute under a different LANG setting than your local SANE frontend. Let's say you run your frontend with LANG=zh_CN and scan via the net backend on a server that just happens to run saned with LANG=fr_FR. Would you be happy with French messages? Probably not ;-) Hope this helps, -- Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9 Support Free Software https://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join Dan Tan [email protected]<mailto:[email protected]> ________________________________ 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. 本郵件(含所有附件)包含受法律保護以及機密之資訊,僅供本郵件指定的收件人使用。如果您並非指定的收件人,請立即以電子郵件通知寄件人,並將本郵件及所有複印本刪除。請注意,非經授權,嚴格禁止閱覽、散播、散佈或複製本郵件及其內容。
-- sane-devel mailing list: [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to [email protected]
