mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
Remove unused translations
The migration for the ToS signup field happend in 2014. Everyone who hasn't updated yet needs to live with the English text "Terms of Service". There's no need to keep these unused translations forever.
This commit is contained in:
parent
58f72cd439
commit
98a17edc90
@ -3496,10 +3496,6 @@ en:
|
||||
## [Welcome to %{title}](#welcome)
|
||||
An account is required. Please ask an existing member for an invite or log in to continue.
|
||||
|
||||
terms_of_service:
|
||||
title: "Terms of Service"
|
||||
signup_form_message: 'I have read and accept the <a href="%{base_path}/tos" target="_blank">Terms of Service</a>.'
|
||||
|
||||
deleted: "deleted"
|
||||
|
||||
image: "image"
|
||||
|
@ -4,11 +4,7 @@ class MigrateTosSetting < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
res = execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")
|
||||
if res.present? && res.cmd_tuples > 0
|
||||
label = nil
|
||||
|
||||
I18n.overrides_disabled do
|
||||
label = I18n.t("terms_of_service.signup_form_message", base_path: "")
|
||||
end
|
||||
label = 'Terms of Service'
|
||||
|
||||
res = execute("SELECT value FROM site_texts WHERE text_type = 'tos_signup_form_message'")
|
||||
if res.present? && res.cmd_tuples == 1
|
||||
|
@ -2,9 +2,10 @@
|
||||
|
||||
class FixTosName < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
I18n.overrides_disabled do
|
||||
execute DB.sql_fragment('UPDATE user_fields SET name = ? WHERE name = ?', I18n.t('terms_of_service.title'), I18n.t("terms_of_service.signup_form_message", base_path: ""))
|
||||
end
|
||||
|
||||
execute <<~SQL
|
||||
UPDATE user_fields
|
||||
SET name = 'Terms of Service'
|
||||
WHERE name = 'I have read and accept the <a href="/tos" target="_blank">Terms of Service</a>.'
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user