[fix] Retrieve authenticator help translation at a better better place

This commit is contained in:
Jérôme Lebleu 2014-06-03 14:14:16 +02:00
parent 99faa506b4
commit 6842d726cc
2 changed files with 7 additions and 5 deletions

View file

@ -350,6 +350,13 @@ class MoulinetteSignals(object):
""" """
if authenticator.is_authenticated: if authenticator.is_authenticated:
return authenticator return authenticator
# Retrieve help translation since it's not loaded yet
if help:
try:
help = m18n.n(help)
except: pass
return self._authenticate(authenticator, help) return self._authenticate(authenticator, help)
def prompt(self, message, is_password=False, confirm=False): def prompt(self, message, is_password=False, confirm=False):

View file

@ -237,11 +237,6 @@ class BaseActionsMapParser(object):
else: else:
auths = {} auths = {}
for auth_name, auth_conf in auth.items(): for auth_name, auth_conf in auth.items():
# Retrieve translations
auth_help = auth_conf.get('help', None)
if auth_help:
auth_help = m18n.n(auth_help)
# Add authenticator profile as a 3-tuple # Add authenticator profile as a 3-tuple
# (identifier, configuration, parameters) with # (identifier, configuration, parameters) with
# - identifier: the authenticator vendor and its # - identifier: the authenticator vendor and its