List Info

Thread: Re: Leveraging Translation Techniques in Plone




Re: Leveraging Translation Techniques in Plone
country flaguser name
Germany
2007-03-27 19:58:36
Hi,

Andreas Pauley wrote:
> Hanno Schlichting wrote:
> 
>> The msgctext support has landed in gettext version
0.15 which was
>> released in July 2006. While I think we should
switch to that approach
>> in the mid-term, we do need support for it on the
various levels of the
>> stack we are depending on. The same goes for the
long needed
>> plural-forms support.
>>
>> Both of these are not supported by the gettext
module included in
>> Python. In return both of them are also not
supported on the Zope (3)
>> level, which our translation machinery is based
on.
> 
> I am not 100% familiar with the complete cycle that
happens in Plone i18n.
> Are you talking about the end of the cycle, when Plone
needs to read the 
> translated po-files?
> Are both the Python gettext module and the Zope 3
infrastructure used 
> independantly, or is Plone using Zope 3/Five, which in
turn uses the 
> gettext module?

I was only talking about the end of cycle when we already
have a po file
and need to query it to return a translation.

The full process right now is:

- PlacelessTranslationService uses a customized version of
the gettext
file from Python to compile the po file into a mo file on
Zope startup.

- A page being rendered is usually written in TAL which
includes markup
for marking translatable text. The current syntax is
sufficient for the
msgctext support but would need to be extended to cover
plural forms.

- If the text being translated is defined in Python code it
probably
used the zope.i18nmessageid package, which would need to be
extended as
well to support both of these new options.

- The TAL machinery calls a translation service. Currently a
mixture of
Five/Zope3/PlacelessTranslationService, which all would need
to be extended.

- The translation service looks up the mo file and uses the
Python
gnutranslations/gettext module to access it. This would need
to be
extended as well.

For the process of creating pot files from source code, we
mainly use
i18ndude which in turn is based on zope.tal and Python's
gettext module
again. And again all those don't support the new options.

All of this is a bit of work and quite a lengthy process as
with for
example Python the next version which could include a new
feature like
this one is probably not usable with Plone for the next one
to two years
:( Which makes it even more important to actually start on
the lower
levels and add the support we want ;)

Hanno


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-i18n mailing list
Plone-i18nlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )