2
0
mirror of https://github.com/frappe/frappe.git synced 2024-06-12 20:32:22 +00:00

fix(translate)!: Don't add decontextualized translations

This commit is contained in:
Corentin Flr 2024-05-14 11:00:46 +02:00 committed by GitHub
parent bbf18d39cc
commit ace4ea328b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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