﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
145,"`TypeError` with non string object, `LazyProxy`",Shun-ichi Goto <shunichi.goto@…>,cmlenz,"While playing trac 0.11 i18n branch, I met following error in some situations.
{{{
 TypeError: coercing to Unicode: need string or buffer, LazyProxy found
}}}
This is occured in [source:/trunk/genshi/filters/i18n.py@753#L192 i18n.py:192].
It seems that the problem is passing `LazyProxy` object and function
expects it is string.
So I patch for workaround, but I don't know the right way.
{{{
#!patch
Index: i18n.py
===================================================================
--- i18n.py	(revision 753)
+++ i18n.py	(working copy)
@@ -187,7 +187,7 @@
 
             elif search_text and kind is TEXT:
                 if not msgbuf:
-                    text = data.strip()
+                    text = unicode(data).strip()
                     if text:
                         data = data.replace(text, translate(text))
                     yield kind, data, pos
}}}
",defect,closed,major,0.5.1,Internationalization,devel,fixed,,
