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

Incorrect handling of empty string in pluralization for n = 0 #1972

Closed
4 tasks done
anonymous-aka opened this issue Sep 25, 2024 · 0 comments · Fixed by #1985
Closed
4 tasks done

Incorrect handling of empty string in pluralization for n = 0 #1972

anonymous-aka opened this issue Sep 25, 2024 · 0 comments · Fixed by #1985
Labels
🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes

Comments

@anonymous-aka
Copy link

Reporting a bug?

In the latest update of vue-i18n (checked on v10.0.1), there seems to be an issue with pluralization when handling an empty string for the n = 0 case. The expected behavior is for the translation function to return an empty string when n is 0, but instead, it returns undefined.

Expected behavior

case n = 0 should return an <empty string> and not 'undefined'.

Reproduction

Please follow the link for the minimal reproduction:
https://stackblitz.com/edit/vitejs-vite-9tydzp?file=src%2FApp.vue

System Info

System:
    OS: macOS 13.6.7
    CPU: (8) arm64 Apple M2
    Memory: 124.00 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
Browsers:
    Chrome: 129.0.6668.59

Screenshot

No response

Additional context

No response

Validations

@anonymous-aka anonymous-aka added the Status: Review Needed Request for review comments label Sep 25, 2024
@kazupon kazupon added Type: Bug Bug or Bug fixes Status: PR Welcome Welcome to Pull Request 🔨 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 Oct 6, 2024
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 Status: PR Welcome Welcome to Pull Request Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants