mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fix previous commit.
This commit is contained in:
parent
9940f2ec10
commit
303c00db1e
@ -251,16 +251,16 @@ 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
|
||||||
return untranslated
|
if untranslated.__class__ is InternationalizedString:
|
||||||
|
return untranslated._original
|
||||||
|
else:
|
||||||
|
return untranslated
|
||||||
|
|
||||||
def _translate(self, string):
|
def _translate(self, string):
|
||||||
"""Translate the string.
|
"""Translate the string.
|
||||||
|
Loading…
Reference in New Issue
Block a user