We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_ctx.t is not a function
The following error occurs when t exported with useI18n is used as an alias:
t
useI18n
<script> import { useI18n } from 'vue-i18n' export default { setup() { const { t: translation } = useI18n({ locale: 'en', inheritLocale: false, messages: { en: { apple: 'no apples | one apple | {count} apples', banana: 'no bananas | {n} banana | {n} bananas', dessert: 'I eat @:{name}!' } } }) return { translation } }, } </script>
dd1273b
System: OS: macOS 13.6.6 CPU: (10) arm64 Apple M1 Max Memory: 156.13 MB / 64.00 GB Shell: 5.9 - /bin/zsh
n/a
not work for <script setup> , because, v-t does not transform for $setup.
<script setup>
v-t
$setup
you can see the SSR tab in vue playground https://play.vuejs.org/#eNq9U11r2zAU/SuaGDiB2F6aPYyQlH1QWPewjXWwF784zrWjVpaEPtKA8X/flRQnbgkdYzD7wda9R+ceHft09INS2d4BXdKVqTRTlhiwTl0XgrVKaks6oqEmPam1bEmC0GTUcgZu5+/EuJ0yLCCmEJUUxpLWNGTtOSbJZ+Bckl9S8+2rZDoAOmJx/3rgmnSFIH5xV0kFS5JwWZUcCXvcscqjSJSHCwut4qUFXBGy2s2vuy6M6/tVjqtYvfJVO0lqqdNABanxzMmURODVEbjwwNdHZMPlpuQDMuAWEceEcpbsU7suKA4rKMmxscpHYuiMRofStlTZvZEC7Q3HKo4NU9AlCRVfG1zzxYLurFVmmedOqIcmq2SbD/338zcZ3ukGbJnN8y0z9tTLtBOWtZCBadONlo8GNI4uqB/So3soyuJxRM2aZ5JwhGIc9DdlGX6RJ9JK/GKPX0LNagezoV7toHq4UL83h3iK7xpQwR4KeurZUjdgY/vm7isc8P3UbOXWcUS/0PwBRnLnNUbYRye2KHuEC2pvg8NMND/NzcGCMMOhvNDgRsAH2z+9cPSz3EX2duSi3/M0Ms/CMiNbqJkI5FKA8L/336cHDgGFVKXj4TmmjCkJUZ1MB81/DNwZdDF0/roQPF/24YtvGmdq4Ql0KQz+8WgcejuLyRt8+pesnnn/b2r730MJq/4=
SSR
The text was updated successfully, but these errors were encountered:
translationSignatures
No branches or pull requests
Describe the bug
The following error occurs when
t
exported withuseI18n
is used as an alias:Reproduction
dd1273b
System Info
Used Package Manager
n/a
Additional context
not work for
<script setup>
, because,v-t
does not transform for$setup
.you can see the
SSR
tab in vue playgroundhttps://play.vuejs.org/#eNq9U11r2zAU/SuaGDiB2F6aPYyQlH1QWPewjXWwF784zrWjVpaEPtKA8X/flRQnbgkdYzD7wda9R+ceHft09INS2d4BXdKVqTRTlhiwTl0XgrVKaks6oqEmPam1bEmC0GTUcgZu5+/EuJ0yLCCmEJUUxpLWNGTtOSbJZ+Bckl9S8+2rZDoAOmJx/3rgmnSFIH5xV0kFS5JwWZUcCXvcscqjSJSHCwut4qUFXBGy2s2vuy6M6/tVjqtYvfJVO0lqqdNABanxzMmURODVEbjwwNdHZMPlpuQDMuAWEceEcpbsU7suKA4rKMmxscpHYuiMRofStlTZvZEC7Q3HKo4NU9AlCRVfG1zzxYLurFVmmedOqIcmq2SbD/338zcZ3ukGbJnN8y0z9tTLtBOWtZCBadONlo8GNI4uqB/So3soyuJxRM2aZ5JwhGIc9DdlGX6RJ9JK/GKPX0LNagezoV7toHq4UL83h3iK7xpQwR4KeurZUjdgY/vm7isc8P3UbOXWcUS/0PwBRnLnNUbYRye2KHuEC2pvg8NMND/NzcGCMMOhvNDgRsAH2z+9cPSz3EX2duSi3/M0Ms/CMiNbqJkI5FKA8L/336cHDgGFVKXj4TmmjCkJUZ1MB81/DNwZdDF0/roQPF/24YtvGmdq4Ql0KQz+8WgcejuLyRt8+pesnnn/b2r730MJq/4=
Validations
The text was updated successfully, but these errors were encountered: