OCA / odoo-pre-commit-hooks

Linters of Odoo addons that complement pylint-odoo
GNU Affero General Public License v3.0
9 stars 11 forks source link

[REF] po-syntax-error: Use the line with syntax error #107

Closed moylop260 closed 1 week ago

moylop260 commented 1 week ago

Improve the po-syntax-error message output in order to set the line number correctly:

- test_repo/syntax_err_module/i18n/es.po:1: po-syntax-error Syntax error in po file (line 19)
+ test_repo/syntax_err_module/i18n/es.po:9: po-syntax-error Syntax error in po file

So, extract the number of line if exists in the message and remove that part of the message, if not using 1 the following line is: