Ver Fonte

add buttons.got.it

visuddhinanda há 2 anos atrás
pai
commit
7333986dab

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

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

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

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