[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 <rco@odoo.com>
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
This commit is contained in:
Chong Wang (cwg)
2023-09-13 12:19:10 +00:00
parent f0efebee4d
commit 964d97358c
+3 -3
View File
@@ -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