From eddf8971cfc40fda2be406aa35f547d939868917 Mon Sep 17 00:00:00 2001 From: Younn Olivier Date: Thu, 28 Jan 2021 00:37:54 +0000 Subject: [PATCH] [IMP] website, website_sale: change labels of new content When adding a new product, 'Product Name' is displayed instead of 'Name', and 'Create' instead of 'Continue' for every type of new content added. Part of https://github.com/odoo/odoo/pull/65255 task-2438556 --- addons/website/static/src/js/utils.js | 4 +++- addons/website/static/src/xml/website.xml | 6 +++--- addons/website_sale/static/src/js/website_sale.editor.js | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js index f66f562b166..18f75a9e673 100644 --- a/addons/website/static/src/js/utils.js +++ b/addons/website/static/src/js/utils.js @@ -4,7 +4,7 @@ odoo.define('website.utils', function (require) { var ajax = require('web.ajax'); var core = require('web.core'); -var qweb = core.qweb; +const { qweb, _t } = core; /** * Allows to load anchors from a page. @@ -164,6 +164,8 @@ function prompt(options, _qweb) { field_name: '', 'default': '', // dict notation for IE<9 init: function () {}, + btn_primary_title: _t('Create'), + btn_secondary_title: _t('Cancel'), }, options || {}); var type = _.intersection(Object.keys(options), ['input', 'textarea', 'select']); diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml index 8d196b9bba4..44ef684c2c7 100644 --- a/addons/website/static/src/xml/website.xml +++ b/addons/website/static/src/xml/website.xml @@ -12,7 +12,7 @@
@@ -23,8 +23,8 @@
diff --git a/addons/website_sale/static/src/js/website_sale.editor.js b/addons/website_sale/static/src/js/website_sale.editor.js index ef24939829b..765dab461ff 100644 --- a/addons/website_sale/static/src/js/website_sale.editor.js +++ b/addons/website_sale/static/src/js/website_sale.editor.js @@ -28,7 +28,7 @@ WebsiteNewMenu.include({ return wUtils.prompt({ id: "editor_new_product", window_title: _t("New Product"), - input: _t("Name"), + input: _t("Product Name"), }).then(function (result) { if (!result.val) { return;