From 78e2d2e2fb49814c2f51dd97d2ddba6ba533d2e1 Mon Sep 17 00:00:00 2001 From: "jerome hanke (jhk)" Date: Mon, 22 Jun 2020 10:37:11 +0000 Subject: [PATCH] [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) Signed-off-by: mightyjol Signed-off-by: Nicolas Martinelli (nim) --- addons/web/static/src/js/widgets/translation_dialog.js | 3 +++ 1 file changed, 3 insertions(+) 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,