diff options
| author | jerome hanke (jhk) <jhk@odoo.com> | 2020-06-22 10:37:11 +0000 |
|---|---|---|
| committer | jerome hanke (jhk) <jhk@odoo.com> | 2020-06-29 09:44:33 +0000 |
| commit | 78e2d2e2fb49814c2f51dd97d2ddba6ba533d2e1 (patch) | |
| tree | f261524202c1b3f9d88aebebe0f1938259d9c050 | |
| parent | 0426152da0ace873705b7b79ef33f654b6e9377e (diff) | |
[FIX] web: translation dialog assumes translation value for en_US
Steps to reproduce:
- Create a database with german as main language
- Load the en_US language (keep user preference as german)
- Activate debug mode > find the email template named "Purchase Order: Send PO"
- Edit the mail template > click the "DE" button to show thet translation dialog
Previous behavior:
the en_US translation is empty, it is confusing because the user assumes
that english translation have not been loaded.
that translation is actually fine when you switch to english
Current behavior:
en_US translations' empty value are assumed to be the same as the source
opw-2276673
closes odoo/odoo#53787
X-original-commit: 52975811071af3dbfe31d93b19f8a0f3a1b6b694
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
| -rw-r--r-- | addons/web/static/src/js/widgets/translation_dialog.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/widgets/translation_dialog.js b/addons/web/static/src/js/widgets/translation_dialog.js index 434b7ebcffe..efdba7b3a38 100644 --- a/addons/web/static/src/js/widgets/translation_dialog.js +++ b/addons/web/static/src/js/widgets/translation_dialog.js @@ -64,6 +64,9 @@ odoo.define('web.TranslationDialog', function (require) { ]).then(() => { this.data = this.translations.map((term) => { let relatedLanguage = this.languages.find((language) => language[0] === term.lang); + if (!term.value && !this.showSrc) { + term.value = term.src; + } return { id: term.id, lang: term.lang, |
