xgettext parametrization (was: Re: xgettext deficiency?)
Bruno Haible
bruno at clisp.org
Sat Dec 29 11:36:38 EST 2007
Hello Clytie,
Thanks for bringing this up to a forum where I can help.
Christian Stimming wrote:
> > The string is looked up in gtk20's translation domain. If
> > you look into the source file, you'll notice the dgettext() call around it.
> > In a way, the fact that it shows up in gnucash.pot is a technical deficiency
> > of the xgettext program. We can't do anything about that.
There are three things that you could do about it:
1) If this is the only call to 'dgettext' in your program, or if all the
'dgettext' arguments should not be added to the POT file, then you can
pass to xgettext a set of keywords to look for, that does not include
'dgettext'. Like this:
xgettext --k --keyword=gettext --keyword=gettext_noop --keyword=_ ...
2) If only this particular call to 'dgettext' should be omitted from the
POT file, you can hide the call in a C macro or inline C function, like
this:
#define gtk20_gettext(string) dgettext("gtk20", string)
gtk20_gettext("calendar:week_start:0")
3) Last not least, you can always modify po/Makefile.in.in to postprocess
the POT files in particular ways. For example, you could pipe it through
msggrep -v --msgid -E -e '^calendar:week_start:0$'
to exclude exactly this particular msgid.
Bruno
More information about the gnucash-devel
mailing list