From d3a5156e6635d6c33c42d12f4dc205646907cddd Mon Sep 17 00:00:00 2001 From: Ted Johansson Date: Wed, 30 Aug 2023 10:51:32 +0800 Subject: [PATCH] DEV: Move 'ignore and delete' action under 'ignore' menu for chat flags (#23304) This moves the "delete message" action (if it is available) of a flagged chat message under the "ignore" menu. This puts it on par with the menu for flagged posts. --- plugins/chat/app/models/chat/reviewable_message.rb | 6 ++++-- plugins/chat/config/locales/server.en.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/chat/app/models/chat/reviewable_message.rb b/plugins/chat/app/models/chat/reviewable_message.rb index a7a0b4713e1..3110f1de73b 100644 --- a/plugins/chat/app/models/chat/reviewable_message.rb +++ b/plugins/chat/app/models/chat/reviewable_message.rb @@ -73,10 +73,12 @@ module Chat ) end - build_action(actions, :ignore, icon: "external-link-alt") + ignore_bundle = actions.add_bundle("#{id}-ignore", label: "reviewables.actions.ignore.title") + + build_action(actions, :ignore, icon: "external-link-alt", bundle: ignore_bundle) unless chat_message.deleted_at? - build_action(actions, :delete_and_agree, icon: "far-trash-alt") + build_action(actions, :delete_and_agree, icon: "far-trash-alt", bundle: ignore_bundle) end end diff --git a/plugins/chat/config/locales/server.en.yml b/plugins/chat/config/locales/server.en.yml index 5cc41a2630f..8bc91884364 100644 --- a/plugins/chat/config/locales/server.en.yml +++ b/plugins/chat/config/locales/server.en.yml @@ -114,14 +114,16 @@ en: title: "Delete Message" description: "Delete the message so that users cannot see it." delete_and_agree: - title: "Delete Message" + title: "Ignore Flag and Delete Message" + description: "Ignore the flag by removing it from the queue and delete the message." disagree_and_restore: title: "Disagree and Restore Message" description: "Restore the message so that all users can see it." disagree: title: "Disagree" ignore: - title: "Ignore" + title: "Do Nothing" + description: "Ignore the flag by removing it from the queue without taking any action." direct_messages: transcript_title: "Transcript of previous messages in %{channel_name}" transcript_body: "To give you more context, we included a transcript of the previous messages in this conversation (up to ten):\n\n%{transcript}"