Move to maketext: sample templates

Vitaly Fedrushkov fedrushkov at users.sourceforge.net
Sun Jan 18 01:27:30 UTC 2009


Good $daytime,

Another option came from reading about Pylons and comparison of compiled 
templates before and after maketext'izing.

We may try to hide maketext calls entirely to make it happen on precompilation, 
not template parsing.

We still need to mark translation units with {{ }} or whatever.  However, 
instead of substituting them to l() calls on parse time:

1. When {{ is encountered, start new block (with my $output as usual)

2. Incoming literal text is added to $output as is.

3. Stash calls, filters and captures add "[_n]" to $output and evaluated with 
results saved to @params list.

4. When }} is encountered, block is closed, returning l($output, @params).

Good news: almost no explicit l() calls

Bad news:

  - xgettext complications: parse TT well or scan precompiled templates?

  - @params are obfuscated by precompilation, nothing to put as PO comments

Is it practical?  Suggestions and criticism are welcome.

   Regards,
   Vitaly.
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla



More information about the developers mailing list