[illumos-Developer] BEADM [WEBREV] 418 replace beadm by tbeadm with gettext support
Gordon Ross
gordon.w.ross at gmail.com
Fri Dec 10 07:17:40 PST 2010
On Fri, Dec 10, 2010 at 4:59 AM, Joerg Schilling
<Joerg.Schilling at fokus.fraunhofer.de> wrote:
[...]
>> /* Howto: Tables of translated strings. */
>>
>> #ifndef I18N /* never defined, just a trick for xgettext */
>> #define gettext(S) S
>> #endif
>>
>> const char *table[] = {
>> gettext("string1"),
>> gettext("string2"),
>> NULL
>> };
[and in the next mail message]
>> #undef gettext
Joerg claims:
> This does not work.
The above example works fine for me with xgettext and cc.
> _(s) is defined as gettext(s) and if you later define gettext(s) to be s,
> there will be no gettext call anymore.
The example I provided did not use a _() macro.
I mentioned in the message following the one you quoted
that the last line of the example had been dropped:
#undef gettext
If that's included, there's no problem with
later gettext calls.
More information about the Developer
mailing list