You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating vue-i18n from version 9.13.1 to 9.14.0, the $t function, which is used for translation, no longer works correctly in a Vue 3.4.38 project. The following error is displayed
ERROR(vue-tsc) Property '$t' does not exist on type 'CreateComponentPublicInstance<Readonly<ExtractPropTypes<{ msg: { type: StringConstructor; default: string; }; }>>, unknown, unknown, {}, {}, ComponentOptionsMixin, ... 13 more ..., { ...; }>'.
Expected behavior
The $t function should work as expected, allowing for translations without any TypeScript errors or runtime issues, just as it does in vue-i18n version 9.13.1.
Reproduction
Install vue-i18n version 9.14.0 in a Vue 3.4.38 project.
Attempt to use the $t function in a component to access translations.
Observe the error mentioned above during compilation or runtime.
I also started getting this issue after updating to vue-i18n v9.14.0, but only in VS Code. The errors with $t are not present when running a type check with the CLI.
From #1919 (comment), I understand that the root cause would be coming from a (sub)dependency that is augmenting @vue/runtime-core instead of vue. In my case, I suppose that this is due to vuejs/language-tools doing that. But I don't see how I can fix this.
Reporting a bug?
When updating vue-i18n from version 9.13.1 to 9.14.0, the $t function, which is used for translation, no longer works correctly in a Vue 3.4.38 project. The following error is displayed
Expected behavior
The $t function should work as expected, allowing for translations without any TypeScript errors or runtime issues, just as it does in vue-i18n version 9.13.1.
Reproduction
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: