Fix formatted translations of error messages in topology plugin

For now formatting is applied for bare messages before translating.
This breaks python-brace-format and message becomes untranslatable
at all.

Fixes: https://pagure.io/freeipa/issue/7586
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin 2018-06-20 13:01:41 +03:00 committed by Christian Heimes
parent 1dfdbfd8bf
commit 4b3bc490d3

View File

@ -86,7 +86,7 @@ def validate_domain_level(api):
if current < DOMAIN_LEVEL_1:
raise errors.InvalidDomainLevelError(
reason=_('Topology management requires minimum domain level {0} '
.format(DOMAIN_LEVEL_1))
).format(DOMAIN_LEVEL_1)
)
@ -256,7 +256,7 @@ class topologysegment(LDAPObject):
name='leftnode',
error=_("left node ({host}) does not support "
"suffix '{suff}'"
.format(host=leftnode, suff=suffix))
).format(host=leftnode, suff=suffix)
)
if rightnode not in suffix_m_hostnames:
@ -264,7 +264,7 @@ class topologysegment(LDAPObject):
name='rightnode',
error=_("right node ({host}) does not support "
"suffix '{suff}'"
.format(host=rightnode, suff=suffix))
).format(host=rightnode, suff=suffix)
)