in reply to how to extract strings from HTML::Mason components?
For a quick start, what's wrong with:
my @translatables = ($sourcecode =~ /\b__\((.*?)\)/g);
This will extract all tokens that need translation, at least from the specification you've shown. If you do more fancy stuff like nested parentheses etc., things get hairier, but as you're the one writing the code, I recommend you Just Don't Do That.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to extract strings from HTML::Mason components?
by Anonymous Monk on Dec 12, 2008 at 10:07 UTC |