Hi all

Quick survey : what file extensions do you typically use for your TT
templates?
 - .tt
 - .html
 - ???

Bonus question: what file extensions do you use for your YAML files?
 - .yaml
 - .yml
 - .conf
 - ???

Some background:
----------------

I'm in the process of extending Locale::Maketext::Extract so that we can
use more flexible styles for "strings-to-be-localized" in TT templates.

At the moment, you have to use this fairly ugly form:

[% |l(args) %]string to localise[% END %]

I'm adding:

     [% l('string to localise',args) %]
  and
     [% 'string to localise' | l(args) %]


I'm doing something similar for YAML:

   key: _"string to localise"


At the moment, Locale::Maketext::Extract uses regexes for templates, but
to properly parse the above, I've opted to use Template::Alloy::Parse
(++ to Paul Seamons for writing the required code for me) and YAML.pm.

This means that the document has to be syntactically correct, otherwise
the parsers will just fall over... which means that we should only try
to parse files with the 'correct' parser.

So I'm adding a list of default extensions to each plugin - if the
filename does not have a required extension for a particular plugin,
that plugin makes no attempt to parse the file.

many thanks

Clint


_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to