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: Olivier Salaun - CRU <address@concealed>
  • To: Chia-liang Kao <address@concealed>
  • Cc: address@concealed, address@concealed
  • Subject: Re: [sympa-dev] tt2-based i18n and draft po files ready
  • Date: Wed, 28 May 2003 12:12:59 +0200

Hi,

Chia-liang Kao wrote:
> 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.

I know but I meant half the way because :
* I noticed some template structure problems and accents problems
* of template notions that have no equivalent in TT2

This is a major change in Sympa that could bring unstability ; we need to
be very carefull and double check things. We also need to provide backward
compatibility for people who customized templates or at least migration
scripts.

>> [...]
>>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.

Fine.

>>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.

I'd be interested in Autrijus point of view about this...
I noticed a us.po that has no default translation, I guess it allows changing
english translations without
changing the corresponding gettext key in all other .po files.

>>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.

Fine.

> 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.

I noticed the security problem you reported and we'll try to get rid of that
ASAP.
I'll check in TT2 documentation for non-parsing blocks...

> 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.

You mean replacing [% and %]. What did you replace them with ?

> 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

We will definitely work on the migration from tpl/nls to tt2/gettext next
july (I doubt we
get enough time in the meanwhile). Could you send us a tar of your modified
sympa distribution
or BETTER a diff of Makefiles/scripts + a detailed migration notice.

Anyhow we will contact you when we'll be working on this.

Thanks.

--
Olivier Salaun
Comite Reseau des Universites




Archive powered by MHonArc 2.6.19+.

Top of Page