syntaxError: 11
lmjgyy opened this issue · comments
Reporting a bug?
OS: windows
mode: electron production(development environment does not appear)
version: 9.2.2
description: The string with "|" is incorrectly translated as 11。the string is 文件名称不能以.开头,且不能包含特殊字符\\/:*?"<>|
Expected behavior
Correct translation
Reproduction
�can't provide
System Info
windows 32/Electron 21.4.4/ vue 3.2.37 / vue-i18n 9.2.2
Screenshot
No response
Additional context
No response
Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussions
Even using unicode characters for "|" results in an error
Thank you for your reporting!
|
is special character.
https://vue-i18n.intlify.dev/guide/essentials/syntax.html#special-characters
so, it's used by vue-i18n message format.
if you want to use it, you need to avoid with using literal interpolation.
https://vue-i18n.intlify.dev/guide/essentials/syntax.html#literal-interpolation
Thanks!