babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
### Implementation of some features for msgcat and msgmerge to work with a compendium in PyBabel #### pybabel concat - Allows concatenating multiple .po files into one. - In case...
So, `pi` is the [ISO_639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the [Pāli](https://en.wikipedia.org/wiki/Pali) language, yet ```python >>> import babel >>> babel.__version__ '2.7.0' >>> babel.Locale.parse('pi_PI') Traceback (most recent call last): File "", line 1,...
(even if the text is further away) Fixes #1195.
This is related to #1202 – the deeply nested `os.path.join()` would have formatted quite poorly, so it felt like a good idea to unnest it – and then I noticed...
[PEP 750](https://peps.python.org/pep-0750/) has been accepted and it would be great to have support for this ready once Python 3.14 gets released! Writing translatable strings like this would be much more...
In my project I need to format currency so that it won't display digital decimals if they are equal to zero. Right now I'm doing it by replacing `.00` to...
Dear Babel Team, Babel is truly exceptional. I am in the process of creating a new benchmark for LLM evaluation that heavily relies on Babel. Benchmark will be publicly available...
> I did some digging and we get `Hawaii-Aleutian Standard Time` instead of `GMT-10` here because of this fallback to the long tz name: > https://github.com/python-babel/babel/blob/2b93a4a2b8fcc51e530c28a94b55485ad0c0a50e/babel/dates.py#L659-L662 > When I get...
The python format checker currently only validates `msgid` against the translation for languages with only one plural form. `msgid_plural` is not checked. For example, this: ```po msgid "foo" msgid_plural "foo...
(Happens on current master) Sample file: ```python _(b'foo') ``` now run `pybabel extract test.py -o messages.pot` and you'll get this error: ```python > pybabel extract test.py -o messages.pot extracting messages...