Browse Source

:globe_with_meridians: 更多

visuddhinanda 2 years ago
parent
commit
0f51271113

+ 1 - 1
dashboard/src/components/corpus/ChapterInChannel.tsx

@@ -131,7 +131,7 @@ const ChapterInChannelWidget = ({
               setOpen(true);
             }}
           >
-            更多
+            {intl.formatMessage({ id: "buttons.more" })}
           </Button>
         </div>
         <Modal

+ 1 - 1
dashboard/src/components/corpus/Recent.tsx

@@ -56,7 +56,7 @@ const RecentWidget = () => {
           );
         }}
       />
-      <Button type="link">更多</Button>
+      <Button type="link">{intl.formatMessage({ id: "buttons.more" })}</Button>
     </div>
   );
 };

+ 8 - 2
dashboard/src/components/home/ChapterNew.tsx

@@ -2,8 +2,10 @@ import { Col, Row } from "antd";
 import { Link } from "react-router-dom";
 import img_book from "../../assets/library/images/books.svg";
 import ChapterNewList from "./ChapterNewList";
+import { useIntl } from "react-intl";
 
 const ChapterNewWidget = () => {
+  const intl = useIntl();
   return (
     <Row
       style={{
@@ -21,9 +23,13 @@ const ChapterNewWidget = () => {
         }}
       >
         <div style={{ flex: 4, margin: "2em" }}>
-          <span style={{ fontSize: "250%", fontWeight: 700 }}>圣典</span>
+          <span style={{ fontSize: "250%", fontWeight: 700 }}>
+            {intl.formatMessage({ id: "columns.library.community.title" })}
+          </span>
           <span style={{ position: "absolute", right: 30, bottom: 0 }}>
-            <Link to="community/list">更多</Link>
+            <Link to="community/list">
+              {intl.formatMessage({ id: "buttons.more" })}
+            </Link>
           </span>
         </div>
         <div style={{ flex: 9 }}>

+ 5 - 1
dashboard/src/components/home/CourseNew.tsx

@@ -2,8 +2,10 @@ import { Col, Row } from "antd";
 import { Link } from "react-router-dom";
 import img_book from "../../assets/library/images/teachers.svg";
 import CourseNewList from "./CourseNewList";
+import { useIntl } from "react-intl";
 
 const CourseNewWidget = () => {
+  const intl = useIntl(); //i18n
   return (
     <Row
       style={{
@@ -29,7 +31,9 @@ const CourseNewWidget = () => {
             课程
           </span>
           <span style={{ position: "absolute", right: 30, bottom: 0 }}>
-            <Link to="course/list">更多</Link>
+            <Link to="course/list">
+              {intl.formatMessage({ id: "buttons.more" })}
+            </Link>
           </span>
         </div>
       </Col>

+ 1 - 1
dashboard/src/components/template/Wbw/WbwDetailFm.tsx

@@ -148,7 +148,7 @@ const WbwFactorMeaningItem = ({ pali, meaning = "", onChange }: IWFMI) => {
           ...items.filter((value, index) => index <= 5),
           {
             key: "more",
-            label: "更多",
+            label: intl.formatMessage({ id: "buttons.more" }),
             disabled: items.length <= 5,
             children: items.filter((value, index) => index > 5),
           },

+ 1 - 1
dashboard/src/components/template/Wbw/WbwFactorMeaning.tsx

@@ -103,7 +103,7 @@ const WbwFactorMeaningWidget = ({
                 ...items.filter((value, index) => index <= 5),
                 {
                   key: "more",
-                  label: "更多",
+                  label: intl.formatMessage({ id: "buttons.more" }),
                   children: items.filter((value, index) => index > 5),
                 },
               ],