mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 09:16:52 +08:00
This PR takes the localization features out of "experimental" to prep for the announcement - rename settings and gives them its own area - `experimental_content_localization` to `content_localization_enabled` - `experimental_content_localization_allowed_groups` to `content_localization_allowed_groups` - `experimental_content_localization_supported_locales` to `content_localization_supported_locales` - `experimental_anon_language_switcher` to `content_localization_anon_language_switcher` - migration - related to https://github.com/discourse/discourse-ai/pull/1439 | screenshot 📸 | |---| | <img width="964" alt="Screenshot 2025-06-17 at 5 06 32 PM" src="https://github.com/user-attachments/assets/9a8b2c38-c846-4fc9-8ddd-815c45cc3d0e" /> |
14 lines
772 B
Ruby
14 lines
772 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RemoveExperimentalFromContentLocalizationSettings < ActiveRecord::Migration[7.2]
|
|
def up
|
|
execute "UPDATE site_settings SET name = 'content_localization_enabled' WHERE name = 'experimental_content_localization'"
|
|
execute "UPDATE site_settings SET name = 'content_localization_allowed_groups' WHERE name = 'experimental_content_localization_allowed_groups'"
|
|
execute "UPDATE site_settings SET name = 'content_localization_supported_locales' WHERE name = 'experimental_content_localization_supported_locales'"
|
|
execute "UPDATE site_settings SET name = 'content_localization_anon_language_switcher' WHERE name = 'experimental_anon_language_switcher'"
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|