mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-26 23:33:03 +00:00
fix show GPG password in setup and add confirm password
This commit is contained in:
parent
d477a8a939
commit
f15b4e47bf
3 changed files with 13 additions and 1 deletions
|
@ -126,9 +126,17 @@ class Cli
|
|||
end
|
||||
|
||||
name = ask(I18n.t('form.setup_gpg_key.name')).to_s
|
||||
password = ask(I18n.t('form.setup_gpg_key.password')).to_s
|
||||
password = ask(I18n.t('form.setup_gpg_key.password')) {|q| q.echo = false}
|
||||
confirm = ask(I18n.t('form.setup_gpg_key.confirm_password')) {|q| q.echo = false}
|
||||
|
||||
if password != confirm
|
||||
puts I18n.t('form.setup_gpg_key.error_password')
|
||||
exit 2
|
||||
end
|
||||
|
||||
length = ask(I18n.t('form.setup_gpg_key.length')).to_s
|
||||
expire = ask(I18n.t('form.setup_gpg_key.expire')).to_s
|
||||
password = password.to_s
|
||||
|
||||
length = length.nil? || length.empty? ? 2048 : length.to_i
|
||||
expire = expire.nil? || expire.empty? ? 0 : expire.to_i
|
||||
|
|
|
@ -88,6 +88,8 @@ en:
|
|||
no_create: "You must create manually your GPG key or relaunch the software."
|
||||
name: "Your name and lastname: "
|
||||
password: "A password for the GPG key: "
|
||||
confirm_password: "Confirm your password: "
|
||||
error_password: "Your passwords aren't identical!"
|
||||
length: "Size of the GPG key [default=2048]: "
|
||||
expire: "Expire time of the GPG key [default=0 (unlimited)]: "
|
||||
wait: "Please waiting during the GPG key generate, this process can take few minutes."
|
||||
|
|
|
@ -88,6 +88,8 @@ fr:
|
|||
no_create: "Veuillez créer manuellement votre clé GPG ou relancer le logiciel."
|
||||
name: "Votre nom et prénom: "
|
||||
password: "Mot de passe de la clé GPG: "
|
||||
confirm_password: "Retapez votre mot de passe: "
|
||||
error_password: "Vos deux mots de passes ne sont pas identiques!"
|
||||
length: "Taille de la clé GPG [défaut=2048]: "
|
||||
expire: "Expiration de la clé GPG [défaut=0 (illimité)]: "
|
||||
wait: "Veuillez patienter durant la génération de votre clé GPG, ce processus peut prendre quelques minutes."
|
||||
|
|
Loading…
Reference in a new issue