From 4b3bc490d3be109ea048f165a1929438760d8a54 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Wed, 20 Jun 2018 13:01:41 +0300 Subject: [PATCH] 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 --- ipaserver/plugins/topology.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipaserver/plugins/topology.py b/ipaserver/plugins/topology.py index 7e3891c94..af86b7338 100644 --- a/ipaserver/plugins/topology.py +++ b/ipaserver/plugins/topology.py @@ -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) )