summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locales/index.d.ts6
-rw-r--r--packages/frontend/src/pages/admin/moderation.vue13
-rw-r--r--sharkey-locales/en-US.yml6
3 files changed, 19 insertions, 6 deletions
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 2beb0ae454..4d9c6fb972 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -12970,11 +12970,11 @@ export interface Locale extends ILocale {
"text": string;
};
/**
- * Test word mutes
+ * Test patterns
*/
"wordMuteTestLabel": string;
/**
- * Enter some text here to test your word mute patterns. The matched words, if any, will be displayed below.
+ * Enter some text here to test your word patterns. The matched words, if any, will be displayed below.
*/
"wordMuteTestDescription": string;
/**
@@ -12990,7 +12990,7 @@ export interface Locale extends ILocale {
*/
"wordMuteTestNoResults": string;
/**
- * Text does not match any word mutes.
+ * Text does not match any patterns.
*/
"wordMuteTestNoMatch": string;
}
diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue
index 9675bdc21a..9ba256e89f 100644
--- a/packages/frontend/src/pages/admin/moderation.vue
+++ b/packages/frontend/src/pages/admin/moderation.vue
@@ -47,6 +47,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkTextarea v-model="trustedLinkUrlPatterns">
<template #caption>{{ i18n.ts.trustedLinkUrlPatternsDescription }}</template>
</MkTextarea>
+
+ <SkWordMuteTest :mutedWords="trustedLinkUrlPatterns"></SkWordMuteTest>
+
<MkButton primary @click="save_trustedLinkUrlPatterns">{{ i18n.ts.save }}</MkButton>
</div>
</MkFolder>
@@ -71,6 +74,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkTextarea v-model="sensitiveWords">
<template #caption>{{ i18n.ts.sensitiveWordsDescription }}<br>{{ i18n.ts.sensitiveWordsDescription2 }}</template>
</MkTextarea>
+
+ <SkWordMuteTest :mutedWords="sensitiveWords"></SkWordMuteTest>
+
<MkButton primary @click="save_sensitiveWords">{{ i18n.ts.save }}</MkButton>
</div>
</MkFolder>
@@ -83,6 +89,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkTextarea v-model="prohibitedWords">
<template #caption>{{ i18n.ts.prohibitedWordsDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
</MkTextarea>
+
+ <SkWordMuteTest :mutedWords="prohibitedWords"></SkWordMuteTest>
+
<MkButton primary @click="save_prohibitedWords">{{ i18n.ts.save }}</MkButton>
</div>
</MkFolder>
@@ -95,6 +104,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkTextarea v-model="prohibitedWordsForNameOfUser">
<template #caption>{{ i18n.ts.prohibitedWordsForNameOfUserDescription }}<br>{{ i18n.ts.prohibitedWordsDescription2 }}</template>
</MkTextarea>
+
+ <SkWordMuteTest :mutedWords="prohibitedWordsForNameOfUser"></SkWordMuteTest>
+
<MkButton primary @click="save_prohibitedWordsForNameOfUser">{{ i18n.ts.save }}</MkButton>
</div>
</MkFolder>
@@ -166,6 +178,7 @@ import { definePage } from '@/page.js';
import MkButton from '@/components/MkButton.vue';
import FormLink from '@/components/form/link.vue';
import MkFolder from '@/components/MkFolder.vue';
+import SkWordMuteTest from '@/components/SkWordMuteTest.vue';
const enableRegistration = ref<boolean>(false);
const emailRequiredForSignup = ref<boolean>(false);
diff --git a/sharkey-locales/en-US.yml b/sharkey-locales/en-US.yml
index a42486c4d1..cd18e2eeef 100644
--- a/sharkey-locales/en-US.yml
+++ b/sharkey-locales/en-US.yml
@@ -544,9 +544,9 @@ _confirmPollEdit:
title: Are you sure you want to edit this poll
text: Editing this poll will cause it to lose all previous votes
-wordMuteTestLabel: "Test word mutes"
-wordMuteTestDescription: "Enter some text here to test your word mute patterns. The matched words, if any, will be displayed below."
+wordMuteTestLabel: "Test patterns"
+wordMuteTestDescription: "Enter some text here to test your word patterns. The matched words, if any, will be displayed below."
wordMuteTestTest: "Test"
wordMuteTestMatch: "Matched words: {words}"
wordMuteTestNoResults: "No results yet, enter some text and click \"Test\" to check it."
-wordMuteTestNoMatch: "Text does not match any word mutes."
+wordMuteTestNoMatch: "Text does not match any patterns."