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

intword() decides plural or no plural after rounding the number #175

Open
Luflosi opened this issue Feb 26, 2024 · 0 comments
Open

intword() decides plural or no plural after rounding the number #175

Luflosi opened this issue Feb 26, 2024 · 0 comments

Comments

@Luflosi
Copy link
Contributor

Luflosi commented Feb 26, 2024

What did you do?

Execute

import humanize
_t = humanize.i18n.activate("de_DE")
humanize.intword(1000000)
# returns '1.0 Million'
humanize.intword(1000001)
# returns '1.0 Millionen'

What did you expect to happen?

I would expect humanize.intword(1000001) to at least return the same as humanize.intword(1000000).
Since I think the singular case only applies when the number is exactly 1.0, I think it would be better to return "Eine Million" in both cases.

What actually happened?

The function rounded the integer to 1.0 but chose plural/singular according to the number before it was rounded.

What versions are you using?

  • OS: Linux (NixOS)
  • Python: 3.11.8
  • Humanize: latest master 218a86e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant