summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2011-02-10 13:00:00 -0500
committerRob Crittenden <rcritten@redhat.com>2011-03-01 10:31:39 -0500
commit814595275293af836ceed7aeedf8412d94b13794 (patch)
tree471b3a33b9045107888494fd88d24946c0417b7a /ipalib/cli.py
parentbbc94034b0ab7dbfc4b0f38277a13c25c4e98f18 (diff)
downloadfreeipa-814595275293af836ceed7aeedf8412d94b13794.tar.gz
freeipa-814595275293af836ceed7aeedf8412d94b13794.tar.xz
freeipa-814595275293af836ceed7aeedf8412d94b13794.zip
Translate docstrings.
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 5ae16556..fa1dba8d 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: