diff --git a/src/i18n.py b/src/i18n.py index 1d3864c73..7f6f4d1d1 100644 --- a/src/i18n.py +++ b/src/i18n.py @@ -209,8 +209,8 @@ class PluginInternationalization: return (be, has) def internationalizeDocstring(obj): - # FIXME: check if the plugin has an _ object - internationalizedCommands.update({hash(obj): obj}) - obj.__doc__=sys.modules[obj.__module__]._.__call__(obj.__doc__) - # We use _.__call__() instead of _() because of a pygettext warning. + if sys.modules[obj.__module__].__dict__.has_key('_'): + internationalizedCommands.update({hash(obj): obj}) + obj.__doc__=sys.modules[obj.__module__]._.__call__(obj.__doc__) + # We use _.__call__() instead of _() because of a pygettext warning. return obj