Incorrect warnings around fallback
See original GitHub issuevue & vue-i18n version
- vue: 3.0.5
- vue-i18n: 9.0.0
What is Expected?
The docs have an example of using both local and global translations in a component. It notes that:
And also, as explained the here, note that, by default, falling back to global scope generates two warnings in the console:
[intlify] Not found 'message.greeting' key in 'ja' locale messages.
[intlify] Fall back to translate 'message.greeting' with root locale.
It also states that
To suppress these warnings (while keeping those which warn of the total absence of translation for the given key) set silentTranslationWarn: true, and silentFallbackWarn: true when initializing the createI18n.
What is actually happening?
Instead what I’m seeing is only one warning
[intlify] Not found 'message.greeting' key in 'ja' locale messages.
When I add only silentFallbackWarn: true
, there is no difference. And if I add silentTranslationWarn: true
(with and without silentFallbackWarn
), it silences all missing translation warnings, even those where it couldn’t find it in the global messages.
Are the docs out of date or is this a bug?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
just installed version
9.2.0-beta.12
withyarn add vue-i18n@next
, and issue is fixed withfallbackWarn: false
but now I have
[intlify] Not supported 'preserve'.
warningI’ve fixed at #374