babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
Hey there. I'd like to use `pybabel extract` to extract my translatable strings in a `.pot` file, as it already does. However, I'd like to also include docstrings and comments...
See discussions: [astropy/astropy#11091](https://github.com/astropy/astropy/pull/11091) [pypa/pip#7413](https://github.com/pypa/pip/issues/7413) ```console [tkloczko@devel-g2v SRPMS]$ rpm -ql python-babel | grep py$ | xargs grep pkg_resources /usr/lib/python3.8/site-packages/babel/messages/checkers.py: from pkg_resources import working_set /usr/lib/python3.8/site-packages/babel/messages/checkers.py: # if pkg_resources is not available or...
More of a feature question/suggestion: would it be possible to generate and provide a list of [ISO 3166-2](https://www.iso.org/iso-3166-country-codes.html) country codes? Quick glance at `common/main/*.xml` ([cldr-common.zip](http://unicode.org/Public/cldr/41/)) would indicate that the 2-letter...
## Overview Description The documentation contains the description of the `pybabel` CLI at https://babel.pocoo.org/en/latest/cmdline.html. It's a reference that describes the command line options. As I'm not very familiar with the...
**This is an update of https://github.com/python-babel/babel/pull/1006 that incorporates upstream fixes to previously-broken tests. It should pass all CI checks now.** This PR: - Adds some basic tests for the `localtime`...
## Overview Description babel should be able to extract translatable strings when the {n,p}gettext call is inside an f-string. For example: ```python f'{gettext("Title")}:' ``` The nested `gettext("Title")` should be extracted....
In a JS library that I use, there was regex with a `/` inside a character class `[a-z]`. The babel JS lexer thought this closed the regex, but JavaScript allows...
## Overview Description A traceback happens due to a parsing error in babel parse_date() if the input is string. This is inconsistent with older versions of python 3.5 and older...
Could we get an option to skip adding/updating the POT-Creation-Date header when running pybabel extract? Use case is that we want a pre-commit hook that updates the translations, to ensure...
## Overview Description Importing `babel.localtime` crashes on Python 3.9 if `/etc/localtime` contains double-slashes. ## Steps to Reproduce ```none ls -lh /etc/localtime lrwxrwxrwx 1 root root 24 Mar 2 03:25 /etc/localtime...