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

Filesize i18n not working for French #51

Open
Benji81 opened this issue Aug 24, 2022 · 1 comment
Open

Filesize i18n not working for French #51

Benji81 opened this issue Aug 24, 2022 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Benji81
Copy link

Benji81 commented Aug 24, 2022

What did you do?

import humanize
humanize.i18n.activate("fr")
humanize.naturalsize(42)  =>  '42 Bytes'
humanize.naturalsize(42_000) => '42.0 kB'
humanize.naturalsize(42_000_000) => '42.0 MB'

What did you expect to happen?

import humanize
humanize.i18n.activate("fr")
humanize.naturalsize(42)  =>  '42 octets'
humanize.naturalsize(42_000) => '42,0 Ko'
humanize.naturalsize(42_000_000) => '42,0 Mo'

What versions are you using?

  • OS: ubuntu
  • Python: 3.9.6
  • Humanize: 4.3.0
@carterbox
Copy link
Contributor

This is not implemented. Other functions have translated output, but natural size does not. You're welcome to contribute a translation for this function.

https://github.com/python-humanize/humanize/blob/main/src/humanize/locale/fr_FR/LC_MESSAGES/humanize.po
https://github.com/python-humanize/humanize/blob/c6927228bed2fe90477537f96fa4ffc2564b5791/src/humanize/filesize.py

@hugovk hugovk changed the title Filesize i18n not working for french Filesize i18n not working for French Aug 25, 2022
@hugovk hugovk added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants