mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-25 20:41:18 -05:00
Track strings even when failing to translate them
This commit is contained in:
parent
de854f4e4f
commit
e0ea443e89
10
src/i18n.py
10
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user