[fix] Do not translate authenticator's help message in MoulinetteSignals

This commit is contained in:
Jérôme Lebleu 2014-11-21 11:06:29 +01:00
parent cbdaeadefb
commit ab6d8c529f
2 changed files with 2 additions and 6 deletions

View file

@ -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):

View file

@ -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'))