Fixed little bug in sessions for i18n
This commit is contained in:
parent
b2932516ba
commit
863a592210
2 changed files with 10 additions and 3 deletions
|
|
@ -3,6 +3,8 @@
|
|||
from importlib import import_module
|
||||
from paramecio.citoplasma.sessions import get_session
|
||||
|
||||
yes_session=False
|
||||
|
||||
i18n_module={}
|
||||
|
||||
def load_lang(*args):
|
||||
|
|
@ -34,12 +36,17 @@ class I18n:
|
|||
@staticmethod
|
||||
def lang(module, symbol, text_default):
|
||||
|
||||
lang=I18n.default_lang
|
||||
|
||||
s=get_session()
|
||||
|
||||
if s!=None:
|
||||
|
||||
s['lang']=s.get('lang', I18n.default_lang)
|
||||
|
||||
lang=s['lang']
|
||||
|
||||
|
||||
I18n.l[lang]=I18n.l.get(lang, {})
|
||||
|
||||
I18n.l[lang][module]=I18n.l[lang].get(module, {})
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ def home(module='', submodule=''):
|
|||
if type(mod[1]).__name__!='list':
|
||||
menu[mod[2]]=mod
|
||||
else:
|
||||
print(mod)
|
||||
|
||||
menu[mod[2]]=mod[0]
|
||||
|
||||
for submod in mod[1]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue