kazupon / vue-i18n

:globe_with_meridians: Internationalization plugin for Vue.js

Home Page:https://kazupon.github.io/vue-i18n/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Capitalising plurals doesn't seem to work as expected

jaap opened this issue · comments

Reporting a bug?

When applying @.capitalize to a plural string it seems to fail

Expected behavior

When having:

{
      car: 'car | cars',
      Car: '@.capitalize:car',
}
When Outcome Expected Works
i18n.tc('plurals.Car', 1) Car Car
i18n.tc('plurals.Car', 2) cars Cars

Reproduction

I've added a test that hopefully proves my point: https://github.com/kazupon/vue-i18n/pull/1564/files

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 73.08 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - /opt/homebrew/bin/node
    npm: 8.15.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 105.0.5195.125
    Chrome Canary: 108.0.5341.0
    Safari: 16.0
  npmPackages:
    @vue/babel-preset-app: ^4.4.1 => 4.4.1 
    vue: ^2.5.17 => 2.6.11 
    vue-github-button: ^1.1.2 => 1.2.0 
    vue-template-compiler: ^2.5.17 => 2.6.11 
    vuepress: ^1.8.2 => 1.8.2

Screenshot

No response

Additional context

No response

Validations