Re: [Zip] i18n:attributes in 2.7
Godefroid Chapelle <[email protected]>
| Newsgroups | gmane.comp.web.zope.coders,gmane.comp.web.zope.internationalization |
|---|---|
| Message-ID | <[email protected]> |
At 14:17 25/07/2003, Jim Fulton wrote: >Godefroid Chapelle wrote: >>Hi all, >>I am currently working on Silva i18n. This led me to take a look at the >>code for i18n:attributes. >>I'll try to explain the current situation : >>I) in Zope 2.6.1, >>I.1) space separated attributes as in >><span value="value" title="title" accesskey="acc" >>i18n:attributes="value title accesskey" /> >>are accepted and the three attributes are translated. >>This should not work according to the ZPT i18n doc/spec at >>http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZPTInternationalizationSupport >> >>I.2) semicolon separated attributes (Zope 3 current syntax) as in >><span value="value" title="title" accesskey="acc" i18n:attributes="value; >>title; accesskey" /> >>are accepted. >>accesskey attribute is translated, >>value and title are kept as they are (not translated) >>and value; and title; attributes are added (HUM ;-) >>IOW it doesn't work as it should according to the ZPT i18n doc/spec. > >Note that the spec changed. > >>I.3) attributes with associated message ids as in >><span value="value" title="title" accesskey="acc" i18n:attributes="value >>msgvalue; title msgtitle; accesskey msgaccesskey" /> >>do not work. > >>II) in Zope 2.7.b1, and Zope3 >>II.1) space separated attributes as in >><span value="value" title="title" accesskey="acc" i18n:attributes="value >>title accesskey" /> >>generate a compile time error >>IOW break the backwards compatibility. > >Right. > >>II.2) semicolon separated attributes (Zope 3 current syntax) as in >><span value="value" title="title" accesskey="acc" i18n:attributes="value; >>title; accesskey" /> >>are accepted and translated correctly. >>II.3) attributes with associated message ids as in >><span value="value" title="title" accesskey="acc" i18n:attributes="value >>msgvalue; title msgtitle; accesskey msgaccesskey" /> >>are accepted and translated correctly according to message ids. >>To summarize, as message ids translation for attributes was added, 2.7 >>and 3 are working according to the doc/spec, >>but 2.7 breaks backward compatibility to 2.6.1. >>This leads to the following question : do we (1) accept this rupture in >>i18n:attributes management or do we (2) want 2.7 to cover space separated >>attributes ? >>IOW, could people that need backward compatibility stand up ? > >At the time we decided to change the spec, we looked through the plone >templates and found no case where multiple attributes in the same element >were translated. So we judged that there was not a backward compatability >issue. > >Do you know of any existing templates that translate multiple attributes in >the same element? Yes, if you grep the current Plone HEAD, you'll find some... (5 ;-) IMHO not enough to make it a problem... except if other people on other projects use it... So I'll insist : could people that need backward compatibility stand up ? >Jim > >-- >Jim Fulton mailto:[email protected] Python Powered! >CTO (703) 361-1714 http://www.python.org >Zope Corporation http://www.zope.com http://www.zope.org > -- Godefroid Chapelle BubbleNet sprl rue Victor Horta, 18 / 202 1348 Louvain-la-Neuve Belgium Tel + 32 (10) 459901 TVA 467 093 008 RC Niv 49849