Fix formatted translations in domainlevel plugin

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

Fixes: https://pagure.io/freeipa/issue/7586
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin authored and Christian Heimes committed 2018-06-21 15:30:58 +02:00
1 parent 854597c411
commit 65414d1471
1 file changed
+2 -2
+2 -2
View File
@@ -67,7 +67,7 @@ def check_conflict_entries(ldap, api, desired_value):
scope=ldap.SCOPE_SUBTREE)
message = _("Domain Level cannot be raised to {0}, "
"existing replication conflicts have to be resolved."
.format(desired_value))
).format(desired_value)
raise errors.InvalidDomainLevelError(reason=message)
except errors.NotFound:
pass
@@ -152,7 +152,7 @@ class domainlevel_set(Command):
if supported.min > desired_value or supported.max < desired_value:
message = _("Domain Level cannot be raised to {0}, server {1} "
"does not support it."
.format(desired_value, master['cn'][0]))
).format(desired_value, master['cn'][0])
raise errors.InvalidDomainLevelError(reason=message)
# Check if conflict entries exist in topology subtree