On Fri, May 13, 2011 at 10:20 AM, Hanno Schlichting <[email protected]>wrote:

> This should rather go into plone.app.iterate, with the LinguaPlone
> dependency being optional (conditional imports).
>
> And you really don't want to add a new method on I18NBaseObject. This
> base class is going away soon and will be replaced by adapters. Just
> write your new template as a browser page and put the logic you need
> into a browser view class.
>
> Hanno
>

That was my first strategy. I would be happy to go this way but I do not
know how to render ATCT edit widgets in a Products.Five.browser.BrowserView
with a Products.Five.browser.pagetemplatefile.ViewPageTemplateFile. It
complains about missing variables. What do I have to add? I've been told
this is the path of pain since it seems there is quite a bit of setup in the
.cpt system that I would have to duplicate in a browser view. In any case
the 'save' button must traverse content_edit.

Once I got tired of trying to make that work, I found I could make my
side-by-side editor work by adding 8 lines of code to I18NBaseObject.py and
changing 3 lines of translate_item.pt.

Whatever I come up with, the exact same template will work for the edit view
I want and for LinguaPlone's existing edit view. I think this should just
replace LinguaPlone's edit view because plone.app.iterate comes standard
with Plone. Conceptually the patch just extends LinguaPlone's idea of
isCanonical() and getCanonicalVersion() to take working copies into account.

Thanks,

Daniel
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to