chaged pickling rules for lazyT
This commit is contained in:
@@ -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
|
||||||
|
|||||||
+4
-12
@@ -423,6 +423,10 @@ class lazyT(object):
|
|||||||
return lazyT(self)
|
return lazyT(self)
|
||||||
return lazyT(self.m, symbols, self.T, self.f, self.t, self.M)
|
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):
|
class translator(object):
|
||||||
"""
|
"""
|
||||||
@@ -926,18 +930,6 @@ def findT(path, language=DEFAULT_LANGUAGE):
|
|||||||
else sentences['!langcode!'])
|
else sentences['!langcode!'])
|
||||||
write_dict(lang_file, sentences)
|
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):
|
def update_all_languages(application_path):
|
||||||
path = pjoin(application_path, 'languages/')
|
path = pjoin(application_path, 'languages/')
|
||||||
for language in oslistdir(path):
|
for language in oslistdir(path):
|
||||||
|
|||||||
Reference in New Issue
Block a user