#237: Minor i18n upgrades
Include PloneLanguageTool 3.0 and PTS 1.5.
- Proposed by
- Hanno Schlichting
- Proposal type
- Architecture
- Assigned to release
- State
- completed
Motivation
Proposal
Overview
This review buildout consists of a vanilla Plone 3.2 with new versions of PloneLanguageTool (PLT) and PlacelessTranslationService (PTS) in src/.
Both packages have a CHANGES.txt file in the package root. In Plone 3.2 today PTS 1.4.13 is included, so everything in version 1.5a1 is new. For PLT the current baseline version in Plone 3.2 is 2.0. So all changes in version 2.1 and 3.0 are new functionality.
Details for PlacelessTranslationService (PTS)
The only change in PTS 1.5 is one added feature, which backports one enhancement from newer zope.i18n versions.
The feature allows multiple message catalogs in the same domain to extend each other in locales folders. So far there could only ever be one message catalog in a locales folder per domain.
As multiple files in the same domain could be spread across packages for i18n folders, this was seen as a major drawback of the locales folder approach.
Documentation impact for PTS
The only documentation in this area is a blog post from Maurits at:
http://maurits.vanrees.org/weblog/archive/2007/09/i18n-locales-and-plone-3.0
The paragraph Domain plone is now outdated.
Details for PloneLanguageTool (PLT)
PLT has seen a number of enhancements based on customer requirements over the last one and a half years since the 2.0 release. All of the new features are in active production use.
The changes are:
- A new content language-based negotiator
This negotiator determines the language used for the UI based on the language of the content item. This ensures that any page will only ever show one language.
In environments where content editors need to work with content in languages they do not understand, this is not desirable. In these cases a admin UI language that is well understood is more important than a synced language.
This negotiator does not work in all virtual hosting configurations. It only works if the Plone site object itself is exposed as a virtual base, but not if any folders inside it should act as virtual host bases.
The negotiator is disabled by default. - A new sub-domain negotiator
This negotiator determines the language based on a sub-domain. This allows for example all traffic for no.plone.org to show in Norwegian.
The negotiator is disabled by default. - Option to restrict cookie negotiation to authenticated users
This option makes it possible to disallow anonymous users to switch their language via the language switcher but always get a negotiation result based on other negotiators.
It also avoids setting any cookie at all, which makes it possible to optimize caching in certain situations. For example in conjunction with the sub-domain negotiator, all traffic going to no.plone.org can be asserted to be in Norwegian for anonymous users. - Changed default for displaying flags
So far the language switcher would default to be showing country flags for choosing languages. This approach works only in a minority of intended site audiences, as languages and countries have no clear mapping. In some situations the choice of a country flag for a language can be politically questionable. For example Belgium users will usually not like to choose between the flags for France and the Netherlands to determine their own language.
The value for already existing sites is not changed, as there is no automatic way to determine the applicability of using flags in an automated fashion. - Changed ITranslatable location
The ITranslatable interface has been part of CMFPlone in the beginning and duplicated in LinguaPlone. In later versions of LinguaPlone the version in LinguaPlone became the canonical location. We now import the interface from LinguaPlone instead of CMFPlone and deprecate the only LinguaPlone-specific API from this package.
Documentation impact for PLT
There is no known documentation for the language tool that could be affected. A default Plone 3 site only supports a single site language and does not offer any configuration in the Plone control panels.Implementation
Everything needed is already implemented.
Deliverables
A release of both PLT 3.0 and PTS 1.5.
Risks
No known risks.
Progress log
Everything is implemented and merged.
Participants
Hanno Schlichting

