mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Now tests if a plugin has the _ object before using it
This commit is contained in:
parent
595d98df91
commit
5150c4ef60
@ -209,8 +209,8 @@ class PluginInternationalization:
|
|||||||
return (be, has)
|
return (be, has)
|
||||||
|
|
||||||
def internationalizeDocstring(obj):
|
def internationalizeDocstring(obj):
|
||||||
# FIXME: check if the plugin has an _ object
|
if sys.modules[obj.__module__].__dict__.has_key('_'):
|
||||||
internationalizedCommands.update({hash(obj): obj})
|
internationalizedCommands.update({hash(obj): obj})
|
||||||
obj.__doc__=sys.modules[obj.__module__]._.__call__(obj.__doc__)
|
obj.__doc__=sys.modules[obj.__module__]._.__call__(obj.__doc__)
|
||||||
# We use _.__call__() instead of _() because of a pygettext warning.
|
# We use _.__call__() instead of _() because of a pygettext warning.
|
||||||
return obj
|
return obj
|
||||||
|
Loading…
Reference in New Issue
Block a user