fix: 修复i8n 500

pull/9870/head
feng 2023-03-02 16:18:34 +08:00 committed by Jiangjie.Bai
parent 891c478d13
commit 22f3caa954
1 changed files with 4 additions and 1 deletions

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]
return gettext(tpl) % tuple(args)
try:
return gettext(tpl) % tuple(args)
except TypeError:
return gettext(tpl)
def hello():