intlify / vue-i18n

Vue I18n for Vue 3

Home Page:https://vue-i18n.intlify.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syntaxError: 11

lmjgyy opened this issue · comments

commented

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 文件名称不能以.开头,且不能包含特殊字符\\/:*?"<>|
CleanShot 2023-09-01 at 14 38 08
CleanShot 2023-09-01 at 14 38 57

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

commented

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!