mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 18:43:37 +08:00
FIX: Don't load other locales in test mode
This commit is contained in:
parent
fc73de9578
commit
9e03b5c69a
|
@ -30,11 +30,13 @@ class LocaleSiteSetting < EnumSiteSetting
|
||||||
File.join(Rails.root, 'config', 'locales', 'client.*.yml')
|
File.join(Rails.root, 'config', 'locales', 'client.*.yml')
|
||||||
)
|
)
|
||||||
|
|
||||||
plugin_client_files = Dir.glob(
|
unless Rails.env.test? && ENV['LOAD_PLUGINS'] != "1"
|
||||||
File.join(Rails.root, 'plugins', '*', 'config', 'locales', 'client.*.yml')
|
app_client_files += Dir.glob(
|
||||||
)
|
File.join(Rails.root, 'plugins', '*', 'config', 'locales', 'client.*.yml')
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
(app_client_files + plugin_client_files).map { |x| x.split('.')[-2] }.uniq.sort
|
app_client_files.map { |x| x.split('.')[-2] }.uniq.sort
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user