vue-i18n icon indicating copy to clipboard operation
vue-i18n copied to clipboard

resolve global CustomBlock with $t

Open kazupon opened this issue 10 months ago • 0 comments

Clear and concise description of the problem

ref: https://github.com/nuxt-modules/i18n/issues/2472

Reproduction

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-dgbghr?file=pages%2Findex.vue

Describe the bug

global <i18n> custom blocks seem to be ignored or excluded somehow when used with $t

Additional context

Maybe helps for debugging: by adding the following line to script setup the problem is gone

useI18n({ useScope: 'global' });

I suspect this that the custom block is only parsed when useI18n is called

Suggested solution

work-around

in global customblock

useI18n({ useScope: 'global' })

Alternative

No response

Additional context

No response

Validations

kazupon avatar Oct 05 '23 02:10 kazupon