diff genshi/filters/tests/i18n.py @ 596:f436c7db99f5

Follow-up to [708]. The added `extract_text` option wasn't actually being handled by the Babel extraction plugin.
author cmlenz
date Tue, 14 Aug 2007 08:55:43 +0000
parents 0fb43dc2e165
children 0d802a7e3630
line wrap: on
line diff
--- a/genshi/filters/tests/i18n.py
+++ b/genshi/filters/tests/i18n.py
@@ -279,6 +279,18 @@
                              []),
         ], results)
 
+    def test_extraction_without_text(self):
+        buf = StringIO("""<html xmlns:py="http://genshi.edgewall.org/">
+          <p title="Bar">Foo</p>
+          ${ngettext("Singular", "Plural", num)}
+        </html>""")
+        results = list(extract(buf, ['_', 'ngettext'], [], {
+            'extract_text': 'no'
+        }))
+        self.assertEqual([
+            (3, 'ngettext', (u'Singular', u'Plural', None), []),
+        ], results)
+
     def test_text_template_extraction(self):
         buf = StringIO("""${_("Dear %(name)s") % {'name': name}},
         
Copyright (C) 2012-2017 Edgewall Software