Re: glib-gettextize patch to handle Intltool [] tags



ERDI Gergo <cactus cactus rulez org> writes:

> On Thu, 24 Jan 2002, Owen Taylor wrote:
> 
> >  A) Can you point me to the part of the intltool docs explaining these
> >     tags? I'm curious as to the format, and couldn't find them in
> >     a quick look in the docs or the intltool code.
> 
> I don't know where it's documented. I'm not an Intltool developer myself.
> 
> The basic idea is that there can be files with unknown (to Intltool) file
> name prefixes, and you have to provide a file type for these in
> POTFILES.in (since C files are parsed differently than XML files, for
> example). So you include [type] tags in POTFILES.in, e.g.
> 
> [type: gettext/xml] src/parts/screwdriver.part

It looks like it is documented only in the intltool ChangeLog :-(

> >  B) The patch will need an explanatory comment.
> 
> Isn't the ChangeLog entry ('Strip Intltool tags from POTFILES') enough?

If we are adding regexes for support for an undocumented feature in a
package adding extensions to the standard gettext POTFILES.in syntax,
yes, we actually need a comment in the code.

> +	    && (sed -e "s/\[.*\] +//" 					\
> +		    -e '/^#/d' -e '/^[ 	]*$$/d' 			\
> +		    -e "s  *@	$$posrcprefix& \\\\@" < $(srcdir)/$  in	\
>  		| sed -e '$$s/\\$$//') > $ -t \

Also, could you make the regex more explicit to:
 
\^[.*\] +

And move it _after_ the comment stripping. (Actually, with the binding to
the front, it shouldn't matter, but it's better code organization.)

Regards,
                                        Owen



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