chaged pickling rules for lazyT
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.6.0-development+timestamp.2013.08.29.08.21.46
|
||||
Version 2.6.0-development+timestamp.2013.08.29.18.56.54
|
||||
|
||||
@@ -423,6 +423,10 @@ class lazyT(object):
|
||||
return lazyT(self)
|
||||
return lazyT(self.m, symbols, self.T, self.f, self.t, self.M)
|
||||
|
||||
def pickle_lazyT(c):
|
||||
return str, (c.xml(),)
|
||||
|
||||
copy_reg.pickle(lazyT, pickle_lazyT)
|
||||
|
||||
class translator(object):
|
||||
"""
|
||||
@@ -926,18 +930,6 @@ def findT(path, language=DEFAULT_LANGUAGE):
|
||||
else sentences['!langcode!'])
|
||||
write_dict(lang_file, sentences)
|
||||
|
||||
### important to allow safe session.flash=T(....)
|
||||
|
||||
|
||||
def lazyT_unpickle(data):
|
||||
return marshal.loads(data)
|
||||
|
||||
|
||||
def lazyT_pickle(data):
|
||||
return lazyT_unpickle, (marshal.dumps(str(data)),)
|
||||
copy_reg.pickle(lazyT, lazyT_pickle, lazyT_unpickle)
|
||||
|
||||
|
||||
def update_all_languages(application_path):
|
||||
path = pjoin(application_path, 'languages/')
|
||||
for language in oslistdir(path):
|
||||
|
||||
Reference in New Issue
Block a user