-
-
Notifications
You must be signed in to change notification settings - Fork 860
'setLocaleMessage' / 'mergeLocaleMessage' doesn't work if 'warnHtmlInMessage' is set to 'error' #789
Comments
The reason is the following line of code for https://github.com/kazupon/vue-i18n/blob/v8.x/src/index.js#L606 and the following line for https://github.com/kazupon/vue-i18n/blob/v8.x/src/index.js#L614 |
Hey @vovkss |
Sure, I guess you can :) According to the docs, 'warnHtmlInMessage' applies to dynamically loaded messages:
|
…arnHtmlInMessage is set to error
…arnHtmlInMessage is set to error
…arnHtmlInMessage' is set to 'error' (#817) * build(deps): [security] bump handlebars from 4.1.1 to 4.5.3 (#757) Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.5.3. **This update includes a security fix.** - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) - [Commits](handlebars-lang/handlebars.js@v4.1.1...v4.5.3) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * 🐛 #789 setLocaleMessage & mergeLocaleMessage doesn't work if warnHtmlInMessage is set to error Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
vue & vue-i18n version
vue version: 2.6.11
vue-i18n version: 8.15.4
Reproduction Link
https://jsfiddle.net/vovkss/4p5y86rn/
Steps to reproduce
Set
warnHtmlInMessage: true
.Call
setLocaleMessage
ormergeLocaleMessage
to change messages for any locale.It doesn't matter whether messages were already set for the locale or not.
The new messages must NOT contain HTML.
What is Expected?
Messages are changed for the target locale.
What is actually happening?
setLocaleMessage
ormergeLocaleMessage
have no effect.The text was updated successfully, but these errors were encountered: