Project

General

Profile

Defect #13520 » issue-13520.diff

Toshi MARUYAMA, 2013-03-20 15:47

View differences:

lib/redmine/i18n.rb
93 93
    # The result is cached to prevent from loading all translations files.
94 94
    def languages_options
95 95
      ActionController::Base.cache_store.fetch "i18n/languages_options" do
96
        valid_languages.map {|lang| [ll(lang.to_s, :general_lang_name), lang.to_s]}.sort {|x,y| x.first <=> y.first }
97
      end      
96
        langs = []
97
        valid_languages.each do |raw_lang|
98
          lang = raw_lang.to_s
99
          lang.force_encoding('UTF-8') if lang.respond_to?(:force_encoding)
100
          langs << [ll(lang, :general_lang_name), lang]
101
        end
102
        langs.sort {|x,y| x.first <=> y.first}
103
      end
98 104
    end
99 105

  
100 106
    def find_language(lang)
(1-1/3)