From a12a8b5882874ab71821ff0fbe87bfa82f587aa7 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 3 Jan 2014 14:31:43 +0100 Subject: [PATCH 1/3] fix bug connect after setup a new config file --- lib/Cli.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Cli.rb b/lib/Cli.rb index 2b53ab3..cc67cd1 100644 --- a/lib/Cli.rb +++ b/lib/Cli.rb @@ -49,6 +49,10 @@ class Cli else puts "#{I18n.t('cli.display.error')}: #{@m.error_msg}" end + + if not @m.checkconfig() + puts "#{I18n.t('cli.display.error')}: #{@m.error_msg}" + end end # Request the GPG password and decrypt the file From d6e1b4da0d180f5217006d378e084a9b8c59a648 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 3 Jan 2014 14:44:26 +0100 Subject: [PATCH 2/3] fix locale warning with ruby >=2.0 --- mpw | 2 +- mpw-ssh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mpw b/mpw index a06fd40..bef6ac7 100755 --- a/mpw +++ b/mpw @@ -12,10 +12,10 @@ require 'i18n' APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath) require "#{APP_ROOT}/lib/Cli.rb" - lang = Locale::Tag.parse(ENV['LANG']).to_simple.to_s[0..1] I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) +I18n.enforce_available_locales = false I18n.load_path = Dir["#{APP_ROOT}/i18n/*.yml"] I18n.default_locale = :en I18n.locale = lang.to_sym diff --git a/mpw-ssh b/mpw-ssh index a991cc1..7813719 100755 --- a/mpw-ssh +++ b/mpw-ssh @@ -15,6 +15,7 @@ require "#{APP_ROOT}/lib/CliSSH.rb" lang = Locale::Tag.parse(ENV['LANG']).to_simple.to_s[0..1] I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) +I18n.enforce_available_locales = false I18n.load_path = Dir["#{APP_ROOT}/i18n/*.yml"] I18n.default_locale = :en I18n.locale = lang.to_sym From 69f261e38e7911b3ab677d5ec1369cf08c655673 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 3 Jan 2014 15:26:46 +0100 Subject: [PATCH 3/3] remove fix warning --- mpw | 1 - mpw-ssh | 1 - 2 files changed, 2 deletions(-) diff --git a/mpw b/mpw index bef6ac7..04da00e 100755 --- a/mpw +++ b/mpw @@ -15,7 +15,6 @@ require "#{APP_ROOT}/lib/Cli.rb" lang = Locale::Tag.parse(ENV['LANG']).to_simple.to_s[0..1] I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) -I18n.enforce_available_locales = false I18n.load_path = Dir["#{APP_ROOT}/i18n/*.yml"] I18n.default_locale = :en I18n.locale = lang.to_sym diff --git a/mpw-ssh b/mpw-ssh index 7813719..a991cc1 100755 --- a/mpw-ssh +++ b/mpw-ssh @@ -15,7 +15,6 @@ require "#{APP_ROOT}/lib/CliSSH.rb" lang = Locale::Tag.parse(ENV['LANG']).to_simple.to_s[0..1] I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) -I18n.enforce_available_locales = false I18n.load_path = Dir["#{APP_ROOT}/i18n/*.yml"] I18n.default_locale = :en I18n.locale = lang.to_sym