diff --git a/ui/src/hooks/useReportModal/index.tsx b/ui/src/hooks/useReportModal/index.tsx index 88b975f6..0424cfc4 100644 --- a/ui/src/hooks/useReportModal/index.tsx +++ b/ui/src/hooks/useReportModal/index.tsx @@ -187,6 +187,11 @@ const useReportModal = (callback?: () => void) => { } value={content.value} isInvalid={content.isInvalid} + placeholder={ + item.content_type === 'text' + ? t('input_placeholder') + : t('textarea_placeholder') + } onChange={(e) => setContent({ value: e.target.value, diff --git a/ui/src/i18n/locales/en.json b/ui/src/i18n/locales/en.json index a64aca32..8fcaf75d 100644 --- a/ui/src/i18n/locales/en.json +++ b/ui/src/i18n/locales/en.json @@ -199,7 +199,9 @@ }, "msg": { "empty": "Please select a reason." - } + }, + "input_placeholder": "Enter the existing question link", + "textarea_placeholder": "Let us know specifically what you are concerned about" }, "tag_modal": { "title": "Create New Tag", @@ -590,6 +592,8 @@ "edit": "edit", "Views": "Views", "answered": "answered", + "closed_in": "Closed in", + "show_exist": "Show existing question.", "answers": { "title": "Answers", "score": "Score", @@ -869,4 +873,4 @@ } } } -} \ No newline at end of file +} diff --git a/ui/src/pages/Questions/Detail/components/Alert/index.tsx b/ui/src/pages/Questions/Detail/components/Alert/index.tsx index 4b84c797..49cb428a 100644 --- a/ui/src/pages/Questions/Detail/components/Alert/index.tsx +++ b/ui/src/pages/Questions/Detail/components/Alert/index.tsx @@ -1,15 +1,44 @@ import { memo, FC } from 'react'; import { Alert } from 'react-bootstrap'; +import { useTranslation } from 'react-i18next'; + +import dayjs from 'dayjs'; interface Props { data; } const Index: FC = ({ data }) => { + const { t } = useTranslation(); return (
- {data.operation_msg} - {data.operation_description} + {data.operation_msg.indexOf('http') > -1 ? ( +

+ {data.operation_description} + + {t('question_detail.show_exist')} + +

+ ) : ( +

+ {data.operation_msg + ? data.operation_msg + : data.operation_description} +

+ )} +
+ {t('question_detail.closed_in')}{' '} + + . +
);