Skip to Content.
Sympa Menu

devel - Re: [sympa-dev] tt2-based i18n and draft po files ready

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Chia-liang Kao <address@concealed>
  • To: Olivier Salaun - CRU <address@concealed>
  • Cc: address@concealed, address@concealed
  • Subject: Re: [sympa-dev] tt2-based i18n and draft po files ready
  • Date: Wed, 28 May 2003 00:42:45 +0800

On Tue, May 27, 2003 at 05:21:36PM +0200, Olivier Salaun - CRU wrote:
> You've already gone half the way, it is encouraging us to go further.

actually more than half the way now! http://lists.elixus.org/wws is running
tt2 native version of sympa with half-done tw translations.

> As you mentionned bug#056 in your first email, we had planned to change the
> templates
> organisation to :
> 1/ have a single version of each template with translation references.
> 2/ use a single mecanism for NLS and template internationalization
> 3/ provide a (web) contextual translation tool
>
> Your work drives us to (1) and (2). Do you know of any existing tools that
> would help translators
> work on .tt2 and .po files ?

yes, the xgettext.pl distributed with locale::maketext::lexicon extracts the
strings
to translate from tt2 files, and merges with exsiting po files.

and all other gettext toolchain can apply to the po files.

> I have a question about .po files : the english text are the index ; how
> about duplicates (the
> same english text that would be translated differently in different
> contexts) ?

AFAIK, the same key is merged as one entry in po files. however, i think it's
a common need
for people to manually tweak the translations according to the context, maybe
autrijus
would know if there is existing adopted solutions.

> Other questions about TT2 : the format is very close to our native template
> format which is
> great. Is there an equivalent for our [STOPPARSE] [STARTPARSE] ? Is there a
> way to get
> the parser output stored in memory (an array), instead of having it printed
> to file descriptor ?

the parse_tpl function I implemented in src/tt2native.pl
in my svn repository handles all input and output described
in the original src/parse.pl. so yes, it handles arrayref output
and arrayref as a template to process.

about start/stop parse, I have tried to implement it in tt2, but
there's more problem than expected. more detail is already in my last
mail on the list. in short, there should be escape from the upper
level, ie, when using mhonarc to create the file to be processed by
any template system. otherwise it's easy to exploit the stop/start
parse things. the current mhonarc resources and tt2 templates in my
svn repository already handles the above problem, by changing the
tt2 starttag and endtag to something mhonarc would automatically
escape without any kludge.

the svn repository is at http://svn.clkao.org/sympa/trunk/,
stuff people might be interested:
src/tt2native.pl # the tt2 implmenetation of parse.pl
wwsympa/tt2 # the templates
po/wwsympa # the po files
src/etc/mhonarc-ressources

Cheers,
CLK



Archive powered by MHonArc 2.6.19+.

Top of Page