Dinesht04 commented on code in PR #1403:
URL: https://github.com/apache/answer/pull/1403#discussion_r2447702745


##########
ui/src/pages/Questions/Ask/index.tsx:
##########
@@ -423,6 +425,24 @@ const Ask = () => {
   usePageTags({
     title: pageTitle,
   });
+
+  const handleContentHint = () => {
+    if (
+      !writeInfo ||
+      writeInfo.min_content === undefined ||
+      !writeInfo.min_content
+    ) {
+      return t(`form.fields.body.hint.optional_body`);
+    }
+
+    let str: string = t(`form.fields.body.hint.minimum_characters`);
+    str = str.replace(
+      `{{ min_content_length }}`,
+      writeInfo.min_content.toString(),
+    );
+    return str;

Review Comment:
   Thank you for pointing this out, I didn't know that we can pass variables in 
the i18n function 😅



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to