mirror of https://github.com/jumpserver/jumpserver
fix: 修复i8n 500
parent
891c478d13
commit
22f3caa954
|
@ -35,7 +35,10 @@ def i18n_trans(s):
|
||||||
tpl, args = s.split(' % ', 1)
|
tpl, args = s.split(' % ', 1)
|
||||||
args = args.split(', ')
|
args = args.split(', ')
|
||||||
args = [gettext(arg) for arg in args]
|
args = [gettext(arg) for arg in args]
|
||||||
return gettext(tpl) % tuple(args)
|
try:
|
||||||
|
return gettext(tpl) % tuple(args)
|
||||||
|
except TypeError:
|
||||||
|
return gettext(tpl)
|
||||||
|
|
||||||
|
|
||||||
def hello():
|
def hello():
|
||||||
|
|
Loading…
Reference in New Issue