Commits

mitsuhiko  committed 023c458

We will have a 2.5.1 release

  • Participants
  • Parent commits dc4e58d

Comments (0)

Files changed (3)

 Jinja2 Changelog
 ================
 
-Version 2.6
------------
-(codename to be selected, release date to be announced)
+Version 2.5.1
+-------------
+(bugfix release, release date to be announced)
 
 - StopIteration exceptions raised by functions called from templates
   are now intercepted and converted to undefineds.  This solves a

File jinja2/_speedups.c

 	return Py_None;
 }
 
-
 static PyMethodDef module_methods[] = {
 	{"escape", (PyCFunction)escape, METH_O,
 	 "escape(s) -> markup\n\n"

File jinja2/testsuite/ext.py

     'stringformat.html': '{{ _("User: %(num)s", num=user_count) }}',
     'ngettext.html': '{{ ngettext("%(num)s apple", "%(num)s apples", apples) }}',
     'ngettext_long.html': '{% trans num=apples %}{{ num }} apple{% pluralize %}'
-                          '{{ num }} apples{% endtrans %}'
+                          '{{ num }} apples{% endtrans %}',
+    'transvars1.html': '{% trans %}User: {{ num }}{% endtrans %}',
+    'transvars2.html': '{% trans num=count %}User: {{ num }}{% endtrans %}'
 }
 
 
         assert re.search(r"l_ngettext, u?'\%\(num\)s apple', u?'\%\(num\)s "
                          r"apples', 3", source) is not None
 
+    def test_trans_vars(self):
+        t1 = newstyle_i18n_env.get_template('transvars1.html')
+        t2 = newstyle_i18n_env.get_template('transvars2.html')
+        assert t1.render(num=1, LANGUAGE='de') == 'Benutzer: 1'
+        assert t2.render(count=23, LANGUAGE='de') == 'Benutzer: 23'
+
 
 class AutoEscapeTestCase(JinjaTestCase):