From e956367cd6e8b96ad41f68b0454f61d5cbb23221 Mon Sep 17 00:00:00 2001 From: trisdoan Date: Fri, 13 Dec 2024 15:48:18 +0700 Subject: [PATCH 1/2] [IMP] add pylint checkers for translation --- src/.pylintrc-mandatory.jinja | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/.pylintrc-mandatory.jinja b/src/.pylintrc-mandatory.jinja index 408fd2b..1ceaed2 100644 --- a/src/.pylintrc-mandatory.jinja +++ b/src/.pylintrc-mandatory.jinja @@ -65,6 +65,15 @@ enable=anomalous-backslash-in-string, too-few-format-args, translation-field, translation-required, +{%- if odoo_version >= 14 %}, + translation-format-interpolation, + translation-format-truncated, + translation-fstring-interpolation, + translation-not-lazy, + translation-too-few-args, + translation-too-many-args, + translation-unsupported-format +{%- endif %} unreachable, use-vim-comment, wrong-tabs-instead-of-spaces, From 7da32f8ec84606b9d977812de54d3f1faff8e155 Mon Sep 17 00:00:00 2001 From: trisdoan Date: Wed, 15 Jan 2025 11:07:14 +0700 Subject: [PATCH 2/2] [IMP] add prefer-env-translation for odoo 18 --- src/.pylintrc.jinja | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/.pylintrc.jinja b/src/.pylintrc.jinja index 500e942..fdc66ba 100644 --- a/src/.pylintrc.jinja +++ b/src/.pylintrc.jinja @@ -24,6 +24,9 @@ no-utf8-coding-comment, odoo-addons-relative-import, old-api7-method-defined, +{%- if odoo_version >= 18 %} + prefer-env-translation, +{%- endif %} redefined-builtin, too-complex, unnecessary-utf8-coding-comment