summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipalib/cli.py10
-rw-r--r--ipalib/plugable.py2
2 files changed, 8 insertions, 4 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 5ae165569..fa1dba8de 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -663,12 +663,16 @@ class help(frontend.Local):
self._topics[topic_name][2].append(c)
else:
m = '%s.%s' % (self._PLUGIN_BASE_MODULE, topic_name)
- doc = (sys.modules[m].__doc__ or '').strip().split('\n', 1)[0]
+ doc = (
+ unicode(_(sys.modules[m].__doc__)) or ''
+ ).strip().split('\n', 1)[0]
self._topics[topic_name] = [doc, 0, [c]]
mcl = max((self._topics[topic_name][1], len(c.name)))
self._topics[topic_name][1] = mcl
else: # a module grouped in a topic
- doc = (sys.modules[c.module].__doc__ or '').strip().split('\n', 1)[0]
+ doc = (
+ unicode(_(sys.modules[c.module].__doc__)) or ''
+ ).strip().split('\n', 1)[0]
mod_name = c.module.rsplit('.',1)[1]
if topic_name in self._topics:
if mod_name in self._topics[topic_name][2]:
@@ -757,7 +761,7 @@ class help(frontend.Local):
break
m = '%s.%s' % (self._PLUGIN_BASE_MODULE, topic)
- doc = (sys.modules[m].__doc__ or '').strip()
+ doc = (unicode(_(sys.modules[m].__doc__)) or '').strip()
print doc
if len(commands) > 1:
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 723414ced..26ce366f3 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -181,7 +181,7 @@ class Plugin(ReadOnly):
self.bases = tuple(
'%s.%s' % (b.__module__, b.__name__) for b in cls.__bases__
)
- self.doc = inspect.getdoc(cls)
+ self.doc = _(inspect.getdoc(cls))
if self.doc is None:
self.summary = '<%s>' % self.fullname
else: