mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-29 15:01:05 -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 _()"""
|
This is the function which is called when a plugin runs _()"""
|
||||||
if untranslated.__class__ is InternationalizedString:
|
if untranslated.__class__ is InternationalizedString:
|
||||||
untranslated = untranslated._original
|
originalUntranslated = untranslated._original
|
||||||
|
else:
|
||||||
|
originalUntranslated = untranslated
|
||||||
|
|
||||||
normalizedUntranslated = normalize(untranslated, True)
|
normalizedUntranslated = normalize(originalUntranslated, True)
|
||||||
try:
|
try:
|
||||||
string = self._translate(normalizedUntranslated)
|
string = self._translate(normalizedUntranslated)
|
||||||
return self._addTracker(string, untranslated)
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return untranslated
|
string = untranslated
|
||||||
|
return self._addTracker(string, untranslated)
|
||||||
|
|
||||||
def _translate(self, string):
|
def _translate(self, string):
|
||||||
"""Translate the string.
|
"""Translate the string.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user