Skip to content
New issue

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

CamelCase component name for <i18n-t>, <i18n-d> and <i18n-n> not work #1373

Closed
4 tasks done
erwanjugand opened this issue Apr 14, 2023 · 0 comments · Fixed by #1418
Closed
4 tasks done

CamelCase component name for <i18n-t>, <i18n-d> and <i18n-n> not work #1373

erwanjugand opened this issue Apr 14, 2023 · 0 comments · Fixed by #1418
Labels
🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Type: Bug Bug or Bug fixes

Comments

@erwanjugand
Copy link

Reporting a bug?

<i18n-t>, <i18n-d>, <i18n-n> don't work if written in CamelCase.

Expected behavior

I expect the components to work just as well in CamelCase and kebab-case as the types indicate.

vue-i18n.d.ts

  export interface GlobalComponents {
    ['i18n-t']: typeof Translation
    ['i18n-d']: typeof DatetimeFormat
    ['i18n-n']: typeof NumberFormat
    ['I18nT']: typeof Translation
    ['I18nD']: typeof DatetimeFormat
    ['I18nN']: typeof NumberFormat
  }

Reproduction

https://github.com/erwanjugand/vue-i18n-next-bug

yarn 
yarn dev

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF
    Memory: 22.77 GB / 31.27 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.14.2/bin/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
  npmPackages:
    @vitejs/plugin-vue: ^4.0.0 => 4.1.0
    @vue/eslint-config-prettier: ^7.1.0 => 7.1.0
    @vue/eslint-config-typescript: ^11.0.2 => 11.0.2
    @vue/tsconfig: ^0.1.3 => 0.1.3
    vite: ^4.1.4 => 4.2.1
    vue: ^3.2.47 => 3.2.47
    vue-i18n: 9 => 9.2.2
    vue-tsc: ^1.2.0 => 1.2.0

Screenshot

localhost_5173_

Additional context

No response

Validations

@erwanjugand erwanjugand added the Status: Review Needed Request for review comments label Apr 14, 2023
@kazupon kazupon added Type: Bug Bug or Bug fixes 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage and removed Status: Review Needed Request for review comments labels Jun 2, 2023 — with Volta.net
kazupon added a commit that referenced this issue Jun 2, 2023
kazupon added a commit that referenced this issue Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants