ソースを参照

Merge pull request #1667 from visuddhinanda/agile

修改建议文本比对用div包裹
visuddhinanda 2 年 前
コミット
e8d8b0faef

+ 4 - 2
dashboard/src/components/general/TextDiff.tsx

@@ -30,9 +30,11 @@ const TextDiffWidget = ({
         );
       });
       return showToolTip ? (
-        <Tooltip title={content}>{diffResult}</Tooltip>
+        <Tooltip title={content}>
+          <div>{diffResult}</div>
+        </Tooltip>
       ) : (
-        <> {diffResult}</>
+        <div> {diffResult}</div>
       );
     } else {
       return <Text>{content}</Text>;

+ 5 - 1
dashboard/src/components/template/SentEdit/SuggestionBox.tsx

@@ -7,6 +7,7 @@ import { ISentence } from "../SentEdit";
 import Marked from "../../general/Marked";
 import { useAppSelector } from "../../../hooks";
 import { message } from "../../../reducers/discussion";
+import { useIntl } from "react-intl";
 
 interface ISuggestionWidget {
   data: ISentence;
@@ -23,6 +24,7 @@ const Suggestion = ({
   onPrChange,
 }: ISuggestionWidget) => {
   const [reload, setReload] = useState(false);
+  const intl = useIntl();
 
   return (
     <Space direction="vertical" style={{ width: "100%" }}>
@@ -47,7 +49,9 @@ const Suggestion = ({
                 }
               }}
             >
-              知道了
+              {intl.formatMessage({
+                id: "buttons.got.it",
+              })}
             </Button>
           }
           closable

+ 1 - 0
dashboard/src/locales/zh-Hans/buttons.ts

@@ -74,6 +74,7 @@ const items = {
   "buttons.accept": "接受",
   "buttons.refuse": "拒绝",
   "buttons.use.as.guest": "以访客身份继续使用",
+  "buttons.got.it": "知道了",
 };
 
 export default items;