Disable no translation warning
See original GitHub issuevue-i18n logs the following as a warning whenever a translation is not found:
[vue-i18n] Cannot translate the value of keypath "Mobile". Use the value of keypath as default
This can be convenient for debugging, but I have certain cases that it is legitimate to not find a translation and I would not like a warning to be logged. In my product we have created components that use the translation internally, and expect a message code to normally be passed in. A good example of this is the Select component we have created. It uses the $t
function to translate all of the options. In some uses of the Select component, the options are not message codes because they have been created by the user. It is not desirable to spam the console with a bunch of warnings.
I believe a reasonable approach would be to have a configuration option to disable the warning, or to not log the warning if a missingHandler
is registered in the config.
Vue.config.disableNoTranslationWarning = true;
Issue Analytics
- State:
- Created 7 years ago
- Reactions:13
- Comments:10 (2 by maintainers)
Top GitHub Comments
In case of someone need it:
I suppose you are using
v.9.x
, you should pass to config following options :missingWarn: false, fallbackWarn: false,