mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Translate the action type in watched words regex error (#13680)
Previously we were using the untranslated key from the code
This commit is contained in:
@@ -233,7 +233,8 @@ class AdminDashboardData
|
||||
begin
|
||||
WordWatcher.word_matcher_regexp(action, raise_errors: true)
|
||||
rescue RegexpError => e
|
||||
return I18n.t('dashboard.watched_word_regexp_error', base_path: Discourse.base_path, action: action)
|
||||
translated_action = I18n.t("admin_js.admin.watched_words.actions.#{action}")
|
||||
I18n.t('dashboard.watched_word_regexp_error', base_path: Discourse.base_path, action: translated_action)
|
||||
end
|
||||
end
|
||||
nil
|
||||
|
||||
Reference in New Issue
Block a user