Re: [Zope3-dev] Issue 301
Stephan Richter wrote: On Thursday 28 April 2005 03:59, Dmitry Vasiliev wrote: Ok, I fully agree with this changes, but then I have one more question. Should we do this changes on ZopeX3.0 branch? That about backward compatibility for 3.0, for example if someone use code like this: 'h1 i18n:name=H1foo/h1'? Okay, let's not backport this bug fix. Ugh... Seems like the test29.html was wrong. For following input data: div i18n:translate=At the tone the time will be span i18n:data=here/currentTime i18n:translate=timefmt i18n:name=time2:32 pm/span... beep!/div result was: divAT THE TONE THE TIME WILL BE 59 MINUTES AFTER 6 PM... BEEP!/div but the right result should was be (see zope.tal.driver.TestTranslations): divAT THE TONE THE TIME WILL BE 59 minutes after 6 PM... BEEP!/div Seems like the wrong result was produced by double translate() call. And for new (explicit) i18n:name behaviour result will be: divAT THE TONE THE TIME WILL BE span59 minutes after 6 PM/span... BEEP!/div -- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Issue 301
On Friday 29 April 2005 09:38, Dmitry Vasiliev wrote: Ugh... Seems like the test29.html was wrong. Yes, I agree with your assessment! Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Issue 301
Stephan Richter wrote: Should 'span i18n:name=foobar/span' pass 'spanbar/span' to the msgid mapping or just 'bar'? Wow, so this gets hairy and we need to get it right. Unfortunately, tests right now support both practices. So here are my observations: p i18n:translate= This house is em i18n:name=color i18n:translate=red/em. /p The case above should produce two message ids: This house is $color. red Note: The XML element containing i18n:name is *not* part of the second message id. Also, the em tag is not part of the outer message id. So here is the way to think about this. The I18n name, as seen from the outer translation is the entire em element. However, the em element itself only sends its content out as a message id. Further, there need to be some rules deciding when the em tag should be omitted. I agree with Marius and Godefroid that it should only be omitted when either tal:replace or tal:omit-tag is specified. It thus follows: - test_content_with_messageid_and_i18nname in test_talinterpreter.py is correct. - test36.html is incorrect. - Marius' submitted test is correct. Ok, I fully agree with this changes, but then I have one more question. Should we do this changes on ZopeX3.0 branch? That about backward compatibility for 3.0, for example if someone use code like this: 'h1 i18n:name=H1foo/h1'? -- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Issue 301
On Thursday 28 April 2005 03:59, Dmitry Vasiliev wrote: Ok, I fully agree with this changes, but then I have one more question. Should we do this changes on ZopeX3.0 branch? That about backward compatibility for 3.0, for example if someone use code like this: 'h1 i18n:name=H1foo/h1'? Okay, let's not backport this bug fix. Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Issue 301
I want to fix Issue 301 Bug with i18n:name and i18n:translate on the same element (http://www.zope.org/Collectors/Zope3-dev/301) but there are some open questions... Should 'span i18n:name=foobar/span' pass 'spanbar/span' to the msgid mapping or just 'bar'? In the latter case which additional attributes should preserve the tag in the msgid mapping? For example: 'span i18n:name=foo i18n:translate=bar/span' = 'bar' (translated) but 'a href=url i18n:name=foo i18n:translate=bar/a' = 'a href=urlbar/a' ('bar' translated) and so on -- Dmitry Vasiliev (dima at hlabs.spb.ru) http://hlabs.spb.ru ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com