From 90486b7454cca346df7344becf518580bc55b950 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Wed, 16 Jul 2025 21:11:58 +0500 Subject: [PATCH] fix: fixed translation issue --- .../post-comments/comments/comment/CommentEditor.jsx | 6 +++--- src/discussions/post-comments/messages.js | 10 ++++++++++ src/discussions/posts/post-editor/PostEditor.jsx | 6 +++--- src/discussions/posts/post-editor/messages.js | 10 ++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/discussions/post-comments/comments/comment/CommentEditor.jsx b/src/discussions/post-comments/comments/comment/CommentEditor.jsx index dcbb1ac8..57eff2c0 100644 --- a/src/discussions/post-comments/comments/comment/CommentEditor.jsx +++ b/src/discussions/post-comments/comments/comment/CommentEditor.jsx @@ -57,7 +57,7 @@ const CommentEditor = ({ const shouldRequireCaptcha = !id && captchaSettings.enabled; const captchaValidation = { - recaptchaToken: Yup.string().required('Please complete the CAPTCHA verification'), + recaptchaToken: Yup.string().required(intl.formatMessage(messages.captchaVerificationLabel)), }; const canDisplayEditReason = (edit @@ -112,7 +112,7 @@ const CommentEditor = ({ const saveUpdatedComment = useCallback(async (values, { resetForm, setFieldError }) => { // Validate CAPTCHA for new comments from non-staff users if (shouldRequireCaptcha && !values.recaptchaToken) { - setFieldError('recaptchaToken', 'Please complete the CAPTCHA verification'); + setFieldError('recaptchaToken', intl.formatMessage(messages.captchaVerificationLabel)); return; } @@ -244,7 +244,7 @@ const CommentEditor = ({ })} > - Verify you are human + {intl.formatMessage(messages.verifyHumanLabel)}
{ @@ -182,7 +182,7 @@ const PostEditor = ({ const submitForm = useCallback(async (values, { resetForm, setFieldError }) => { // Validate CAPTCHA for new posts from non-staff users if (shouldRequireCaptcha && !values.recaptchaToken) { - setFieldError('recaptchaToken', 'Please complete the CAPTCHA verification'); + setFieldError('recaptchaToken', intl.formatMessage(messages.captchaVerificationLabel)); return; } @@ -540,7 +540,7 @@ const PostEditor = ({ })} > - Verify you are human + {intl.formatMessage(messages.verifyHumanLabel)}