mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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:
@@ -3496,10 +3496,6 @@ en:
|
|||||||
## [Welcome to %{title}](#welcome)
|
## [Welcome to %{title}](#welcome)
|
||||||
An account is required. Please ask an existing member for an invite or log in to continue.
|
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"
|
deleted: "deleted"
|
||||||
|
|
||||||
image: "image"
|
image: "image"
|
||||||
|
|||||||
@@ -4,11 +4,7 @@ class MigrateTosSetting < ActiveRecord::Migration[4.2]
|
|||||||
def up
|
def up
|
||||||
res = execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")
|
res = execute("SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'")
|
||||||
if res.present? && res.cmd_tuples > 0
|
if res.present? && res.cmd_tuples > 0
|
||||||
label = nil
|
label = 'Terms of Service'
|
||||||
|
|
||||||
I18n.overrides_disabled do
|
|
||||||
label = I18n.t("terms_of_service.signup_form_message", base_path: "")
|
|
||||||
end
|
|
||||||
|
|
||||||
res = execute("SELECT value FROM site_texts WHERE text_type = 'tos_signup_form_message'")
|
res = execute("SELECT value FROM site_texts WHERE text_type = 'tos_signup_form_message'")
|
||||||
if res.present? && res.cmd_tuples == 1
|
if res.present? && res.cmd_tuples == 1
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
class FixTosName < ActiveRecord::Migration[4.2]
|
class FixTosName < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
I18n.overrides_disabled do
|
execute <<~SQL
|
||||||
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: ""))
|
UPDATE user_fields
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user