fix: 修复i8n 500

This commit is contained in:
feng
2023-03-02 16:18:34 +08:00
committed by Jiangjie.Bai
parent 891c478d13
commit 22f3caa954

View File

@@ -35,7 +35,10 @@ def i18n_trans(s):
tpl, args = s.split(' % ', 1)
args = args.split(', ')
args = [gettext(arg) for arg in args]
try:
return gettext(tpl) % tuple(args)
except TypeError:
return gettext(tpl)
def hello():