babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
Run `uvx zizmor .github/workflows/` and heed its complaints: * Pin third-party actions * Adjust certain permissions
Number spelling based on the pure Python implementation of the CLDR RBNF engine. Currently only supports whole numbers (cardinal, ordinal, year) as fractional numbers are not well-defined and not universally...
Refs #850 (since builds will always be PEP517). I'm not sure if the build hook should automatically run `import_cldr`, since it's not completely free in terms of compute and bandwidth,...
Also implemented fallback from the correct pluralization to "other", which was also missing. Fixes #1217.
I think this is a bug, but it could be me doing something wrong. Assume that the file `app/data/PaymentMethods.py` contains: ```python from django.db import models from django.utils.translation import gettext_lazy as...
Hello, I prepared PR which allows extraction of translations from JS files that use gettext function with parameters. Usually code that uses parametrized translations looks like this: ```js gettext("Hello %(user)s",...
#1219 This PR fixes an issue where Babel would raise a valueError when encountering a blank or malformed field in .po file header. Please provide feedback if my approach is...
Refs #1218, should fix it. There's an `iana="..."` attribute in (at least recent) timezone XML files, but we historically never read that and instead just trusted the first alias to...
See the following MWE. [templates/test.html] ``` {% set a = "foo" %} {% set b = "bar" %} {% set d = [1, 2, 3] %} {% set mydict =...
This PR adds an option to `extract_from_dir` and `frontend` to follow symbolic links when traversing a directory. This was a missing feature. The rationale for it is in the issue...