[FIX] website, *: add missing _lt and missing .pot entries
This commit fixes this error:
- The IMP done at [3] added a lot of fields but all of those forgot the
`_t()`/`_lt()` translation.
Note that:
1. A fix to replace `_t` by `_lt` was done at [4] but it was badly done
as it was not targetting the correct version... and only fixed one of
many occurences.
2. In this forward port, using `_t()` seems to be working again, using
`_lt()` is not required anymore. This part of the PR has been removed
here. For tracking purpose, here was the other bug:
- The form registry fields added in [1] and [2] in Odoo 13 had a
`string` attribute translated with `_t()` while now it should be
translated with `_lt()`. It was surely working in Odoo 13 but not
anymore. It's not worth investigating to be sure.
- Not needed since a recent commit which removed `_lt()` (it's a
deprecated alias to `_t()` which now handles the lazy translation
directly too.
[1]: https://github.com/odoo/odoo/pull/32565
[2]: https://github.com/odoo/enterprise/pull/4063
[3]: https://github.com/odoo/odoo/commit/617eba941785aa680edb826e14b0009637d60dee
[4]: https://github.com/odoo/odoo/commit/2be83cae7bcda369ed5bc7806aef845c6c76e687
opw-3471873
closes odoo/odoo#134238
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -10,36 +10,36 @@ FormEditorRegistry.add('send_mail', {
|
||||
required: true,
|
||||
fillWith: 'name',
|
||||
name: 'name',
|
||||
string: 'Your Name',
|
||||
string: _t('Your Name'),
|
||||
}, {
|
||||
type: 'tel',
|
||||
custom: true,
|
||||
fillWith: 'phone',
|
||||
name: 'phone',
|
||||
string: 'Phone Number',
|
||||
string: _t('Phone Number'),
|
||||
}, {
|
||||
type: 'email',
|
||||
modelRequired: true,
|
||||
fillWith: 'email',
|
||||
name: 'email_from',
|
||||
string: 'Your Email',
|
||||
string: _t('Your Email'),
|
||||
}, {
|
||||
type: 'char',
|
||||
custom: true,
|
||||
fillWith: 'commercial_company_name',
|
||||
name: 'company',
|
||||
string: 'Your Company',
|
||||
string: _t('Your Company'),
|
||||
}, {
|
||||
type: 'char',
|
||||
modelRequired: true,
|
||||
name: 'subject',
|
||||
string: 'Subject',
|
||||
string: _t('Subject'),
|
||||
}, {
|
||||
type: 'text',
|
||||
custom: true,
|
||||
required: true,
|
||||
name: 'description',
|
||||
string: 'Your Question',
|
||||
string: _t('Your Question'),
|
||||
}],
|
||||
fields: [{
|
||||
name: 'email_to',
|
||||
|
||||
@@ -9,34 +9,34 @@ FormEditorRegistry.add('create_lead', {
|
||||
required: true,
|
||||
name: 'contact_name',
|
||||
fillWith: 'name',
|
||||
string: 'Your Name',
|
||||
string: _t('Your Name'),
|
||||
}, {
|
||||
type: 'tel',
|
||||
name: 'phone',
|
||||
fillWith: 'phone',
|
||||
string: 'Phone Number',
|
||||
string: _t('Phone Number'),
|
||||
}, {
|
||||
type: 'email',
|
||||
required: true,
|
||||
fillWith: 'email',
|
||||
name: 'email_from',
|
||||
string: 'Your Email',
|
||||
string: _t('Your Email'),
|
||||
}, {
|
||||
type: 'char',
|
||||
required: true,
|
||||
fillWith: 'commercial_company_name',
|
||||
name: 'partner_name',
|
||||
string: 'Your Company',
|
||||
string: _t('Your Company'),
|
||||
}, {
|
||||
type: 'char',
|
||||
modelRequired: true,
|
||||
name: 'name',
|
||||
string: 'Subject',
|
||||
string: _t('Subject'),
|
||||
}, {
|
||||
type: 'text',
|
||||
required: true,
|
||||
name: 'description',
|
||||
string: 'Your Question',
|
||||
string: _t('Your Question'),
|
||||
}],
|
||||
fields: [{
|
||||
name: 'team_id',
|
||||
|
||||
@@ -8,17 +8,17 @@ FormEditorRegistry.add('create_task', {
|
||||
type: 'char',
|
||||
modelRequired: true,
|
||||
name: 'name',
|
||||
string: 'Task Title',
|
||||
string: _t('Task Title'),
|
||||
}, {
|
||||
type: 'email',
|
||||
modelRequired: true,
|
||||
fillWith: 'email',
|
||||
name: 'email_from',
|
||||
string: 'Your Email',
|
||||
string: _t('Your Email'),
|
||||
}, {
|
||||
type: 'char',
|
||||
name: 'description',
|
||||
string: 'Description',
|
||||
string: _t('Description'),
|
||||
}],
|
||||
fields: [{
|
||||
name: 'project_id',
|
||||
|
||||
@@ -9,27 +9,27 @@ FormEditorRegistry.add('apply_job', {
|
||||
modelRequired: true,
|
||||
name: 'partner_name',
|
||||
fillWith: 'name',
|
||||
string: 'Your Name',
|
||||
string: _t('Your Name'),
|
||||
}, {
|
||||
type: 'email',
|
||||
required: true,
|
||||
fillWith: 'email',
|
||||
name: 'email_from',
|
||||
string: 'Your Email',
|
||||
string: _t('Your Email'),
|
||||
}, {
|
||||
type: 'char',
|
||||
required: true,
|
||||
fillWith: 'phone',
|
||||
name: 'partner_mobile',
|
||||
string: 'Phone Number',
|
||||
string: _t('Phone Number'),
|
||||
}, {
|
||||
type: 'char',
|
||||
name: 'linkedin_profile',
|
||||
string: 'LinkedIn Profile',
|
||||
string: _t('LinkedIn Profile'),
|
||||
}, {
|
||||
type: 'text',
|
||||
name: 'description',
|
||||
string: 'Short Introduction',
|
||||
string: _t('Short Introduction'),
|
||||
}, {
|
||||
type: 'binary',
|
||||
custom: true,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import FormEditorRegistry from "@website/js/form_editor_registry";
|
||||
|
||||
FormEditorRegistry.add('create_customer', {
|
||||
@@ -8,22 +9,22 @@ FormEditorRegistry.add('create_customer', {
|
||||
modelRequired: true,
|
||||
name: 'name',
|
||||
fillWith: 'name',
|
||||
string: 'Your Name',
|
||||
string: _t('Your Name'),
|
||||
}, {
|
||||
type: 'email',
|
||||
required: true,
|
||||
fillWith: 'email',
|
||||
name: 'email',
|
||||
string: 'Your Email',
|
||||
string: _t('Your Email'),
|
||||
}, {
|
||||
type: 'tel',
|
||||
fillWith: 'phone',
|
||||
name: 'phone',
|
||||
string: 'Phone Number',
|
||||
string: _t('Phone Number'),
|
||||
}, {
|
||||
type: 'char',
|
||||
name: 'company_name',
|
||||
fillWith: 'commercial_company_name',
|
||||
string: 'Company Name',
|
||||
string: _t('Company Name'),
|
||||
}],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user