Project

General

Profile

Defect #13520 » issue-13520-1.diff

Toshi MARUYAMA, 2013-03-20 18:26

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
          lang_name = ll(lang, :general_lang_name)
101
          lang_name.force_encoding('UTF-8') if lang_name.respond_to?(:force_encoding)
102
          langs << [lang_name, lang]
103
        end
104
        langs.sort {|x,y| x.first <=> y.first}
105
      end
98 106
    end
99 107

  
100 108
    def find_language(lang)
(2-2/3)