From 230b680bf92583c9f5e4a3739be1d8602df44331 Mon Sep 17 00:00:00 2001 From: AH-Yussef Date: Wed, 15 Nov 2023 10:41:47 +0000 Subject: [PATCH] [FIX] website_sale: add message to translation Steps to reproduce: - install the e-commerce module - in General settings, add and switch French -or any- language - Go to website - Under e-commerce > product in the menu bar - click on any product - click on go to website smart button - click on edit button to edit the website page - choose any block to insert, You can notice the message (DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS) stays in English Investigation - The message is not add to website_sale.pot file, as the message string passed to an attribute not an actual string inside a tag. opw-3573881 closes odoo/odoo#145755 X-original-commit: 9a595cd19fba3a68dacd5159d0b04102bc76cadf Signed-off-by: Ali Hassan Youssef (alhy) --- addons/website_blog/i18n/website_blog.pot | 5 +++++ addons/website_sale/i18n/website_sale.pot | 5 +++++ odoo/tools/translate.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/website_blog/i18n/website_blog.pot b/addons/website_blog/i18n/website_blog.pot index c056959b312..555bd24ce57 100644 --- a/addons/website_blog/i18n/website_blog.pot +++ b/addons/website_blog/i18n/website_blog.pot @@ -2157,6 +2157,11 @@ msgstr "" msgid "Visible on current website" msgstr "" +#. module: website_blog +#: model_terms:ir.ui.view,arch_db:website_blog.blog_post_content +msgid "WRITE HERE OR DRAG BUILDING BLOCKS" +msgstr "" + #. module: website_blog #: model:ir.model,name:website_blog.model_website #: model:ir.model.fields,field_description:website_blog.field_blog_blog__website_id diff --git a/addons/website_sale/i18n/website_sale.pot b/addons/website_sale/i18n/website_sale.pot index edc4fe4a462..02ba95365b6 100644 --- a/addons/website_sale/i18n/website_sale.pot +++ b/addons/website_sale/i18n/website_sale.pot @@ -1410,6 +1410,11 @@ msgstr "" msgid "Default (1/1)" msgstr "" +#. module: website_sale +#: model_terms:ir.ui.view,arch_db:website_sale.product +msgid "DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS" +msgstr "" + #. module: website_sale #: model:ir.model.fields,field_description:website_sale.field_website__currency_id msgid "Default Currency" diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index e1a118608a0..db34de25acf 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -157,7 +157,7 @@ TRANSLATED_ELEMENTS = { TRANSLATED_ATTRS = dict.fromkeys({ 'string', 'add-label', 'help', 'sum', 'avg', 'confirm', 'placeholder', 'alt', 'title', 'aria-label', 'aria-keyshortcuts', 'aria-placeholder', 'aria-roledescription', 'aria-valuetext', - 'value_label', 'data-tooltip', + 'value_label', 'data-tooltip', 'data-editor-message', }, lambda e: True) def translate_attrib_value(node):