镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Filesize i18n not working for French #51

Description

@Benji81

What did you do?

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

What did you expect to happen?

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

What versions are you using?

  • OS: ubuntu
  • Python: 3.9.6
  • Humanize: 4.3.0

Activity

  1. carterbox commented on Aug 24, 2022

    @carterbox
    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

  2. changed the title [-]Filesize i18n not working for french[/-] [+]Filesize i18n not working for French[/+] on Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions