[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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user