[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>
This commit is contained in:
@@ -242,6 +242,30 @@ msgstr ""
|
||||
msgid "Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "Option 1"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "Option 2"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "Option 3"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#: code:addons/website_form/controllers/main.py:0
|
||||
#, python-format
|
||||
@@ -398,6 +422,27 @@ msgstr ""
|
||||
msgid "You can choose to log technical data like IP, User Agent ,..."
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "You can't duplicate a model field."
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "You can't duplicate an item which refers to an actual record."
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/js/website_form_editor.js:0
|
||||
#, python-format
|
||||
msgid "You can't remove a field that is required by the model itself."
|
||||
msgstr ""
|
||||
|
||||
#. module: website_form
|
||||
#. openerp-web
|
||||
#: code:addons/website_form/static/src/xml/website_form.xml:0
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user