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



ERDI Gergo <cactus cactus rulez org> writes:

> On Thu, 24 Jan 2002, Owen Taylor wrote:
> 
> > 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.)
> 
> how about a patch containing this one:

Looks fine, except that what it is stripping is not whitespaces but
empty lines.

Regards,
                                        Owen
 
> # POTFILES is created from POTFILES.in by stripping comments, whitespaces
> # and Intltool tags (enclosed in square brackets), and appending a full
> # relative path to them
> POTFILES: POTFILES.in
> 	( if test 'x$(srcdir)' != 'x.'; then \
> 	    posrcprefix='$(top_srcdir)/'; \
> 	  else \
> 	    posrcprefix="../"; \
> 	  fi; \
> 	  rm -f $ -t $@ \
> 	    && (sed -e '/^#/d' 						\
> 		    -e "s/^\[.*\] +//" 					\
> 		    -e '/^[ 	]*$$/d' 				\
> 		    -e "s  *@	$$posrcprefix& \\\\@" < $(srcdir)/$  in	\
> 		| sed -e '$$s/\\$$//') > $ -t \
> 	    && chmod a-w $ -t \
> 	    && mv $ -t $@ )



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