bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Gettext 0.11.5: directories and #lines in generated PO files


From: Bruno Haible
Subject: Re: Gettext 0.11.5: directories and #lines in generated PO files
Date: Fri, 27 Sep 2002 17:48:09 +0200 (CEST)

Akim Demaille writes:
> 
> I just noticed that gettext understands the #line when it parses the C
> files.  This is great, and solves my problems wrt Yacc and Flex files:
> the translators can find the sources instead of the output files.
> 
> Nevertheless there is a slight problem:
> 
> @@ -253,7 +253,7 @@
>  msgid "rule never reduced because of conflicts"
>  msgstr "Regel nie reduziert wegen Konflikten"
>  
> -#: src/parse-gram.y:347
> +#: parse-gram.y:347
>  msgid "POSIX forbids declarations in the grammar"
>  msgstr "POSIX verbietet Deklarationen in der Grammatik"
>  
> 
> It does not keep the directory in the result.

Why does the recommendation in the gettext manual (node:
po/POTFILES.in) not work for you?

    When a C file is automatically generated by a tool, like
    `flex' or `bison', that doesn't introduce translatable strings
    by itself, it is recommended to list in `po/POTFILES.in' the
    real source file (ending in `.l' in the case of `flex', or in
    `.y' in the case of `bison'), not the generated C file.

To make things work, you can also call bison from a different
directory, or make a symlink "ln -s . src" before running bison in the
src directory, or postprocess the generated C file using
"sed -e 's,parse-gram\.y,src/parse-gram.y,g'". But these are hacks;
I'd prefer the first approach.

Bruno




reply via email to

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