Closed wopian closed 7 months ago
Hi, what about importing the component like this:
import {I18nT, useI18n} from 'vue-i18n';
This would allow you to use the pascal case name, plus you get intellisense/autocomplete,
I started this discussion here
Hi, what about importing the component like this:
import {I18nT, useI18n} from 'vue-i18n';
This would allow you to use the pascal case name, plus you get intellisense/autocomplete,
I started this discussion here
Component registration can be global, it'd be better to have multiple Translation
component names at
https://github.com/intlify/vue-i18n-next/blob/master/packages/vue-i18n-core/src/components/Translation.ts#L83
Thank you for adding support for this! Fixed by https://github.com/intlify/vue-i18n-next/pull/1313
Clear and concise description of the problem
Currently vue-i18n@next only exposes components as kebab-case, which is in direct conflict with our ESLint rules which forbid kebab-case component names.
PascalCase cannot be used if components are defined as kebab-case, so we're currently having to ignore this rule for i18n's component names.
Related to https://github.com/kazupon/vue-i18n/issues/1196 in the Vue 2 repo
Suggested solution
Define components as PascalCase. This allows consumers to use either PascalCase or kebab-case in their templates as PascalCase supports both usages and would not be a breaking change - see https://v3.vuejs.org/guide/component-registration.html#name-casing for details
Alternative
No response
Additional context
Validations