FIX: add missing translations for staff action logs. (#26969)

The watched word group's create, update and delete action logs were missing the translations. This PR will add those strings and will use the group key instead of watched word key where needed.
This commit is contained in:
Vinoth Kannan
2024-05-10 23:11:56 +08:00
committed by GitHub
parent 3f788e4de8
commit 4e22b505c5
4 changed files with 20 additions and 3 deletions

View File

@ -37,13 +37,15 @@ class Admin::WatchedWordsController < Admin::StaffController
raise Discourse::InvalidParameters.new(:id) unless watched_word
watched_word_group = watched_word.watched_word_group
if watched_word_group&.watched_words&.count == 1
watched_word_group.destroy!
StaffActionLogger.new(current_user).log_watched_words_deletion(watched_word_group)
else
watched_word.destroy!
StaffActionLogger.new(current_user).log_watched_words_deletion(watched_word)
end
StaffActionLogger.new(current_user).log_watched_words_deletion(watched_word)
render json: success_json
end