mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Retrieve authenticator help translation at a better better place
This commit is contained in:
parent
99faa506b4
commit
6842d726cc
2 changed files with 7 additions and 5 deletions
|
@ -350,6 +350,13 @@ class MoulinetteSignals(object):
|
|||
"""
|
||||
if authenticator.is_authenticated:
|
||||
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)
|
||||
|
||||
def prompt(self, message, is_password=False, confirm=False):
|
||||
|
|
|
@ -237,11 +237,6 @@ class BaseActionsMapParser(object):
|
|||
else:
|
||||
auths = {}
|
||||
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
|
||||
# (identifier, configuration, parameters) with
|
||||
# - identifier: the authenticator vendor and its
|
||||
|
|
Loading…
Reference in a new issue