[EMAIL PROTECTED] (Niels M�ller) writes:

> Kimball Thurston <[EMAIL PROTECTED]> writes:
> > > > !       static const char bad_key_err[] =
> > > > !       static const char *bad_key_err =
[...]
> It depends on what the N_ expands to.

The usual definition is:

     /* in <libintl.h> */
     #define gettext_noop(String) (String)

     /* in the program */
     #ifdef gettext_noop
     # define N_(String) gettext_noop (String)
     #else
     # define N_(String) (String)
     #endif

In other words, N_ should not affect compilation in any way; it
only marks the string so xgettext can extract it from the source
code.  It is meant to be used in initializers, which must be
constant.  The actual gettext() call is then done somewhere else.
This is explained in Info: (gettext)Special cases.

If the compiler complains about the initializer, either N_ or
gettext_noop has been misdefined somewhere.  Or perhaps the
compiler doesn't even accept:

     static const char msg[] = "hello";

in which case I'd say it's broken.

Reply via email to