fixed a problem with translation in validators, thanks niphlod

This commit is contained in:
Massimo Di Pierro
2012-01-12 14:04:37 -06:00
parent c9f5ab0032
commit 98b2eed268
2 changed files with 4 additions and 2 deletions

View File

@@ -1 +1 @@
Version 1.99.4 (2012-01-12 14:01:39) stable
Version 1.99.4 (2012-01-12 14:04:26) stable

View File

@@ -56,7 +56,9 @@ __all__ = [
]
def translate(text):
if isinstance(text,(str,unicode)):
if text is None:
return None
elif isinstance(text,(str,unicode)):
from globals import current
if hasattr(current,'T'):
return str(current.T(text))