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
This commit is contained in:
Jean-Philippe Lang committed 2012-11-18 18:01:24 +00:00
1 parent 3739810afa
commit a49de1c39d
3 files changed
+22 -2

No files matched your search

+1 -2
View File
@@ -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 = {})