Patch #38529 ยป 0001-Restrict-available-locales-to-those-defined-by-Redmi.patch
| lib/redmine/i18n.rb | ||
|---|---|---|
| 161 | 161 |
module Implementation |
| 162 | 162 |
# Get available locales from the translations filenames |
| 163 | 163 |
def available_locales |
| 164 |
@available_locales ||= ::I18n.load_path.map {|path| File.basename(path, '.*')}.uniq.sort.map(&:to_sym)
|
|
| 164 |
@available_locales ||= begin |
|
| 165 |
redmine_locales = Dir[Rails.root / 'config' / 'locales' / '*.yml'].map { |f| File.basename(f, '.yml').to_sym }
|
|
| 166 |
super & redmine_locales |
|
| 167 |
end |
|
| 165 | 168 |
end |
| 166 | 169 |
end |
| 167 | 170 | |