question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange warning messages 'Value of key '<<message>>' is not a string!'

See original GitHub issue

Vue version: 2.4.2 vue-i18n version: 7.0.5

Hello,

I’m using both global messages const i18n = new VueI18n({ locale: getCurrentUserLanguage(), messages }); and local, component based messages:

i18n: {
    messages: {
      en: { msg: 'msg' },
      sk: { msg: 'msg' }
    }
  }

Everything works as expected. But when I access global messages in the component that does have local, component-based messages, I get following warning: image

I really don’t like having bloated console, just to inform me about using fallback to global-translation. And the warning message is kind of misleading.

Am I doing something wrong? If not, please consider removing this warning message for this particular use-case.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

31reactions
kazuponcommented, Aug 1, 2017
12reactions
roelvancommented, May 2, 2018

Yep I added this:

export default new VueI18n({
  locale: 'en',
  silentTranslationWarn: process.env.NODE_ENV === 'production'
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange error message: mismatched types rune and string
The error message indicates that the map is not a map[string]string, but a map[string]rune. · my declaration said nothing about a "rune". ·...
Read more >
Solving "Apparent Invocation of Macro Not Resolved" Problems
Code runs fine if submitted as open code, but when generated by a macro, the code doesn't work and issues strange error messages....
Read more >
Kafka Connect Deep Dive – Converters and Serialization ...
Each message is a key/value, but that is all that Kafka requires. Both key and value are just bytes when they are stored...
Read more >
Messages Functions | Vue I18n
The message function outputs the message of the return string value of the message function. NOTE. If you need to use the Translation...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
Two exception classes that are not related via subclassing are never ... while others are usually called only with a single string giving...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found