1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-27 07:33:05 +00:00

new syntax for symbol

This commit is contained in:
nishiki 2014-08-31 12:29:57 +02:00
parent f06059518c
commit 33f92d9aae

View file

@ -74,10 +74,10 @@ class Cli
def setup(lang) def setup(lang)
puts I18n.t('form.setup.title') puts I18n.t('form.setup.title')
puts '--------------------' puts '--------------------'
language = ask(I18n.t('form.setup.lang', :lang => lang)).to_s language = ask(I18n.t('form.setup.lang', lang: lang)).to_s
key = ask(I18n.t('form.setup.gpg_key')).to_s key = ask(I18n.t('form.setup.gpg_key')).to_s
share_keys = ask(I18n.t('form.setup.share_gpg_keys')).to_s share_keys = ask(I18n.t('form.setup.share_gpg_keys')).to_s
file_gpg = ask(I18n.t('form.setup.gpg_file', :home => @conf.dir_home)).to_s file_gpg = ask(I18n.t('form.setup.gpg_file', home: @conf.dir_home)).to_s
timeout_pwd = ask(I18n.t('form.setup.timeout')).to_s timeout_pwd = ask(I18n.t('form.setup.timeout')).to_s
sync_type = ask(I18n.t('form.setup.sync_type')).to_s sync_type = ask(I18n.t('form.setup.sync_type')).to_s
@ -282,7 +282,7 @@ class Cli
if result.length > 0 if result.length > 0
displayFormat(result) displayFormat(result)
confirm = ask("#{I18n.t('form.delete.ask', :id => id)} (y/N) ").to_s confirm = ask("#{I18n.t('form.delete.ask', id: id)} (y/N) ").to_s
if confirm =~ /^(y|yes|YES|Yes|Y)$/ if confirm =~ /^(y|yes|YES|Yes|Y)$/
force = true force = true
end end
@ -295,7 +295,7 @@ class Cli
if @mpw.remove(id) if @mpw.remove(id)
if @mpw.encrypt if @mpw.encrypt
sync sync
puts I18n.t('form.delete.valid', :id => id) puts I18n.t('form.delete.valid', id: id)
else else
puts "#{I18n.t('display.error')} #16: #{@mpw.error_msg}" puts "#{I18n.t('display.error')} #16: #{@mpw.error_msg}"
end end
@ -328,7 +328,7 @@ class Cli
displayFormat(r) displayFormat(r)
end end
confirm = ask("#{I18n.t('form.import.ask', :file => file)} (y/N) ").to_s confirm = ask("#{I18n.t('form.import.ask', file: file)} (y/N) ").to_s
if confirm =~ /^(y|yes|YES|Yes|Y)$/ if confirm =~ /^(y|yes|YES|Yes|Y)$/
force = true force = true
end end