babel
babel copied to clipboard
The official repository for Babel, the Python Internationalization Library
Thank you @blagasz for a great initial effort! I cleaned up things here and there (refactoring, performance issues, even some bugs). There's also a smoke test to try and verify...
Currently, the extraction code will do an `os.walk` to perform a deep file search. However, this file exploration could be very slow when there were directories that were deep and...
Based on the [exceptions](http://babel.pocoo.org/en/latest/api/numbers.html#exceptions) section of the docs, I'd expect `format_currency('aaaa', 'usd')` to raise a `NumberFormatError`, but it actually raises `decimal.InvalidOperation` if you pass it a nonsense string: ``` >>>...
We are using a setup of sphinx-intl to translate sphinx docs into Chinese, but after updating the PO files, we saw some lines in msgstr get reordered: https://github.com/greyli/flask-docs-zh/pull/35/files Here I...
There is a regex mistake: https://github.com/python-babel/babel/blob/7ebdf5a249ff8861bbcd3f7e4cc1ba9555c3fb65/babel/messages/jslexer.py#L25 Here is how it is applied: https://github.com/python-babel/babel/blob/7ebdf5a249ff8861bbcd3f7e4cc1ba9555c3fb65/babel/messages/jslexer.py#L41-L47 According to Python manual, `\w` matches `[a-zA-Z0-9_]`, so a number literal of some small positive integer, e.g.,...
The default text shows some default values (PROJECT, EMAIL@ADDRESS, PROJECT VERSION...) that I don't know how to change for my project. I read the [relevant part on Babel documentation](http://babel.pocoo.org/en/latest/api/messages/catalog.html#babel.messages.catalog.Catalog.header_comment) but...
We use Babel's `read_po()` function to load our webapp's translations, and we've realized that doing it this way means that source strings (a.k.a. message IDs) are stored multiple times in...
I'm having trouble getting certain strings to attach that are inside non-default-keyword member functions. My code has a level of encapsulation to it, where I sometimes store the `gettext` function...
Current behavior is for Extract to write msgid + empty msgstr to a .po file for user to fill in later with translation. I would like msgstr to optionally contain...
if Flask is set with Inline comments like this Flask.jinja_options = {'extensions': ['jinja2.ext.autoescape', 'jinja2.ext.with_'], 'line_comment_prefix': '##'} And, you have a file in the search path which has text to extract...