mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fix previous commit.
This commit is contained in:
parent
9940f2ec10
commit
303c00db1e
@ -251,15 +251,15 @@ class _PluginInternationalization:
|
|||||||
"""Main function.
|
"""Main function.
|
||||||
|
|
||||||
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:
|
|
||||||
return untranslated
|
|
||||||
normalizedUntranslated = normalize(untranslated, True)
|
normalizedUntranslated = normalize(untranslated, True)
|
||||||
untranslated = normalize(untranslated, False)
|
|
||||||
try:
|
try:
|
||||||
string = self._translate(normalizedUntranslated)
|
string = self._translate(normalizedUntranslated)
|
||||||
return self._addTracker(string, untranslated)
|
return self._addTracker(string, untranslated)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
if untranslated.__class__ is InternationalizedString:
|
||||||
|
return untranslated._original
|
||||||
|
else:
|
||||||
return untranslated
|
return untranslated
|
||||||
|
|
||||||
def _translate(self, string):
|
def _translate(self, string):
|
||||||
|
Loading…
Reference in New Issue
Block a user