mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
Revert "FEATURE: Site settings defaults per locale"
This reverts commit 468a8fcd206d14ff4421758e840d63a27c246254.
This commit is contained in:
@ -14,7 +14,11 @@ class SiteSetting < ActiveRecord::Base
|
||||
|
||||
def self.load_settings(file)
|
||||
SiteSettings::YamlLoader.new(file).load do |category, name, default, opts|
|
||||
setting(name, default, opts.merge(category: category))
|
||||
if opts.delete(:client)
|
||||
client_setting(name, default, opts.merge(category: category))
|
||||
else
|
||||
setting(name, default, opts.merge(category: category))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -27,11 +31,6 @@ class SiteSetting < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
# `current` hash is not populated everytime when load a site setting
|
||||
# in order to support locale default. Instead, we simply `refresh!` once.
|
||||
# This should only affects the spec in which you should populate `current`
|
||||
refresh!
|
||||
|
||||
client_settings << :available_locales
|
||||
|
||||
def self.available_locales
|
||||
|
Reference in New Issue
Block a user