Skip to Content.
Sympa Menu

devel - template toolkit adapter for sympa template

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Chia-liang Kao <address@concealed>
  • To: address@concealed
  • Cc: address@concealed
  • Subject: template toolkit adapter for sympa template
  • Date: Mon, 19 May 2003 00:26:57 +0800

(resent after subscribing to the list :-)

Salut,

I just spent some time writing a Template::Provider to let Template
Toolkit process the current sympa template.

it is a drop-in replacement for the current parser.pl, just overwrite
it or let other script require it instead of parser.pl. (I'm testing
with CVS -head)

some quick tests are showing the fcgi process is consuming half cpu
time per page served after the first load, due to the compilation of
templates in tt2.

despite of performance, the main reason I did this is for easier
localisation efforts. as for bug#056 it's more like the msgcat-way,
which IMHO would be a bit painful for large systems like sympa.

and the currently one-template-per-language way is yet more painful,
it has to move before translators getting impatient following minor
changes.

I would like to suggest using tt2 natively, and the following
convertion steps:

* run a script over different languages of same templates to detect
strings to be translated.

* use the convertor in my Template::Provider to generate localisable
.tt2 files like http://www.autrijus.org/webl10n/slide013.html

* use xgettext.pl from Locale::Maketext::Lexicon to extract gettext
strings.

* extract the current translations of templates into the gettext file.

Please let me know what you think.

PS: Autrijus (cc'ed, who did the sympa tranlsation before) is a webl10n
expert, maybe he has some suggestions.

Cheers,
CLK

Attachment: tt2.pl
Description: Perl program




Archive powered by MHonArc 2.6.19+.

Top of Page