diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 4c4d38eaee5..24ab24461da 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -167,7 +167,7 @@ class Project(models.Model): def _get_default_favorite_user_ids(self): return [(6, 0, [self.env.uid])] - name = fields.Char("Name", index=True, required=True, tracking=True) + name = fields.Char("Name", index=True, required=True, tracking=True, translate=True) description = fields.Html() active = fields.Boolean(default=True, help="If the active field is set to False, it will allow you to hide the project without removing it.") diff --git a/addons/web/static/src/legacy/js/views/kanban/kanban_column_quick_create.js b/addons/web/static/src/legacy/js/views/kanban/kanban_column_quick_create.js index 928f80ab60f..e9262d146b0 100644 --- a/addons/web/static/src/legacy/js/views/kanban/kanban_column_quick_create.js +++ b/addons/web/static/src/legacy/js/views/kanban/kanban_column_quick_create.js @@ -201,7 +201,7 @@ var ColumnQuickCreate = Widget.extend({ text: _t('Close'), }], size: "large", - title: "Kanban Examples", + title: _t("Kanban Examples"), }).open(); dialog.on('closed', this, function () { self.$input.focus(); diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index fe019442d11..18b90fd38bc 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -151,9 +151,11 @@ TRANSLATED_ATTRS = dict.fromkeys({ 'aria-keyshortcuts', 'aria-placeholder', 'aria-roledescription', 'aria-valuetext', 'value_label', }, lambda e: True) -TRANSLATED_ATTRS['value'] = lambda e: (e.tag == 'input' and e.attrib.get('type', 'text') == 'text') and 'datetimepicker-input' not in e.attrib['class'].split(' ') - -TRANSLATED_ATTRS.update({f't-attf-{attr}': cond for attr, cond in TRANSLATED_ATTRS.items()}) +TRANSLATED_ATTRS.update( + value=lambda e: (e.tag == 'input' and e.attrib.get('type', 'text') == 'text') and 'datetimepicker-input' not in e.attrib['class'].split(' '), + text=lambda e: (e.tag == 'field' and e.attrib.get('widget', '') == 'url'), + **{f't-attf-{attr}': cond for attr, cond in TRANSLATED_ATTRS.items()}, +) avoid_pattern = re.compile(r"\s*]*>(.*)", re.DOTALL | re.MULTILINE | re.UNICODE)