add non iso countries, i guess

This commit is contained in:
Yuki 2015-06-09 23:35:33 +05:30
parent 53f3e487fd
commit 9da3472179
1 changed files with 7 additions and 10 deletions

View File

@ -9,19 +9,16 @@ I18n.with_locale("") do
if APP_LOCALES[l].nil? if APP_LOCALES[l].nil?
cc = l.split("-").last cc = l.split("-").last
if flag_map.index(cc).nil? if flag_map.index(cc).nil? and not locale_map[cc].nil?
cc = locale_map[cc] cc = locale_map[cc]
end end
unless flag_map.index(cc).nil? begin
begin lang = I18n.translate("#{l}.language")
lang = I18n.translate("#{l}.language") lang = '' if lang.index "translation missing"
lang = '' if lang.index "translation missing" APP_LOCALES[l] = [lang, cc]
APP_LOCALES[l] = [lang, cc] rescue
rescue I18n.MissingTranslationData APP_LOCALES[l] = ['', cc]
APP_LOCALES[l] = ['', cc]
rescue
end
end end
end end
end end