Skip to content

A platform for community discussion. Free, open, simple.

FIX: Add translation string for clear all watched words (#12336)

Bianca Nenciu990a26d14ba9
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-watched-words-action.js b/app/assets/javascripts/admin/addon/controllers/admin-watched-words-action.js
index 1daa8a6ec39..0d0f020ec61 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-watched-words-action.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-watched-words-action.js
@@ -90,7 +90,9 @@ export default Controller.extend({
clearAll() {
const actionKey = this.actionNameKey;
bootbox.confirm(
- I18n.t(`admin.watched_words.clear_all_confirm_${actionKey}`),
+ I18n.t("admin.watched_words.clear_all_confirm", {
+ action: I18n.t("admin.watched_words.actions." + actionKey),
+ }),
I18n.t("no_value"),
I18n.t("yes_value"),
(result) => {
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 753c0dd6455..441285dab82 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -4647,10 +4647,7 @@ en:
other: "show %{count} words"
download: Download
clear_all: Clear All
- clear_all_confirm_block: "Are you sure you want to clear all watched words for the Block action?"
- clear_all_confirm_censor: "Are you sure you want to clear all watched words for the Censor action?"
- clear_all_confirm_flag: "Are you sure you want to clear all watched words for the Flag action?"
- clear_all_confirm_require_approval: "Are you sure you want to clear all watched words for the Require Approval action?"
+ clear_all_confirm: "Are you sure you want to clear all watched words for the %{action} action?"
actions:
block: "Block"
censor: "Censor"