mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
Fix previous commit.
This commit is contained in:
parent
9940f2ec10
commit
303c00db1e
@ -251,16 +251,16 @@ class _PluginInternationalization:
|
||||
"""Main function.
|
||||
|
||||
This is the function which is called when a plugin runs _()"""
|
||||
if untranslated.__class__ is InternationalizedString:
|
||||
return untranslated
|
||||
normalizedUntranslated = normalize(untranslated, True)
|
||||
untranslated = normalize(untranslated, False)
|
||||
try:
|
||||
string = self._translate(normalizedUntranslated)
|
||||
return self._addTracker(string, untranslated)
|
||||
except KeyError:
|
||||
pass
|
||||
return untranslated
|
||||
if untranslated.__class__ is InternationalizedString:
|
||||
return untranslated._original
|
||||
else:
|
||||
return untranslated
|
||||
|
||||
def _translate(self, string):
|
||||
"""Translate the string.
|
||||
|
Loading…
Reference in New Issue
Block a user