Chris Withers wrote:
> Is he not on this or any of the other zope3-related lists?

Hi Chris,

of course I'm reading this list, but sometimes I'm quite overworked and
don't answer on the same day ;)

>From reading your questions and the code Martijn posted I get the
feeling that we all have quite some use-cases we try to solve in common
which might indicate that these should be solved on the framework level.

My idea for my Google Summer Of Code project (read: I'm currently
getting paid by Google to do this stuff) so far has been to re-implement
all the features of PlacelessTranslationService and PloneLanguageTool
based on Zope3 and put some of them directly into Zope3 core and provide
the rest and some more in a pure Zope3-style plone.i18n package.

Amongst the features I was planning to implement are:

- configurable language negotiation based on a set of registered extractors
- extractors: browser language, cookie and URL segment (maybe member
property but this is probably impossible in pure Zope3 right now)
- possibility to restrict allowed languages, so one can force sites into
English only mode or allow only a subset of available languages.

For the Zope3 core I so far had in mind to implement:

- Automatic generation of Gettext mo files from all registered po files
on server start or explicit refresh.
- if time permits implement a "tracker mode" (this is the PTS term,
Localizer has the same feature) which if turned on, collects and stores
all yet untranslated messages.

While I still think the last two should make it into Zope3, there is one
other major drawback right now, which I would like to solve.

This is the half-hearted implementation of the INegotiator, as it is
even mentioned in the interface description. Right now there are two
interfaces IUserPreferredLanguages and ILanguageAvailability of whom
only the first one is used by the Negotiator, whose responsibility it
should be to negotiate between the preferred and available languages.

Right now the available languages are hard-coded as all languages which
exist for a TranslationDomain, which let to the hacky work-around code
Martijn has written ;)

As I guess not all of you already spent some hours looking through the
Zope3 code I'll stop here for some meta comments :)

My current roadmap is to implement all of the above mentioned in the
next two to three months so it will be available as part of Zope 3.4 /
Zope 2.11.

Personally I'm not looking for a solution for Zope 2.9 or 2.10 as PTS
and PloneLanguageTool solve all these use-cases right now, but are hard
to extend, impossible to re-use and you know Zope2 ;)

If people think these are good ideas and want to help, this would be
much appreciated, for instance the mo-file compilation could be done as
an add-on first, so it is also available for Zope 2.9 and latter be
rolled into the core.

Comments and cheerleading are also welcome ;)


P.S. Can somebody point me to the Zope Foundation Contributer Agreement
or do I still have to sign the old one?
Zope3-dev mailing list

Reply via email to