mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 12:13:58 -06:00
Copy welcome_message
translation override to welcome_message_invite_only
(#6949)
This commit copies `login_required.welcome_message` translation override to `login_required.welcome_message_invite_only` if the `login_required.welcome_message_invite_only` override is blank. This is done so as to ensure that login page customization remains same after [this commit](93eb0a0690
).
This commit is contained in:
parent
7e4edcfae8
commit
244628ed98
@ -0,0 +1,11 @@
|
||||
class CopyLoginRequiredWelcomeMessage < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
execute <<~SQL
|
||||
INSERT INTO translation_overrides (locale, translation_key, value, created_at, updated_at)
|
||||
SELECT locale, 'login_required.welcome_message_invite_only', value, created_at, updated_at
|
||||
FROM translation_overrides
|
||||
WHERE translation_key = 'login_required.welcome_message'
|
||||
AND NOT EXISTS (SELECT 1 FROM translation_overrides WHERE translation_key = 'login_required.welcome_message_invite_only');
|
||||
SQL
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user