1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-23 13:57:52 +00:00
This commit is contained in:
adrien 2013-12-26 10:57:03 +01:00
parent f600ff024b
commit 3dcb465025

12
mpw-ssh
View file

@ -6,11 +6,21 @@
require 'rubygems' require 'rubygems'
require 'optparse' require 'optparse'
require 'pathname' require 'pathname'
require 'locale'
require 'i18n'
APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath) APP_ROOT = File.dirname(Pathname.new(__FILE__).realpath)
require "#{APP_ROOT}/lib/CliSSH.rb" require "#{APP_ROOT}/lib/CliSSH.rb"
cli = CliSSH.new() lang = Locale::Tag.parse(ENV['LANG']).to_simple.to_s[0..1]
if !File.exist?("#{APP_ROOT}/i18n/#{lang}.yml")
lang = 'en'
end
I18n.load_path = Dir["#{APP_ROOT}/i18n/#{lang}.yml"]
I18n.locale = lang.to_sym
cli = CliSSH.new(lang)
search = ARGV[0] search = ARGV[0]
options = {} options = {}