Skip to content
Snippets Groups Projects
Commit c8b8d950 authored by jerome hanke (jhk)'s avatar jerome hanke (jhk)
Browse files

[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#43207

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent b13eece4
No related branches found
No related tags found
No related merge requests found
......@@ -208,6 +208,30 @@ msgstr ""
msgid "Number"
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
......@@ -352,6 +376,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
......
......@@ -269,30 +269,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')
],
]
});
......@@ -551,7 +551,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);
}
});
......@@ -559,7 +559,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);
}
});
......@@ -567,7 +567,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);
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment