babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
I did a search and replace for `u"` and `(?
I use the option `--init-missing` of `pybabel update` to avoid redundant `pybabel init` command. However, this option only creates the *.po file, and will fail if the target directory (`[locale]/LC_MESSAGES`)...
When reading an MO file, the message context is kept as bytes unlike the `msgid` and `msgstr` which are decoded to utf8. This is surprising because in order to use...
Per https://devguide.python.org/versions/, Python 3.8 is now EOL. Unless there is a specific reason to keep it around I think we should drop it. From what I've seen when 3.7 was...
This PR adds checks to the pofile parser code to validate that message strings are correctly delimited by double quotes. Keeping with the current design, an error is only raised...
This is my first pull-request ever, so don't hesitate to give me feedback on anything If my analysis is correct, get_week_number() made it impossible for iso-calendar to show their last...
Replaced the redundant init logic in `UpdateCatalog.run()` with a temporary `InitCatalog` instance to ensure the parent directory of the output file will be created. (close #1139)
The "C" locale is the only one that is guaranteed to be available on all systems, however Babel does not handle it correctly: ``` 13:12:25: File "/home/xxxx/venv/lib/python3.12/site-packages/babel/core.py", line 427, in...
At the moment, the localization methods dpgettext and dnpgettext are not properly handled by extract command. It raises KeyError exception. except if you pass explicitly `--keyword dpgettext:2c,3 --keyword dnpgettext:2c,3,4` This...
## Summary Hebrew locale (`'he'`) corrupts Babel's internal cache, causing subsequent `format_date()` calls with other locales to return Hebrew-formatted text instead of the requested locale. ## Environment - **Babel version**:...