Tomas R.
Tomas R.
Just an FYI, I rebased this on the latest CPython main
Not saying this is not worth fixing, but out of curiosity, do nested gettext calls actually come up often? I don't think I've ever come across one..
I'm not a big fan of the token-based extractor getting even more complex. I'm thinking we might be able to replace the python extractor with a `NodeVisitor` which would simplify...
So I did some investigation and an AST-based extractor cuts down the complexity quite a bit. However, it's about twice as slow compared to the current extractor. @akx Given the...
friendly ping @akx :)
(since you said you missed the other ping.. :laughing: ) @akx any opinions on this? FTR, I recently made the switch in CPython as well: https://github.com/python/cpython/blob/main/Tools/i18n/pygettext.py#L421
Hi! Go for it :) We'll first need to understand if this is actually a bug though. Have a look at https://github.com/python-babel/babel/blob/master/CONTRIBUTING.md to help you get started.
Thanks for the investigation! Just for reference, GNU's gettext sets the line number to 2: ```sh > xgettext hello.py > cat messages.po ... #: line.py:2 msgid "hello" msgstr "" ```...
> I imagine it'll require pairing each message with its lineno, which would change the current API and break the custom extract methods. How would this break custom extractors?
> Otherwise leave out yellow (and maybe even green): Yeah, even just red would be enough. Normally, you only look at the output (at least in my case) when the...