Fix previous commit.

This commit is contained in:
Valentin Lorentz 2014-05-31 15:18:23 +02:00
parent 9940f2ec10
commit 303c00db1e

View File

@ -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.