babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
## Overview Description When using `babel.numbers.format_currency`, the negative currency is formatted with the negative sign before the currency name, like `'-$100.00'` and `-CHF 100.00`. See [this Stack Overflow question](https://stackoverflow.com/q/74894618/13376511) for...
This PR changes `babel.numbers.parse_pattern` to move the negative sign to the end of the prefix if the format string includes a placeholder for a currency name. It updates some tests.
Add option `parse_template_string` that improves parsing of javascript templates expressions, like: `${gettext('my text')}` And it also works with nested expressions like: ${`some text ${gettext('my text')} more text`} You have to...
There are situations where you need for format a (timezone aware) time against a particular given date. For example, if you have an international flight that has different departure and...
Often one wants to generate a list of things with ordinals in front of them. E.g. "1st place: Foo, 2nd place: Bar" or "1st choice: Hello, 2nd choice: World". The...
## Overview Description Contexts are widely used nowadays to differentiate genders in messages. For instance: ``` pgettext(gender, "{user_name} followed you").format(user_name) ``` `pybabel extract` ignores extraction of context when it is...
## Overview Description For the `update` command there is a `--check` mode which is really nice to use in CI to verify that the translations are up to date. I'd...
This is a problem affecting the extraction of string from python files. While format strings like `"Hello %(name)s"` are correctly extracted and marked with the `#, python-format` marker, strings like...
Hello! How can i pass the separator for update and compile commands in cli-mode? By default language and territory separated by "_", but i need the "-" symbol.