Re: [Plone-developers] LinguaPlone: overlay and override

Hanno Schlichting <[email protected]> Sat, 25 Jun 2011 23:31:58 +0200
Newsgroups gmane.comp.web.zope.plone.internationalization
Message-ID <[email protected]>
(responding on the correct plone-i18n list)

On Sat, Jun 25, 2011 at 1:38 AM, ToutPT <[email protected]> wrote:
> I have used LinguaPlone on a Plone4 project for the first time. I don't know
> If doing things right so let me know if I'm wrong.
> I'm creating content in /languagecode folder and set each of languagecode
> folder be a INavigationRoot. Next I'm linking translations. That way I have
> a tree per language,
> so URL are great for each languages.

Yep. There's an underdocumented helper view to do this. You can call
http://plonesite/@@language-setup-folders after you configured the
languages you want in the control panel. It'll create the languages
folders, marks them as navigation roots and puts a language switcher
view into the real site root, so users get redirected to the correct
language folder.

> First; is there a way to let edit form be what it is and not become a
> translate form ? I mean once a page is linked to an other one in an other
> language the edit form becomes a translation form.

You are only linking pages that are really translations of each other,
right? The split screen view is meant to help the editors to only
translate the language dependent fields and easily compare the
original text and its translation.

The way the translation form is injected is pretty weird. Look at
I18NBaseObject at the getTypeInfo method and the TypeInfoWrapper class
in that module. If you want to change the behavior you can either
monkey patch one of the two or make sure you override the getTypeInfo
method in a common base class for all your content types.

> Last: Is someone is against replacing the popup of 'link translations' by
> the overlay of archetypes.referencebrowserwidget ?

Not at all. It basically uses a copy of some very old version of the
ATReferenceBrowserWidget but never got updated.

I'd love to see a branch for such a change.

Hanno

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1