diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-18 18:01:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-11-18 18:01:24 +0000 |
commit | a49de1c39d1292259580ed6db1f6e455259094ff (patch) | |
tree | d6007302f34ce91dee43acce6304a002c9c7cc5c /app/helpers | |
parent | 3739810afa3545e6747a9111185dc8808fff6078 (diff) | |
download | redmine-a49de1c39d1292259580ed6db1f6e455259094ff.tar.gz redmine-a49de1c39d1292259580ed6db1f6e455259094ff.zip |
Cache languages names to avoid loading all translations files.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10844 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 048b7ae6f..f78dbb965 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -962,8 +962,7 @@ module ApplicationHelper end def lang_options_for_select(blank=true) - (blank ? [["(auto)", ""]] : []) + - valid_languages.collect{|lang| [ ll(lang.to_s, :general_lang_name), lang.to_s]}.sort{|x,y| x.last <=> y.last } + (blank ? [["(auto)", ""]] : []) + languages_options end def label_tag_for(name, option_tags = nil, options = {}) |