Re: side-by-side translation view in a working copy?
Hanno Schlichting <[email protected]> Fri, 6 May 2011 11:16:43 +0200
| Newsgroups | gmane.comp.web.zope.plone.internationalization |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 5, 2011 at 8:46 PM, Daniel Holth <[email protected]> wrote: > Hi. I'm trying to use plone.app.iterate with LinguaPlone in Plone 3 and soon > Plone 4. I would like my users to see the side-by-side translation view > while editing a working copy. > > How do I add this feature to LinguaPlone? I'm reading through the source > code but am having trouble figuring out how Plone chooses the side-by-side > view. It's patched in a particular weird way. In I18NBaseObject getTypeInfo is overridden. If the object is not the canonical, a TypeInfoWrapper wrapping the FTI is returned. That one checks if you want to look up either "atct_edit" or "base_edit" and returns "translate_item" instead. I think none of that logic or even the translate_item.cpt is useful to reuse here. I'd just write a new template for the side-by-side view you want and render the edit widgets for the fields you are interested in for both the objects. Then for your project either add a new action (like view or edit) to access this new template as a new tab. Or overwrite the url expression of the edit action on all content types to look up the template you want based on whatever criteria it is you need here. Hanno ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd