diff --git a/VERSION b/VERSION index d64ca6b5..04b89b80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.7 (2012-03-12 21:59:21) dev +Version 1.99.7 (2012-03-12 22:34:49) dev diff --git a/gluon/validators.py b/gluon/validators.py index 206721a3..39f845d2 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -55,11 +55,16 @@ __all__ = [ 'IS_URL', ] +try: + from globals import current + have_current = True +except ImportError: + have_current = False + def translate(text): if text is None: return None - elif isinstance(text,(str,unicode)): - from globals import current + elif isinstance(text,(str,unicode)) and have_current: if hasattr(current,'T'): return str(current.T(text)) return str(text)