diff --git a/app/serializers/reviewable_score_serializer.rb b/app/serializers/reviewable_score_serializer.rb index 143239b0fa3..a16bd752c83 100644 --- a/app/serializers/reviewable_score_serializer.rb +++ b/app/serializers/reviewable_score_serializer.rb @@ -6,7 +6,7 @@ class ReviewableScoreSerializer < ApplicationSerializer trust_level: 'approve_unless_trust_level', new_topics_unless_trust_level: 'approve_new_topics_unless_trust_level', fast_typer: 'min_first_post_typing_time', - auto_silence_regexp: 'auto_silence_first_post_regex', + auto_silence_regex: 'auto_silence_first_post_regex', staged: 'approve_unless_staged', must_approve_users: 'must_approve_users', invite_only: 'invite_only', @@ -40,11 +40,12 @@ class ReviewableScoreSerializer < ApplicationSerializer text = I18n.t("reviewables.reasons.#{object.reason}", link: link, default: nil) else text = I18n.t("reviewables.reasons.#{object.reason}", default: nil) + # TODO(roman): Remove after the 2.8 release. # The discourse-antivirus and akismet plugins still use the backtick format for settings. # It'll be hard to migrate them to the new format without breaking backwards compatibility, so I'm keeping the old behavior for now. # Will remove after the 2.8 release. - linkify_backticks(object.reason, text) + linkify_backticks(object.reason, text) if text end text diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 8c93681396a..84dbbcd459f 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -5001,7 +5001,7 @@ en: trust_level: "Users at low trust levels must have replies approved by staff. See %{link}." new_topics_unless_trust_level: "Users at low trust levels must have topics approved by staff. See %{link}." fast_typer: "New user typed their first post suspiciously fast, suspected bot or spammer behavior. See %{link}." - auto_silence_regexp: "New user whose first post matches the %{link} setting." + auto_silence_regex: "New user whose first post matches the %{link} setting." watched_word: "This post included a Watched Word. See your %{link}." staged: "New topics and posts for staged users must be approved by staff. See %{link}." category: "Posts in this category require manual approval by staff. See the %{link}." diff --git a/spec/serializers/reviewable_score_serializer_spec.rb b/spec/serializers/reviewable_score_serializer_spec.rb index 8c82085ea4a..50f6a91118a 100644 --- a/spec/serializers/reviewable_score_serializer_spec.rb +++ b/spec/serializers/reviewable_score_serializer_spec.rb @@ -29,7 +29,7 @@ describe ReviewableScoreSerializer do context 'site setting links' do reasons = %w[ - post_count trust_level new_topics_unless_trust_level fast_typer auto_silence_regexp + post_count trust_level new_topics_unless_trust_level fast_typer auto_silence_regex staged must_approve_users invite_only email_spam suspect_user contains_media ]