Re: [Translation-i18n] functions inside gettext calls



Tomas Kuliavas wrote:

> > Is there some documentation that explains why functions can't be used
> > inside gettext() and ngettext() calls?
> >
> > For example N_(some_function()) or
> > http://bugzilla.gnome.org/show_bug.cgi?id=345027
> >
> > I know that function string can't be extracted with xgettext, but  
> > can't find anything related about it in
> > http://developer.gnome.org/doc/guides/programming-guidelines/l10n.html

Well, the reason why we recommend to non-experts to not use function calls
inside gettext() _is_ that xgettext then cannot determine the possible
set of strings that can be the argument of gettext() and put this set
into the POT file. There is no other reason. If you are expert enough
to ensure that all possible strings appear in the POT file, you can
use function calls as argument.

Thanks Clytie for the forward.

Bruno



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