瀏覽代碼

:globe_with_meridians: 添加标签

visuddhinanda 2 年之前
父節點
當前提交
37d6a6ec11
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 6 1
      dashboard/src/components/corpus/ChapterAppendTag.tsx
  2. 1 0
      dashboard/src/locales/zh-Hans/buttons.ts

+ 6 - 1
dashboard/src/components/corpus/ChapterAppendTag.tsx

@@ -3,6 +3,7 @@ import { PlusOutlined } from "@ant-design/icons";
 
 import type { ChannelFilterProps } from "../channel/ChannelList";
 import ChapterTagList from "./ChapterTagList";
+import { useIntl } from "react-intl";
 
 interface IWidget {
   filter?: ChannelFilterProps;
@@ -19,6 +20,8 @@ const ChapterAppendTagWidget = ({
   tags = [],
   onTagClick,
 }: IWidget) => {
+  const intl = useIntl();
+
   return (
     <Popover
       content={
@@ -40,7 +43,9 @@ const ChapterAppendTagWidget = ({
       trigger="hover"
     >
       <Button type="dashed" icon={<PlusOutlined />}>
-        添加标签
+        {intl.formatMessage({
+          id: "buttons.add.tag",
+        })}
       </Button>
     </Popover>
   );

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

@@ -45,6 +45,7 @@ const items = {
   "buttons.more": "更多",
   "buttons.import": "导入",
   "buttons.export": "导出",
+  "buttons.add.tag": "添加标签",
 };
 
 export default items;