Closed waleedtariq109 closed 1 year ago
Thank you for your feedback.
I noticed that your code has some special characters on your resources.
"passwordDoesNotContainSpecialCharacters": "يجب أن تحتوي كلمة المرور على رمز مثل: (!,%&@#$^*?_().:;-).",
You need to use literal interpolation for special characters. https://vue-i18n.intlify.dev/guide/essentials/syntax.html#special-characters
@kazupon Thanks now it works
For posterity, I wanted to display a placeholder in an email field:
emailPlaceholder: 'eg: test@example.com'
However, it complained about the @
symbol.
I needed to put the entire string inside literal:
emailPlaceholder: "{'eg: test@example.com'}"
Are the quotes in the above example correct ? I still get the warning in the same translation ..
I'm trying this approach instead
https://vue-i18n.intlify.dev/guide/essentials/syntax#named-interpolation
for html, just use this method: "some-key": "{' your html translated text <a href=\"mailto:hello@mail.com\"> more text '}"
Environment
Operating System:
Ubuntu
Node Version:18.16.0
Npm Version:9.5.1
Nuxt Version:3.5.1
Reproduction
Link to reproduction
Describe the bug
When I run the npm run dev command, it throws an error message like
Invalid linked format|Unexpected lexical analysis in token
. After that, I navigate to my ar-SA.json locale file and remove all the JSON code, leaving only one key-value pair like this:and I save the locale file, then I paste the previous JSON code, save it, and reload the project. After that, everything is working fine.
Additional context
I have to remove all the JSON code from the locale file, then add only one property with a random name and value, and save the file. After that, I paste the previous code and save the file again. Everything works fine at that point. However, if I close the server and restart it, I encounter the same issue again. I have to follow the same steps in order to resolve this error.
Logs