From e0ea443e89d14c2d2fe7e8b58cac9db9b3a34f83 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 6 Dec 2024 12:04:46 +0100 Subject: [PATCH] Track strings even when failing to translate them --- src/i18n.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/i18n.py b/src/i18n.py index 2c4d88af8..3978b1262 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -264,14 +264,16 @@ class _PluginInternationalization: This is the function which is called when a plugin runs _()""" if untranslated.__class__ is InternationalizedString: - untranslated = untranslated._original + originalUntranslated = untranslated._original + else: + originalUntranslated = untranslated - normalizedUntranslated = normalize(untranslated, True) + normalizedUntranslated = normalize(originalUntranslated, True) try: string = self._translate(normalizedUntranslated) - return self._addTracker(string, untranslated) except KeyError: - return untranslated + string = untranslated + return self._addTracker(string, untranslated) def _translate(self, string): """Translate the string.