DEV: Unhide the set_locale_from_cookie setting to allow site translations (#30924)

Related: https://github.com/discourse/discourse-translator/pull/198

The new experimental feature on discourse-translator requires this
`SiteSetting.set_locale_from_cookie` to be set. This comment unhides the
existing site setting.
This commit is contained in:
Natalie Tay
2025-01-23 11:05:29 +08:00
committed by GitHub
parent 2c8f07fe85
commit daab816a37
4 changed files with 4 additions and 8 deletions

View File

@@ -47,11 +47,9 @@ RSpec.describe Admin::SiteSettingsController do
Admin::Config::SiteSettingsController::ADMIN_CONFIG_AREA_ALLOWLISTED_HIDDEN_SETTINGS.first.to_s
end,
).to be_present
get "/admin/config/site_settings.json", params: { filter_names: ["set_locale_from_cookie"] }
get "/admin/config/site_settings.json", params: { filter_names: ["max_category_nesting"] }
expect(
response.parsed_body["site_settings"].find do |s|
s["setting"] == "set_locale_from_cookie"
end,
response.parsed_body["site_settings"].find { |s| s["setting"] == "max_category_nesting" },
).to be_nil
end

View File

@@ -25,9 +25,7 @@ RSpec.describe Admin::SiteSettingsController do
get "/admin/site_settings.json"
expect(response.status).to eq(200)
expect(
response.parsed_body["site_settings"].find do |s|
s["setting"] == "set_locale_from_cookie"
end,
response.parsed_body["site_settings"].find { |s| s["setting"] == "max_category_nesting" },
).to be_nil
end
end