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

Suggestion: Translate "migliaia" to "mila" in Italian #138

Open
guanciottaman opened this issue Aug 4, 2023 · 3 comments
Open

Suggestion: Translate "migliaia" to "mila" in Italian #138

guanciottaman opened this issue Aug 4, 2023 · 3 comments

Comments

@guanciottaman
Copy link

In Italian, to say 10 thousand, we say "10mila" (diecimila).
It would be great to have that translation. Also, is there a way to have your humanize.po in your project folder and use that file for translations?

What versions are you using?

  • OS: Windows 11
  • Python: 3.11.4
  • Humanize: 4.7.0
@hugovk
Copy link
Member

hugovk commented Aug 4, 2023

"migliaia" was added in #97 by @aborruso, would you like to agree together what it should be and create a new PR if needed?

Also, is there a way to have your humanize.po in your project folder and use that file for translations?

Yes, see the instructions at https://github.com/python-humanize/humanize#localization to do something like humanize.i18n.activate("pt_BR", path="path/to/my/own/translation/").

@guanciottaman
Copy link
Author

guanciottaman commented Aug 4, 2023

Yes, see the instructions at https://github.com/python-humanize/humanize#localization to do something like humanize.i18n.activate("pt_BR", path="path/to/my/own/translation/").

The only thing that isn't clear to me is: how do I define a new translation, in which file extension/format?

@hugovk
Copy link
Member

hugovk commented Aug 5, 2023

We start with .po files (in https://github.com/python-humanize/humanize/tree/main/src/humanize/locale) and then during release run scripts/generate-translation-binaries.sh, which essentially runs this command to compile binary .mo files:

msgfmt --check -o path/to/humanize{.mo,.po}

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

2 participants