summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2011-02-23 16:47:49 -0500
committerRob Crittenden <rcritten@redhat.com>2011-03-01 10:31:40 -0500
commitf3de95ce99855cb15e26d8007c8901aaec96c595 (patch)
treeab1924abd9e8d6b8fbe32834f5d110617ecead43 /ipalib/plugable.py
parent814595275293af836ceed7aeedf8412d94b13794 (diff)
downloadfreeipa-f3de95ce99855cb15e26d8007c8901aaec96c595.tar.gz
freeipa-f3de95ce99855cb15e26d8007c8901aaec96c595.tar.xz
freeipa-f3de95ce99855cb15e26d8007c8901aaec96c595.zip
Fix translatable strings in ipalib plugins.
Needed for xgettext/pygettext processing.
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 26ce366f3..da02d87f4 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -38,6 +38,7 @@ import errors
from config import Env
import util
import text
+from text import _
from base import ReadOnly, NameSpace, lock, islocked, check_name
from constants import DEFAULT_CONFIG, FORMAT_STDERR, FORMAT_FILE
@@ -181,11 +182,12 @@ class Plugin(ReadOnly):
self.bases = tuple(
'%s.%s' % (b.__module__, b.__name__) for b in cls.__bases__
)
- self.doc = _(inspect.getdoc(cls))
- if self.doc is None:
+ doc = inspect.getdoc(cls)
+ self.doc = _(doc)
+ if doc is None:
self.summary = '<%s>' % self.fullname
else:
- self.summary = self.doc.split('\n\n', 1)[0]
+ self.summary = unicode(self.doc).split('\n\n', 1)[0]
log = logging.getLogger(self.fullname)
for name in ('debug', 'info', 'warning', 'error', 'critical', 'exception'):
if hasattr(self, name):