Closed Doogiemuc closed 2 years ago
I've just fixed with vue-i18n@v9.2.0-beta.26 https://github.com/intlify/vue-i18n-next/releases/tag/v9.2.0-beta.26
Please check it!
Works perfectly. Thank you very much for the quick fix!
For people using the composition API, it's warnHtmlMessage
vs the warnHtmlInMessage
in the regular options (no In
)! 📌
So change
warnHtmlInMessage: 'off'
into
warnHtmlMessage: false
IMHO the existence of two distinct options, with distinct types, is misleading. Unification would be relevant.
This just tripped me up for a good 20 minutes. What is the purpose of having both warnHtmlMessage
and warnInHtmlMessage
? The latter did not work when set to off
, but setting the former to false
did. Version 9.10.2.
Reporting a bug?
I need to have HTML in my localized i18n messages. It is working fine. But vue-i18n-next ouputs warnings in the browser console. At first I thought this is an eslint issue. But it's vue-i18n-next related.
Here is my repo. It's a large mobile application (PWA, web based): https://github.com/Doogiemuc/liquido-mobile-pwa-vue3
My problem is actually simple: The project is running fine. But I see a lot of warnings in the browser console like this:
This warning is coming from vue-i18n. I know what these warnings mean. (I know what an XSS-attack is.) My translations are fine. They are static. I want, and need to(!!!) use HTML in my vue-i18n translations.
=> I simply want to get rid of the warning.
Further references
This is how my vue-i18n translations look like:
This is the rule that I would like to disable globally in an
.eslintrc.js
config file https://eslint-plugin-vue-i18n.intlify.dev/rules/no-v-html.htmlI also added the configuration option. Also did not help. The warnings are still there in the browser console: https://vue-i18n.intlify.dev/guide/migration/breaking.html#change-warnhtmlinmessage-option-default-value
I also tried warnHtmlInMessages: false No luck. Still warnings.
Expected behavior
When setting the warnHtmlInMessage property to 'off' then there should be no warning in the browser console.
Reproduction
System Info
Screenshot
No response
Additional context
No response
Validations