mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-17 08:30:04 +00:00
fix locale warning with ruby >=2.0
This commit is contained in:
parent
a12a8b5882
commit
d6e1b4da0d
2 changed files with 2 additions and 1 deletions
2
mpw
2
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
|
||||
|
|
1
mpw-ssh
1
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
|
||||
|
|
Loading…
Add table
Reference in a new issue