From e2e9924f0f7a67b1786de3e97d1128010a0d55f0 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Wed, 11 Jun 2025 20:10:26 +0000 Subject: [PATCH] Merge r23829 from trunk to 6.0-stable (#42815). git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23833 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/i18n.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb index dc59819a2..2f39c06a2 100644 --- a/lib/redmine/i18n.rb +++ b/lib/redmine/i18n.rb @@ -177,13 +177,11 @@ module Redmine # Custom backend based on I18n::Backend::Simple with the following changes: # * available_locales are determined by looking at translation file names class Backend < ::I18n::Backend::Simple - module Implementation - # Get available locales from the translations filenames - def available_locales - @available_locales ||= begin - redmine_locales = Dir[Rails.root / 'config' / 'locales' / '*.yml'].map { |f| File.basename(f, '.yml').to_sym } - super & redmine_locales - end + # Get available locales from the translations filenames + def available_locales + @available_locales ||= begin + redmine_locales = Dir[Rails.root / 'config' / 'locales' / '*.yml'].map { |f| File.basename(f, '.yml').to_sym } + super & redmine_locales end end