-
- Downloads
[FIX] website: fix input attributes translation
Issue: - Go to website > edit mode > add a form - On one of the form fields, add a placeholder > save - Change language > translate > impossible to translate the placeholder. The fix on [1] was added to prevent interacting with inputs in editable zones. This prevents translating attributes on those inputs too (using the AttributeTranslateDialog) so the goal of this commit is to add an exception to the restriction in [1], when input attributes are translated. Remark: On translation editor, elements with translatable default values will get a `<span/>` as translation value which stays visible until the content is updated on the editor. This issue can be fixed on CSS for `placeholder` and input `value` attributes (since we can select elements with attribute translation on CSS). In this commit, we need to hide the text on JS until the editor's code sets the right values on inputs and textareas. [1]: https://github.com/odoo/odoo/commit/3e598a8014966e1a07a08d53bf85050b458e05a6 task-3042522 X-original-commit: 97163633 Part-of: odoo/odoo#116094
Showing
- addons/website/__manifest__.py 2 additions, 0 deletionsaddons/website/__manifest__.py
- addons/website/static/src/js/content/adapt_content.js 19 additions, 0 deletionsaddons/website/static/src/js/content/adapt_content.js
- addons/website/static/src/js/menu/translate.js 2 additions, 1 deletionaddons/website/static/src/js/menu/translate.js
- addons/website/static/src/scss/website.edit_mode.scss 2 additions, 2 deletionsaddons/website/static/src/scss/website.edit_mode.scss
- addons/website/static/src/scss/website.scss 23 additions, 0 deletionsaddons/website/static/src/scss/website.scss
Please register or sign in to comment