mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Do not translate authenticator's help message in MoulinetteSignals
This commit is contained in:
parent
cbdaeadefb
commit
ab6d8c529f
2 changed files with 2 additions and 6 deletions
|
@ -372,7 +372,7 @@ class MoulinetteSignals(object):
|
|||
|
||||
Keyword arguments:
|
||||
- authenticator -- The authenticator object to use
|
||||
- help -- A help message for the authenticator
|
||||
- help -- The translation key of the authenticator's help message
|
||||
|
||||
Returns:
|
||||
The authenticator object
|
||||
|
@ -380,10 +380,6 @@ class MoulinetteSignals(object):
|
|||
"""
|
||||
if authenticator.is_authenticated:
|
||||
return authenticator
|
||||
|
||||
# Retrieve help translation since it's not loaded yet
|
||||
if help:
|
||||
help = m18n.n(help)
|
||||
return self._authenticate(authenticator, help)
|
||||
|
||||
def prompt(self, message, is_password=False, confirm=False):
|
||||
|
|
|
@ -218,7 +218,7 @@ class Interface(BaseInterface):
|
|||
|
||||
"""
|
||||
# TODO: Allow token authentication?
|
||||
msg = help or m18n.g('password')
|
||||
msg = m18n.n(help) if help else m18n.g('password')
|
||||
return authenticator(password=self._do_prompt(msg, True, False,
|
||||
color='yellow'))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue