i18n Changes from CPSDefault 3.29.0

Revision: $Id$


These is some explanation about changes to handle i18n from CPSDefault 3.29.0


1   UI locale selector

This changes the ui locale like before, but also take effect on object by:

2   Object locale selector

For a folder under folder_view or for a document under view/edit, there is a locale selector at the right of the title like: [en] fr es.

Selecting an object locale doesn't affect UI locale selector, but only the locale for this object. This selection is sticky (using session). For example if you have an English document with a path: path_to_object choosing another locale for this object is done by accessing path_to_object/switchLanguage/fr, then further access to path_to_object will return the fr selected locale until you choose another locale.

Note that navigation trees don't take care of the object locale selector and keep using the UI locale selection, which is correct.

3   Object locale selection

To know which locale will be chosen by CPS, see i18n-changes-from-CPSCore-3_18_0.txt:

ProxyTool:getBestRevision(proxy, lang=None)

4   Translation page

The translation page displays the list of available languages for translation. It removes from the list already translated locales. Note that we have more object locales than UI locales.

The submission of this form creates a new revision of the document, which is a copy of the current document revision. The proxy adds a reference to this new revision and locale. This action also switches the locale of the proxy to the new one.

5   CPSDefault changes

portal_tree via getFolderInfo store all locales title and description the tree box just used the correct locale according to Localizer selected locale
display a list of available locale with switchLanguage link
if entry is a catalog brain then we build rpath using catalog entry so rpath may be like rpath/to/proxy/switchLanguage/xx

New CPSSchema/DocumentLanguageSelect Widget that display available locale if any with switchLanguage link. It is used on the common layout.

6   Compatibility

By hiding the action_translate, you should have exactly the same site and behavior as before without running any updater.

There should be no overload only benefits from getBestRevision refactoring.

7   Todo

[More info in CPSCore/doc/i18n-changes-from-CPSCore-3_18_0.txt]