我正在使用flask_babelex
模块来翻译我的项目中的字符串。下面给定的场景是英语到日语的翻译:
这是实际的字符串:
gettext(
'The font size to use for the SQL text boxes and editors. '
'The value specified is in "em" units, in which 1 is the '
'default relative font size. For example, to increase the '
'font size by 20 percent use a value of 1.2, or to reduce '
'by 20 percent, use a value of 0.8. Minimum 0.1, maximum 10.'
)
它失败于:
../venv/lib/python3.6/site-packages/flask_babelex/\__init__.py +534
出现以下错误:
File "/Users/admin/Documents/projects/venv/lib/python3.6/site-packages/flask_babelex/__init__.py", line 623, in gettext
return get_domain().gettext(*args, **kwargs)
File "/Users/admin/Documents/projects/venv/lib/python3.6/site-packages/flask_babelex/__init__.py", line 534, in gettext
return t.ugettext(string) % variables
ValueError: unsupported format character '?' (0x5927) at index 70
当我pyCharm
用来调试问题时,它会在调试窗口中显示。
我无法弄清楚这里有什么问题?