diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-02-10 05:27:24 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-02-14 19:09:38 +0100 |
commit | f50c0e369e170882e3f12fad49d69cfecf3f29db (patch) | |
tree | f7359d8e14341468026e55aecee0a567e2c3f4d2 /ipalib/plugins/hbactest.py | |
parent | 83fe7696a08e7f04b69014435332a2c4e0447076 (diff) | |
download | freeipa-f50c0e369e170882e3f12fad49d69cfecf3f29db.tar.gz freeipa-f50c0e369e170882e3f12fad49d69cfecf3f29db.tar.xz freeipa-f50c0e369e170882e3f12fad49d69cfecf3f29db.zip |
Internationalization for HBAC and ipalib.output
* hbacrule: Internationalize HBAC rule "all" category exceptions
https://fedorahosted.org/freeipa/ticket/2267
* hbactest: Use internationalized names (doc) instead of names
for output items
Also don't convert result to bool, `not` does it implicitly
* ipalib.output: Internationalize descriptions of some standard entries
Diffstat (limited to 'ipalib/plugins/hbactest.py')
-rw-r--r-- | ipalib/plugins/hbactest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/plugins/hbactest.py b/ipalib/plugins/hbactest.py index 92b7145a3..b81dca3de 100644 --- a/ipalib/plugins/hbactest.py +++ b/ipalib/plugins/hbactest.py @@ -359,7 +359,7 @@ class hbactest(Command): if res == pyhbac.HBAC_EVAL_DENY: notmatched_rules.append(ipa_rule.name) if warning_flag: - warning_rules.append(u'Sourcehost value of rule "%s" is ignored' % (ipa_rule.name)) + warning_rules.append(_(u'Sourcehost value of rule "%s" is ignored') % (ipa_rule.name)) except pyhbac.HbacError as (code, rule_name): if code == pyhbac.HBAC_EVAL_ERROR: error_rules.append(rule_name) @@ -402,7 +402,7 @@ class hbactest(Command): continue result = output[o] if isinstance(result, (list, tuple)): - textui.print_attribute(outp.name, result, '%s: %s', 1, True) + textui.print_attribute(unicode(outp.doc), result, '%s: %s', 1, True) elif isinstance(result, (unicode, bool)): if o == 'summary': textui.print_summary(result) @@ -410,6 +410,6 @@ class hbactest(Command): textui.print_indented(result) # Propagate integer value for result. It will give proper command line result for scripts - return int(not bool(output['value'])) + return int(not output['value']) api.register(hbactest) |