Patch #25014 » 0001-turns-languages_lookup-into-a-cache-by-using.patch
lib/redmine/i18n.rb | ||
---|---|---|
130 | 130 |
end |
131 | 131 | |
132 | 132 |
def find_language(lang) |
133 |
@@languages_lookup = valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k } |
|
133 |
@@languages_lookup ||= valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k }
|
|
134 | 134 |
@@languages_lookup[lang.to_s.downcase] |
135 | 135 |
end |
136 | 136 |