From fc842e36504d39221fbfdafbaf8996b63e20de57 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Mon, 21 Feb 2011 14:54:05 -0500 Subject: Use pygettext to generate translatable strings from plugin files. This patch replaces xgettext with a custom pygettext to generate translatable strings from plugin files in ipalib/plugins. pygettext was modified to handle plural forms (credit goes to Jan Hendrik Goellner) and had some bugs fixed by myself. We only use it for plugins, because it's the only place where we need to extract docstrings for the built-in help system. I also had to make some changes to the way the built-in documentation systems gets docstrings from modules for this to work. --- ipalib/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index fa1dba8de..60afb7d02 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -706,7 +706,7 @@ class help(frontend.Local): self.print_commands(name) elif name in self.Command: cmd = self.Command[name] - print 'Purpose: %s' % cmd.doc + print 'Purpose: %s' % unicode(cmd.doc).strip() self.Backend.cli.build_parser(cmd).print_help() elif mod_name in sys.modules: self.print_commands(name) -- cgit