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 importlib import import_module
|
||||||
from paramecio.citoplasma.sessions import get_session
|
from paramecio.citoplasma.sessions import get_session
|
||||||
|
|
||||||
|
yes_session=False
|
||||||
|
|
||||||
i18n_module={}
|
i18n_module={}
|
||||||
|
|
||||||
def load_lang(*args):
|
def load_lang(*args):
|
||||||
|
|
@ -34,11 +36,16 @@ class I18n:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def lang(module, symbol, text_default):
|
def lang(module, symbol, text_default):
|
||||||
|
|
||||||
|
lang=I18n.default_lang
|
||||||
|
|
||||||
s=get_session()
|
s=get_session()
|
||||||
|
|
||||||
s['lang']=s.get('lang', I18n.default_lang)
|
if s!=None:
|
||||||
|
|
||||||
lang=s['lang']
|
s['lang']=s.get('lang', I18n.default_lang)
|
||||||
|
|
||||||
|
lang=s['lang']
|
||||||
|
|
||||||
|
|
||||||
I18n.l[lang]=I18n.l.get(lang, {})
|
I18n.l[lang]=I18n.l.get(lang, {})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ def home(module='', submodule=''):
|
||||||
if type(mod[1]).__name__!='list':
|
if type(mod[1]).__name__!='list':
|
||||||
menu[mod[2]]=mod
|
menu[mod[2]]=mod
|
||||||
else:
|
else:
|
||||||
print(mod)
|
|
||||||
menu[mod[2]]=mod[0]
|
menu[mod[2]]=mod[0]
|
||||||
|
|
||||||
for submod in mod[1]:
|
for submod in mod[1]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue