From ace4ea328b4742abf0b624349154f6ee75e71a74 Mon Sep 17 00:00:00 2001 From: Corentin Flr <10946971+cogk@users.noreply.github.com> Date: Tue, 14 May 2024 11:00:46 +0200 Subject: [PATCH] fix(translate)!: Don't add decontextualized translations --- frappe/gettext/translate.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/frappe/gettext/translate.py b/frappe/gettext/translate.py index a7a3ddf607..bf5b60f0b8 100644 --- a/frappe/gettext/translate.py +++ b/frappe/gettext/translate.py @@ -299,9 +299,6 @@ def get_translations_from_mo(lang, app): if m.context: context = m.context.decode() # context is encoded as bytes translations[f"{key}:{context}"] = m.string - if m.id not in translations: - # better a translation with context than no translation - translations[m.id] = m.string else: translations[m.id] = m.string return translations