mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user