summaryrefslogtreecommitdiffstats
path: root/ipalib/output.py
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2010-03-05 16:11:21 -0500
committerJason Gerard DeRose <jderose@redhat.com>2010-03-08 21:10:36 -0700
commitb75d06e18938015ad6eafe53e15aa2d7a2f92f02 (patch)
tree856e8b5457e91cb1a9bd628ef8ce82c99dc79657 /ipalib/output.py
parentb9df4f7f29a638d3646c5ff1ffc33c00f7d715c6 (diff)
downloadfreeipa-b75d06e18938015ad6eafe53e15aa2d7a2f92f02.tar.gz
freeipa-b75d06e18938015ad6eafe53e15aa2d7a2f92f02.tar.xz
freeipa-b75d06e18938015ad6eafe53e15aa2d7a2f92f02.zip
localize doc strings
A number of doc strings were not localized, wrap them in _(). Some messages were not localized, wrap them in _() Fix a couple of failing tests: The method name in RPC should not be unicode. The doc attribute must use the .msg attribute for comparison. Also clean up imports of _() The import should come from ipalib or ipalib.text, not ugettext from request.
Diffstat (limited to 'ipalib/output.py')
-rw-r--r--ipalib/output.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipalib/output.py b/ipalib/output.py
index 757e7155e..354d802ff 100644
--- a/ipalib/output.py
+++ b/ipalib/output.py
@@ -24,6 +24,7 @@ Simple description of return values.
from inspect import getdoc
from types import NoneType
from plugable import ReadOnly, lock
+from text import _
class Output(ReadOnly):
@@ -88,7 +89,7 @@ class Output(ReadOnly):
class Entry(Output):
type = dict
- doc = 'A dictionary representing an LDAP entry'
+ doc = _('A dictionary representing an LDAP entry')
emsg = """%s.validate_output() => %s.validate():
@@ -96,7 +97,7 @@ emsg = """%s.validate_output() => %s.validate():
class ListOfEntries(Output):
type = (list, tuple)
- doc = 'A list of LDAP entries'
+ doc = _('A list of LDAP entries')
def validate(self, cmd, entries):
assert isinstance(entries, self.type)
@@ -107,7 +108,7 @@ class ListOfEntries(Output):
)
-result = Output('result', doc='All commands should at least have a result')
+result = Output('result', doc=_('All commands should at least have a result'))
summary = Output('summary', (unicode, NoneType),
'User-friendly description of action performed'