Disable warnings for fallback to root locale
See original GitHub issuevue & vue-i18n version
2.2.6, 6.0.0
Steps to reproduce
Use the example for component locales
What is Expected?
No warning in developer console
What is actually happening?
[vue-i18n] Value of key 'message.greeting' is not a string!
[vue-i18n] Fall back to translate the keypath 'message.greeting' with root locale.
My use case for component locales is as follows:
- Commonly used words are global locales (firstname, lastname, …)
- Each page in my SPA ships with its own component locales (benefits from code splitting: only load locales for the current page)
- The page component uses both global and component locales
Right now I get warnings whenever I use a global locale. They go away when compiling for production, but it is still annoying as it interrupts the development process. Can you please provide a way to disable these warnings?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:32
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Fallback localization | Vue I18n
To suppress the automatic fallback, add the postfix exclamation mark ! , for example de-DE! # Explicit fallback with one locale. Sometimes some ......
Read more >Fallbacking - Vue I18n - Intlify
If a locale is given containing a territory and an optional dialect, the implicit fallback is activated automatically.
Read more >Avoid I18n Fallback to default locale - ruby on rails
My default locale is set to :at (Austria). Which I require for Route Translation. Rails server won't start without it and to be...
Read more >[root tip] [How To] Troubleshooting locale errors - Tutorials
As root edit the file /etc/locale.gen; Enable the needed locales - including en_US.UTF-8 UTF-8 as fallback. Rebuild the locale database ...
Read more >Locale settings are not right. How can I reset them? - Ask Ubuntu
Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. The locale command produces error messages locale: Cannot set LC_CTYPE...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case of someone need it
In my opinion, if
fallbackRoot
isfalse
and value of key was not found, it’s should warning, and is returned the key, as documented.If
fallbackRoot
istrue
, the warning should only be triggered if the key value is not found, neither in the current locale, nor in root locale.