bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xstrtol.h (was: Re: POTFILES.in updates?)


From: Bruno Haible
Subject: Re: xstrtol.h (was: Re: POTFILES.in updates?)
Date: Sat, 21 Jul 2007 20:18:09 +0200
User-agent: KMail/1.5.4

Eric Blake wrote:
> > The lib/gettext.h file already arranges for this (with the i18n domain name
> > being not just "gnulib", but "findutils-gnulib" or similar).
> 
> That won't work in headers.  For .c files, they are compiled as part of
> the gnulib library, where the DEFAULT_TEXT_DOMAIN is in effect.  But for
> the .h files, such as xstrtol.h, they are compiled as part of the main
> program, where gettext() is no longer a macro to the <pobase>-domain.  It
> looks like we'll have to edit any use of gettext in gnulib headers to
> instead use something from a .c file

There is only one use of gettext() in header files in gnulib, the one in
xstrtol.h, and it needs to be revised anyway: It violates the principle
that the translator must be presented whole sentences. Things like

  gettext ("invalid %s `%s'")

where the first %s comes from

  STRTOL_FATAL_ERROR (spec, _("block size"), e);

are not translatable to languages (such as German), where the adjective's
flexion depends on the gender of the noun.

The macro should be rewritten to take three localized strings as arguments,
instead of just one.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]