> > Doesn't that extract text from just loc() tags? Sorry, I was not > clear . I'm not trying to extract text form loc() calls, but from > quoted strings in general. I already have a tool to find the loc() > text.
Ah ok. Yeah, xgettext.pl just extracts from text in l() or loc(), not quoted strings in general. However, you could repurpose the code in http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.77/lib/Locale/Maketext/Extract/Plugin/TT2.pm to do what you need, although this only catches sub calls and filters, it wouldn't catch simple variable assignment. Wouldn't be too tricky to add that though. probably just need to adjust text() textblock() and quoted(). > $ cat test.tt > [% > loc( 'in loc' ); > > string = 'plain string'; > > some_macro( 'passed in text' ); > %] > This is plain text a loc('123') file > I'm after the opposite, really. What I'm after is the strings "plain > string" and "passed in text" above. (BTW - Should that loc('123') be > extracted??) You're either using an old version, or you're not enabling the file-type specific plugins: http://search.cpan.org/~drtech/Locale-Maketext-Lexicon-0.77/script/xgettext.pl#Plugins: I didn't want to break backwards compatibility, so by default it runs each parser on each file, as it used to before, so it is probably the Perl parser picking that one up. If you call it as: xgettext.pl -D /my/files -P perl -P tt2 -o en.po then it won't find that loc('123') > hth clint > > -- > Bill Moseley > [email protected] > _______________________________________________ > templates mailing list > [email protected] > http://mail.template-toolkit.org/mailman/listinfo/templates _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
