changeset 456:4b6dc4978691 trunk

Fix incorrect reference to translation function in the I18N filter.
author cmlenz
date Tue, 17 Apr 2007 12:36:57 +0000
parents 190ffd36b6bb
children 5f5b227b04be
files ChangeLog genshi/filters/i18n.py
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Version 0.4.1
+http://svn.edgewall.org/repos/genshi/tags/0.4.1/
+(?, from branches/stable/0.4.x)
+
+ * Fix incorrect reference to translation function in the I18N filter.
+
+
 Version 0.4
 http://svn.edgewall.org/repos/genshi/tags/0.4.0/
 (Apr 16 2007, from branches/stable/0.4.x)
--- a/genshi/filters/i18n.py
+++ b/genshi/filters/i18n.py
@@ -133,9 +133,11 @@
                 for name, value in attrs:
                     if name in include_attrs:
                         if isinstance(value, basestring):
-                            newval = ugettext(value)
+                            newval = self.translate(value)
                         else:
-                            newval = list(self(value, ctxt, search_text=name in include_attrs))
+                            newval = list(self(value, ctxt,
+                                search_text=name in include_attrs)
+                            )
                         if newval != value:
                             value = new_val
                             changed = True
Copyright (C) 2012-2017 Edgewall Software