I am using vue-i18n for localizing my forms. I have an email field that has a placeholder which contains an example email address that includes an @
symbol.
emailPlaceholder: 'eg: test@example.com'
Despite the quotes around the string, I got the following error
[plugin:unplugin-vue-i18n] Invalid linked format (error code: 10) in en.yaml
1 | eg: test@example.com
| ^
Why is vue-i18n giving me an error despite the string being in quotes?
The problem is that vue-i18n has a number of special characters that need to be escaped but YAML escaping methods like backslash will NOT work.
Instead, use literal interpretation. This means using {}
brackets to surround a string inside a string.
emailPlaceholder: "{'eg: test@example.com'}"
More about this can be found in this github issue.