validatos no longer depend on T

This commit is contained in:
mdipierro
2019-02-24 01:51:18 -08:00
parent afaf57f6da
commit b58b7da18f
13 changed files with 129 additions and 130 deletions
+3 -3
View File
@@ -457,7 +457,7 @@ def pickle_lazyT(c):
copyreg.pickle(lazyT, pickle_lazyT)
class translator(object):
class TranslatorFactory(object):
"""
This class is instantiated by gluon.compileapp.build_environment
as the T object
@@ -742,8 +742,8 @@ class translator(object):
try:
otherT = self.otherTs[index]
except KeyError:
otherT = self.otherTs[index] = translator(self.langpath,
self.http_accept_language)
otherT = self.otherTs[index] = TranslatorFactory(self.langpath,
self.http_accept_language)
if language:
otherT.force(language)
return otherT