humanize
humanize copied to clipboard
Suggestion: Translate "migliaia" to "mila" in Italian
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
"migliaia" was added in https://github.com/python-humanize/humanize/pull/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/").
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?
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}
Any more questions for this?