ticket 1705 - internationalize help topics

* Wrap each topic description in _()

* Replace the use of if 'topic' in dir(module) with the more
  Pythonic and efficient getattr(module, 'topic', None)

* Make sure to invoke unicode on the value returned from _()
  otherwise you'll get a GettextFactory instance, not a string

* Clean up trailing whitespace errors
This commit is contained in:
John Dennis authored and Rob Crittenden committed 2011-08-24 23:05:17 -04:00
1 parent f4ad749126
commit a4fadbfe63
7 files changed
+9 -11

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ from ipalib import Str, StrEnum
from ipalib.plugins.baseldap import *
from ipalib import _, ngettext
topic = ('sudo', 'Commands for controlling sudo configuration')
topic = ('sudo', _('Commands for controlling sudo configuration'))
def deprecated(attribute):
raise errors.ValidationError(name=attribute, error=_('this option has been deprecated.'))