Beautify/elaborate comment spam-check message

This commit is contained in:
infinite-persistence 2021-07-15 15:09:18 +08:00 committed by Thomas Zarebczan
parent 26e2dc16ec
commit 76a6c0441c
2 changed files with 4 additions and 0 deletions

View file

@ -1453,6 +1453,7 @@
"Unable to comment. This channel has blocked you.": "Unable to comment. This channel has blocked you.", "Unable to comment. This channel has blocked you.": "Unable to comment. This channel has blocked you.",
"Unable to comment. Your channel has been blocked by an admin.": "Unable to comment. Your channel has been blocked by an admin.", "Unable to comment. Your channel has been blocked by an admin.": "Unable to comment. Your channel has been blocked by an admin.",
"Unable to comment. The content owner has disabled comments.": "Unable to comment. The content owner has disabled comments.", "Unable to comment. The content owner has disabled comments.": "Unable to comment. The content owner has disabled comments.",
"Please do not spam.": "Please do not spam.",
"Slow mode is on. Please wait up to %value% seconds before commenting again.": "Slow mode is on. Please wait up to %value% seconds before commenting again.", "Slow mode is on. Please wait up to %value% seconds before commenting again.": "Slow mode is on. Please wait up to %value% seconds before commenting again.",
"The comment contains contents that are blocked by %author%": "The comment contains contents that are blocked by %author%", "The comment contains contents that are blocked by %author%": "The comment contains contents that are blocked by %author%",
"Your channel is still being setup, try again in a few moments.": "Your channel is still being setup, try again in a few moments.", "Your channel is still being setup, try again in a few moments.": "Your channel is still being setup, try again in a few moments.",

View file

@ -470,6 +470,9 @@ export function doCommentCreate(
case 'comments are disabled by the creator': case 'comments are disabled by the creator':
toastMessage = __('Unable to comment. The content owner has disabled comments.'); toastMessage = __('Unable to comment. The content owner has disabled comments.');
break; break;
case 'duplicate comment!':
toastMessage = __('Please do not spam.');
break;
default: default:
const BLOCKED_WORDS_ERR_MSG = 'the comment contents are blocked by'; const BLOCKED_WORDS_ERR_MSG = 'the comment contents are blocked by';
const SLOW_MODE_PARTIAL_ERR_MSG = 'Slow mode is on. Please wait at most'; const SLOW_MODE_PARTIAL_ERR_MSG = 'Slow mode is on. Please wait at most';