summaryrefslogtreecommitdiff
path: root/addons/website_form/static
diff options
context:
space:
mode:
authorjerome hanke (jhk) <jhk@odoo.com>2020-01-13 13:20:05 +0000
committerjerome hanke (jhk) <jhk@odoo.com>2020-01-13 15:26:07 +0000
commit56588d126f4b010ddfcb4c95fe632933a2d827e9 (patch)
treeecbdd80584efd767a4293d09fbc3b46aa28d781b /addons/website_form/static
parentfca4694d805ebce0c8bcef85738c160dc7e290b7 (diff)
[FIX] website: translation of some fields
Steps to reproduce: - install website and crm - install a second language and translate website - go to website > create a new page > add a form builder > create a new opportunity > add a new custom field (selection or m2m) Previous behavior: default fields and some messages are not translatable Current behavior: more fields are translatable opw-2168786 closes odoo/odoo#43224 X-original-commit: 2b1359f2d2f85772c98988be5714f31163b70a23 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/website_form/static')
-rw-r--r--addons/website_form/static/src/js/website_form_editor.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/website_form/static/src/js/website_form_editor.js b/addons/website_form/static/src/js/website_form_editor.js
index 3382b723e17..d659f51dd06 100644
--- a/addons/website_form/static/src/js/website_form_editor.js
+++ b/addons/website_form/static/src/js/website_form_editor.js
@@ -273,30 +273,30 @@ odoo.define('website_form_editor', function (require) {
records: [
{
id: 'Option 1',
- display_name: 'Option 1'
+ display_name: _t('Option 1')
},
{
id: 'Option 2',
- display_name: 'Option 2'
+ display_name: _t('Option 2')
},
{
id: 'Option 3',
- display_name: 'Option 3'
+ display_name: _t('Option 3')
}
],
// Default values for selection fields
selection: [
[
'Option 1',
- 'Option 1'
+ _t('Option 1')
],
[
'Option 2',
- 'Option 2'
+ _t('Option 2')
],
[
'Option 3',
- 'Option 3'
+ _t('Option 3')
],
]
});
@@ -612,7 +612,7 @@ odoo.define('website_form_editor', function (require) {
// Disable duplicate button for model fields
options.registry['website_form_editor_field_model'] = disable_overlay_button_option.extend({
start: function () {
- this.disable_button('clone', 'You can\'t duplicate a model field.');
+ this.disable_button('clone', _t('You can\'t duplicate a model field.'));
return this._super.apply(this, arguments);
}
});
@@ -620,7 +620,7 @@ odoo.define('website_form_editor', function (require) {
// Disable delete button for model required fields
options.registry['website_form_editor_field_required'] = disable_overlay_button_option.extend({
start: function () {
- this.disable_button('remove', 'You can\'t remove a field that is required by the model itself.');
+ this.disable_button('remove', _t('You can\'t remove a field that is required by the model itself.'));
return this._super.apply(this, arguments);
}
});
@@ -628,7 +628,7 @@ odoo.define('website_form_editor', function (require) {
// Disable duplicate button for non-custom checkboxes and radio buttons
options.registry['website_form_editor_field_x2many'] =disable_overlay_button_option.extend({
start: function () {
- this.disable_button('clone', 'You can\'t duplicate an item which refers to an actual record.');
+ this.disable_button('clone', _t('You can\'t duplicate an item which refers to an actual record.'));
return this._super.apply(this, arguments);
}
});