Project

General

Profile

Defect #13520 » issue-13520-1.diff

Toshi MARUYAMA, 2013-03-20 18:26

View differences:

lib/redmine/i18n.rb
# The result is cached to prevent from loading all translations files.
def languages_options
ActionController::Base.cache_store.fetch "i18n/languages_options" do
valid_languages.map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.sort {|x,y| x.first <=> y.first }
end
langs = []
valid_languages.each do |raw_lang|
lang = raw_lang.to_s
lang.force_encoding('UTF-8') if lang.respond_to?(:force_encoding)
lang_name = ll(lang, :general_lang_name)
lang_name.force_encoding('UTF-8') if lang_name.respond_to?(:force_encoding)
langs << [lang_name, lang]
end
langs.sort {|x,y| x.first <=> y.first}
end
end
def find_language(lang)
(2-2/3)