Replies: 1 comment
-
I am using a development-only patch to disable this warning if (isDevelopmentMode) {
const rawInstall = i18n.install;
i18n.install = (app, options) => {
rawInstall(app, options);
// eslint-disable-next-line no-console
console.log(
'patching i18nT to disable scope warning\nhttps://github.com/intlify/vue-i18n-next/discussions/962'
);
const rawI18nT = app.component('i18n-t');
if (!rawI18nT) {
throw new Error('missing i18n-t component');
}
const i18nT = defineComponent({
render() {
return h(
rawI18nT as any,
{ scope: 'global', ...useAttrs() },
useSlots()
);
},
});
// eslint-disable-next-line vue/component-definition-name-casing
app.component('i18n-t', i18nT);
};
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
please add config option to disable scope fallback warning
[intlify] Not found parent scope. use the global scope.
i know how to use scopes, but sometimes you are using 3rd party library that is also using i18n (vuetify 3 and similar) that will throw this warning and you cant override its code to use global scope instead
every developer wants in console only important messages / errors, this is unwanted spam in console
i think warning about missing locale is enought
i am asking only for option to disabe it so who wants, can use it
Beta Was this translation helpful? Give feedback.
All reactions