Stephan Richter wrote:
Should '<span i18n:name="foo">bar</span>' pass '<span>bar</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>.

The case above should produce two message ids:

"This house is $color."

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 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="H1">foo</h1>'?

Dmitry Vasiliev (dima at
Zope3-dev mailing list

Reply via email to