Просмотр исходного кода

:globe_with_meridians: 此工作室的 协作

visuddhinanda 2 лет назад
Родитель
Сommit
74d2b1f575

+ 3 - 3
dashboard/src/components/anthology/AnthologyList.tsx

@@ -353,7 +353,7 @@ const AnthologyListWidget = ({
                 key: "my",
                 label: (
                   <span>
-                    此工作室的
+                    {intl.formatMessage({ id: "labels.this-studio" })}
                     {renderBadge(myNumber, activeKey === "my")}
                   </span>
                 ),
@@ -362,7 +362,7 @@ const AnthologyListWidget = ({
                 key: "collaboration",
                 label: (
                   <span>
-                    协作
+                    {intl.formatMessage({ id: "labels.collaboration" })}
                     {renderBadge(
                       collaborationNumber,
                       activeKey === "collaboration"
@@ -383,7 +383,7 @@ const AnthologyListWidget = ({
       <Modal
         destroyOnClose={true}
         width={700}
-        title="协作"
+        title={intl.formatMessage({ id: "labels.collaboration" })}
         open={isModalOpen}
         onOk={handleOk}
         onCancel={handleCancel}

+ 3 - 3
dashboard/src/components/article/ArticleList.tsx

@@ -507,7 +507,7 @@ const ArticleListWidget = ({
                 key: "my",
                 label: (
                   <span>
-                    此工作室的
+                    {intl.formatMessage({ id: "labels.this-studio" })}
                     {renderBadge(myNumber, activeKey === "my")}
                   </span>
                 ),
@@ -516,7 +516,7 @@ const ArticleListWidget = ({
                 key: "collaboration",
                 label: (
                   <span>
-                    协作
+                    {intl.formatMessage({ id: "labels.collaboration" })}
                     {renderBadge(
                       collaborationNumber,
                       activeKey === "collaboration"
@@ -538,7 +538,7 @@ const ArticleListWidget = ({
       <Modal
         destroyOnClose={true}
         width={700}
-        title="协作"
+        title={intl.formatMessage({ id: "labels.collaboration" })}
         open={isModalOpen}
         onOk={handleOk}
         onCancel={handleCancel}

+ 2 - 2
dashboard/src/components/channel/ChannelTable.tsx

@@ -513,7 +513,7 @@ const ChannelTableWidget = ({
                 key: "my",
                 label: (
                   <span>
-                    此工作室的
+                    {intl.formatMessage({ id: "labels.this-studio" })}
                     {renderBadge(myNumber, activeKey === "my")}
                   </span>
                 ),
@@ -522,7 +522,7 @@ const ChannelTableWidget = ({
                 key: "collaboration",
                 label: (
                   <span>
-                    协作
+                    {intl.formatMessage({ id: "labels.collaboration" })}
                     {renderBadge(
                       collaborationNumber,
                       activeKey === "collaboration"

+ 3 - 1
dashboard/src/components/share/ShareModal.tsx

@@ -1,6 +1,7 @@
 import { useState } from "react";
 import { Modal } from "antd";
 import Share, { EResType } from "./Share";
+import { useIntl } from "react-intl";
 
 interface IWidget {
   resId: string;
@@ -9,6 +10,7 @@ interface IWidget {
 }
 const ShareModalWidget = ({ resId, resType, trigger }: IWidget) => {
   const [isModalOpen, setIsModalOpen] = useState(false);
+  const intl = useIntl();
   const showModal = () => {
     setIsModalOpen(true);
   };
@@ -27,7 +29,7 @@ const ShareModalWidget = ({ resId, resType, trigger }: IWidget) => {
       <Modal
         destroyOnClose={true}
         width={700}
-        title="协作"
+        title={intl.formatMessage({ id: "labels.collaboration" })}
         open={isModalOpen}
         onOk={handleOk}
         onCancel={handleCancel}

+ 1 - 1
dashboard/src/components/studio/LeftSider.tsx

@@ -165,7 +165,7 @@ const LeftSiderWidget = ({ selectedKeys = "" }: IWidgetHeadBar) => {
       ],
     },
     {
-      label: "协作",
+      label: intl.formatMessage({ id: "labels.collaboration" }),
       key: "collaboration",
       icon: <TeamOutlined />,
       children: [

+ 2 - 0
dashboard/src/locales/en-US/label.ts

@@ -7,6 +7,7 @@ const items = {
   "labels.week.5": "Fri",
   "labels.week.6": "Sat",
   "labels.collaborators": "collaborators",
+  "labels.collaboration": "collaboration",
   "labels.link": "link",
   "labels.upload": "upload",
   "labels.first-term": "first term",
@@ -39,6 +40,7 @@ const items = {
   "labels.software.edition.basic": "basic",
   "labels.software.edition.pro": "pro",
   "labels.table-of-content": "table of content",
+  "labels.this-studio": "this studio",
 };
 
 export default items;

+ 2 - 0
dashboard/src/locales/zh-Hans/label.ts

@@ -7,6 +7,7 @@ const items = {
   "labels.week.5": "星期五",
   "labels.week.6": "星期六",
   "labels.collaborators": "协作者",
+  "labels.collaboration": "协作",
   "labels.link": "链接",
   "labels.upload": "上传",
   "labels.first-term": "第一个术语",
@@ -44,6 +45,7 @@ const items = {
   "labels.software.edition.basic": "基本版",
   "labels.software.edition.pro": "增强版",
   "labels.table-of-content": "目录",
+  "labels.this-studio": "此工作室",
 };
 
 export default items;

+ 2 - 2
dashboard/src/pages/studio/group/list.tsx

@@ -293,7 +293,7 @@ const Widget = () => {
                 key: "my",
                 label: (
                   <span>
-                    此工作室的
+                    {intl.formatMessage({ id: "labels.this-studio" })}
                     {renderBadge(myNumber, activeKey === "my")}
                   </span>
                 ),
@@ -302,7 +302,7 @@ const Widget = () => {
                 key: "collaboration",
                 label: (
                   <span>
-                    我加入的
+                    {intl.formatMessage({ id: "labels.collaboration" })}
                     {renderBadge(
                       collaborationNumber,
                       activeKey === "collaboration"