﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
371,i18n:plural and i18n:singular don't work as element directives,cboos,cmlenz,"Not sure if this is already supposed to work, but it doesn't yet.

I think the following should be supported in the future:
{{{
#!diff
Index: genshi/filters/tests/i18n.py
===================================================================
--- genshi/filters/tests/i18n.py        (revision 1093)
+++ genshi/filters/tests/i18n.py        (working copy)
@@ -932,6 +932,31 @@
           <p>FooBar</p>
         </html>"""""", tmpl.generate(one=1, two=2).render())

+    def test_translate_i18n_choose_plural_singular_as_directive(self):
+        tmpl = MarkupTemplate(""""""<html xmlns:py=""http://genshi.edgewall.org/""
+            xmlns:i18n=""http://genshi.edgewall.org/i18n"">
+        <i18n:choose numeral=""two"">
+          <i18n:singular>FooBar</i18n:singular>
+          <i18n:plural>FooBars</i18n:plural>
+        </i18n:choose>
+        <i18n:choose numeral=""one"">
+          <i18n:singular>FooBar</i18n:singular>
+          <i18n:plural>FooBars</i18n:plural>
+        </i18n:choose>
+        </html>"""""")
+        translations = DummyTranslations({
+            ('FooBar', 0): 'FuBar',
+            ('FooBars', 1): 'FuBars',
+            'FooBar': 'FuBar',
+            'FooBars': 'FuBars',
+        })
+        translator = Translator(translations)
+        translator.setup(tmpl)
+        self.assertEqual(""""""<html>
+          FuBars
+          FuBar
+        </html>"""""", tmpl.generate(one=1, two=2).render())
+
     def test_translate_i18n_choose_as_attribute_with_params(self):
         tmpl = MarkupTemplate(""""""<html xmlns:py=""http://genshi.edgewall.org/""
             xmlns:i18n=""http://genshi.edgewall.org/i18n"">
}}}",defect,closed,minor,0.6,Internationalization,devel,fixed,,cboos
