python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 433 forks source link

Feature request: implement `pybabel lint` #1011

Open jeanas opened 1 year ago

jeanas commented 1 year ago

A common error that translators do is translating the format field names, while they should remain untranslated. For example: translating "File {file} not found" by "Fichier {fichier} non trouvé" instead of "Fichier {file} non trouvé".

There is a script in this repository that checks for such errors: https://github.com/himdel/lint-po. However, it does its own PO file parsing that looks a bit fishy. I'd rather have this functionality in babel, with a well-tested PO parser.

Quix0r commented 11 months ago

That would be much appreciated.

akx commented 9 months ago

Sounds like a great idea :)