我正在使用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
调试问题时,它会在调试窗口中显示。
我无法弄清楚这里有什么问题?