I have a loc() macro that I use in templates to localize text.  I have a
tool to search templates for the loc() tag (along with others) and extract
out text to pass to the translators.

Some text is localized via other functions or macros -- for example, I might
have a macro that I call as "main_heading( 'Welcome' )" that ends up calling
loc().
Or I might also use page.title = 'Welcome' and then later page.title is
passed to loc.  The issue is that not all text is directly entered with
loc().

What I'm wondering is if I can get the Template parser to build me list of
all strings parsed from quoted strings in the template.  Obviously, that
won't get me all the text and it will get me text that never needs to be
localized, but I could compare what the Template parser finds with what I've
extracted by other means to help catch omissions.

Can I get the parser to do that work for me?   Looking at compiled templates
I can see it may not work very well, but might be worth a try.


-- 
Bill Moseley
[email protected]
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to