From 964d97358cabb585650a85a5ca74d28c643115aa Mon Sep 17 00:00:00 2001 From: "Chong Wang (cwg)" Date: Tue, 11 Jul 2023 11:19:24 +0200 Subject: [PATCH] [FIX] web: fix web translations the comment 'openerp-web' has been deprecated since odoo/odoo#105589, and there is only JAVASCRIPT_TRANSLATION_COMMENT in the most po files of the source code repository closes odoo/odoo#135277 X-original-commit: 4f84ea2be89f255846364c00a230463dce6ac773 Signed-off-by: Raphael Collet Signed-off-by: Chong Wang (cwg) --- addons/web/controllers/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/controllers/utils.py b/addons/web/controllers/utils.py index 18d6f5e0d90..f14141d16dd 100644 --- a/addons/web/controllers/utils.py +++ b/addons/web/controllers/utils.py @@ -16,8 +16,7 @@ import werkzeug.wsgi from lxml import etree from werkzeug.urls import iri_to_uri -from odoo.tools import apply_inheritance_specs -from odoo.tools.translate import _ +from odoo.tools.translate import JAVASCRIPT_TRANSLATION_COMMENT, WEB_TRANSLATION_COMMENT from odoo.tools.misc import file_open from odoo import http from odoo.http import request @@ -212,6 +211,7 @@ def _local_web_translations(trans_file): except Exception: return for x in po: - if x.id and x.string and "openerp-web" in x.auto_comments: + if x.id and x.string and (JAVASCRIPT_TRANSLATION_COMMENT in x.auto_comments + or WEB_TRANSLATION_COMMENT in x.auto_comments): messages.append({'id': x.id, 'string': x.string}) return messages