On Wed, Jul 16, 2008 at 20:55, Stephan Richter
<[EMAIL PROTECTED]> wrote:
> Good question! The ZPT above is not correct; once we write a correct one, it
> becomes more obvious:
>
> <p i18n:translate="">There are <span tal:content="view/num" i18n:name="num"
> i18n:count="view/num>10</span> files.</p>

Ah, well, right. Of course all the examples you a %d substitution, but
I just realized that gettext in itself does no substituation at all,
so this is better. We should use the standard ${name} substitution for
this too. However, you can't have more than one number per message, so

<p i18n:translate="">There are <span tal:content="view/num"
i18n:name="num"  i18n:count="view/num>10</span> files and <span
tal:content="view/num" i18n:name="num"
i18n:count="view/dirs>10</span>directories.</p>

wouldn't make any sense. Which number should be used? So I actually
think i18n:count still should be on the main tag.

> Alternatively we could just evaluate the tal:content or tal:replace
> expression.

But then we wouldn't know if we have a plural substitution or not, and
we would have to start guessing...

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to