Skip to content

Let's use AI to Earn!

多语言

daoyian714270f98113
diff --git a/@types/resources.d.ts b/@types/resources.d.ts
index 29908558..ec0eed52 100644
--- a/@types/resources.d.ts
+++ b/@types/resources.d.ts
@@ -23,6 +23,10 @@ interface Resources {
"disabled": "禁用",
"unknownPlatform": "未知平台",
"unknownAccount": "未知账户",
+ "addAccountModal": {
+ "title": "账号添加",
+ "subtitle": "选择平台添加账号"
+ },
"facebookPages": {
"title": "选择Facebook页面",
"selectAll": "全选",
@@ -159,6 +163,11 @@ interface Resources {
"material": "素材通知",
"other": "其他通知"
},
+ "header": {
+ "messages": "消息通知",
+ "materialLibrary": "素材库",
+ "draftBox": "草稿箱"
+ },
"websit": {
"termsOfService": {
"title": "用户协议",
@@ -843,6 +852,10 @@ interface Resources {
"backToLibraryGroups": "返回素材库组",
"noLibraryItems": "该组暂无素材",
"selectLibrarySuccess": "素材已应用"
+ },
+ "actions": {
+ "selectMaterial": "选择素材",
+ "selectDraft": "选择草稿"
}
},
"route": {
diff --git a/src/app/[lng]/accounts/components/AddAccountModal/index.tsx b/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
index de403015..8d4e5f7d 100644
--- a/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
+++ b/src/app/[lng]/accounts/components/AddAccountModal/index.tsx
@@ -3,6 +3,7 @@ import styles from "./AddAccountModal.module.scss";
import { Button, Modal, Tooltip } from "antd";
import { AccountPlatInfoArr, PlatType } from "@/app/config/platConfig";
import { SocialAccount } from "@/api/types/account.type";
+import { useTransClient } from "@/app/i18n/client";
import { kwaiSkip } from "@/app/[lng]/accounts/plat/kwaiLogin";
import { bilibiliSkip } from "../../plat/BilibiliLogin";
import { youtubeSkip } from "../../plat/YoutubeLogin";
@@ -28,6 +29,7 @@ const AddAccountModal = memo(
{ open, onClose, onAddSuccess }: IAddAccountModalProps,
ref: ForwardedRef<IAddAccountModalRef>,
) => {
+ const { t } = useTransClient('account');
const [showFacebookPagesModal, setShowFacebookPagesModal] = useState(false);
const handleOk = () => {
@@ -53,7 +55,7 @@ const AddAccountModal = memo(
return (
<>
<Modal
- title="账号添加"
+ title={t('addAccountModal.title')}
open={open}
onOk={handleOk}
onCancel={handleCancel}
@@ -61,7 +63,7 @@ const AddAccountModal = memo(
width={650}
>
<div className={styles.addAccountModal}>
- <h1>选择平台添加账号</h1>
+ <h1>{t('addAccountModal.subtitle')}</h1>
<div className="addAccountModal_plats">
{AccountPlatInfoArr.map(([key, value]) => {
return (
diff --git a/src/app/i18n/locales/en/account.json b/src/app/i18n/locales/en/account.json
index c64e0d56..2b02bcf3 100644
--- a/src/app/i18n/locales/en/account.json
+++ b/src/app/i18n/locales/en/account.json
@@ -22,6 +22,10 @@
"disabled": "Disabled",
"unknownPlatform": "Unknown Platform",
"unknownAccount": "Unknown Account",
+ "addAccountModal": {
+ "title": "Add Account",
+ "subtitle": "Select Platform"
+ },
"facebookPages": {
"title": "Select Facebook Pages",
"selectAll": "Select All",
diff --git a/src/app/i18n/locales/en/common.json b/src/app/i18n/locales/en/common.json
index 5b0342e9..96549bbb 100644
--- a/src/app/i18n/locales/en/common.json
+++ b/src/app/i18n/locales/en/common.json
@@ -25,6 +25,11 @@
"material": "Material Notification",
"other": "Other Notification"
},
+ "header": {
+ "messages": "Messages",
+ "materialLibrary": "Material Library",
+ "draftBox": "Draft Box"
+ },
"websit": {
"termsOfService": {
"title": "Terms of Service",
diff --git a/src/app/i18n/locales/en/publish.json b/src/app/i18n/locales/en/publish.json
index ff8747f7..ff3638e8 100644
--- a/src/app/i18n/locales/en/publish.json
+++ b/src/app/i18n/locales/en/publish.json
@@ -89,5 +89,9 @@
"backToLibraryGroups": "Back to Library Groups",
"noLibraryItems": "No Materials in This Group",
"selectLibrarySuccess": "Material Applied"
+ },
+ "actions": {
+ "selectMaterial": "Select Material",
+ "selectDraft": "Select Draft"
}
}
\ No newline at end of file
diff --git a/src/app/i18n/locales/zh-CN/account.json b/src/app/i18n/locales/zh-CN/account.json
index 632ffe8a..9c600183 100644
--- a/src/app/i18n/locales/zh-CN/account.json
+++ b/src/app/i18n/locales/zh-CN/account.json
@@ -22,6 +22,10 @@
"disabled": "禁用",
"unknownPlatform": "未知平台",
"unknownAccount": "未知账户",
+ "addAccountModal": {
+ "title": "账号添加",
+ "subtitle": "选择平台添加账号"
+ },
"facebookPages": {
"title": "选择Facebook页面",
"selectAll": "全选",
diff --git a/src/app/i18n/locales/zh-CN/common.json b/src/app/i18n/locales/zh-CN/common.json
index aba15c26..edc74e8c 100644
--- a/src/app/i18n/locales/zh-CN/common.json
+++ b/src/app/i18n/locales/zh-CN/common.json
@@ -25,6 +25,11 @@
"material": "素材通知",
"other": "其他通知"
},
+ "header": {
+ "messages": "消息通知",
+ "materialLibrary": "素材库",
+ "draftBox": "草稿箱"
+ },
"websit": {
"termsOfService": {
"title": "用户协议",
diff --git a/src/app/i18n/locales/zh-CN/publish.json b/src/app/i18n/locales/zh-CN/publish.json
index d15545b8..c4db69e7 100644
--- a/src/app/i18n/locales/zh-CN/publish.json
+++ b/src/app/i18n/locales/zh-CN/publish.json
@@ -89,5 +89,9 @@
"backToLibraryGroups": "返回素材库组",
"noLibraryItems": "该组暂无素材",
"selectLibrarySuccess": "素材已应用"
+ },
+ "actions": {
+ "selectMaterial": "选择素材",
+ "selectDraft": "选择草稿"
}
}
\ No newline at end of file
diff --git a/src/app/layout/LyaoutHeader.tsx b/src/app/layout/LyaoutHeader.tsx
index 26df0231..fe47d365 100644
--- a/src/app/layout/LyaoutHeader.tsx
+++ b/src/app/layout/LyaoutHeader.tsx
@@ -50,7 +50,7 @@ function UserInfo() {
router.push("/notification");
}}
>
- 消息通知
+ {t("header.messages")}
</div>
),
},
@@ -62,7 +62,7 @@ function UserInfo() {
router.push("/material");
}}
>
- 素材库
+ {t("header.materialLibrary")}
</div>
),
},
@@ -74,7 +74,7 @@ function UserInfo() {
router.push("/cgmaterial");
}}
>
- 草稿箱
+ {t("header.draftBox")}
</div>
),
},
@@ -100,7 +100,7 @@ function UserInfo() {
<Image
className={styles["layoutHeader-userinfo-avatar"]}
src={userInfo?.avatar || defaultAvatar}
- alt="头像"
+ alt={t("profile")}
width={35}
height={35}
/>
@@ -138,7 +138,7 @@ const LyaoutHeader = memo(
<div className={styles["layoutHeader_wrapper-left"]}>
<h1 className={styles["layoutHeader_wrapper-logo"]}>
<Link href="/">
- <Image src={logo} alt="logo" width={50} />
+ <Image src={logo} alt="AIToEarn" width={50} />
</Link>
</h1>
<LayoutNav />
@@ -183,7 +183,7 @@ const LyaoutHeader = memo(
</div>
</div>
- {/* 通知面板 */}
+ {/* Notification Panel */}
<NotificationPanel
visible={notificationVisible}
onClose={() => setNotificationVisible(false)}
diff --git a/src/components/PublishDialog/index.tsx b/src/components/PublishDialog/index.tsx
index e2fa0a07..672db229 100644
--- a/src/components/PublishDialog/index.tsx
+++ b/src/components/PublishDialog/index.tsx
@@ -330,7 +330,7 @@ const PublishDialog = memo(
setAccountAllParams(nextParams);
}
setDraftModalOpen(false);
- message.success("草稿已应用");
+ message.success(t("draft.selectDraftSuccess"));
},
[setAccountAllParams, setOnePubParams, step, expandedPubItem],
);
@@ -362,7 +362,7 @@ const PublishDialog = memo(
setAccountAllParams(nextParams);
}
setLibraryModalOpen(false);
- message.success("素材已应用");
+ message.success(t("draft.selectLibrarySuccess"));
},
[setAccountAllParams, setOnePubParams, step, expandedPubItem],
);
@@ -468,7 +468,7 @@ const PublishDialog = memo(
setLibraryModalOpen(true);
}}
>
- 选择素材
+ {t("actions.selectMaterial")}
</Button>
<Button
size="small"
@@ -478,7 +478,7 @@ const PublishDialog = memo(
setDraftModalOpen(true);
}}
>
- 选择草稿
+ {t("actions.selectDraft")}
</Button>
</div>
</div>
@@ -663,12 +663,12 @@ const PublishDialog = memo(
</CSSTransition>
</Modal>
- {/* 选择草稿弹窗 */}
+ {/* Draft Selection Modal */}
<Modal
open={draftModalOpen}
onCancel={() => setDraftModalOpen(false)}
footer={null}
- title={selectedGroup ? "选择草稿" : "选择草稿箱组"}
+ title={selectedGroup ? t("draft.selectDraftItem") : t("draft.selectDraftGroup")}
width={720}
>
{!selectedGroup ? (
@@ -681,7 +681,7 @@ const PublishDialog = memo(
<List
grid={{ gutter: 16, column: 2 }}
dataSource={groups}
- locale={{ emptyText: "暂无草稿箱组" }}
+ locale={{ emptyText: t("draft.noDraftGroups") }}
renderItem={(item: any) => (
<List.Item>
<div
@@ -748,8 +748,8 @@ const PublishDialog = memo(
}}
>
{item.type === PubType.ImageText
- ? "图文组"
- : "视频组"}
+ ? t("draft.imageGroup")
+ : t("draft.videoGroup")}
</div>
</div>
</List.Item>
@@ -761,7 +761,7 @@ const PublishDialog = memo(
<div>
<div style={{ marginBottom: 12 }}>
<Button type="link" onClick={() => setSelectedGroup(null)}>
- 返回草稿箱组
+ {t("draft.backToGroups")}
</Button>
</div>
{draftLoading ? (
@@ -772,7 +772,7 @@ const PublishDialog = memo(
<List
grid={{ gutter: 16, column: 2 }}
dataSource={drafts}
- locale={{ emptyText: "该组暂无草稿" }}
+ locale={{ emptyText: t("draft.noDrafts") }}
renderItem={(item: any) => (
<List.Item>
<div
@@ -825,12 +825,12 @@ const PublishDialog = memo(
)}
</Modal>
- {/* 选择素材库弹窗 */}
+ {/* Material Library Selection Modal */}
<Modal
open={libraryModalOpen}
onCancel={() => setLibraryModalOpen(false)}
footer={null}
- title={selectedLibraryGroup ? "选择素材" : "选择素材库组"}
+ title={selectedLibraryGroup ? t("draft.selectLibraryItem") : t("draft.selectLibraryGroup")}
width={720}
>
{!selectedLibraryGroup ? (
@@ -843,7 +843,7 @@ const PublishDialog = memo(
<List
grid={{ gutter: 16, column: 2 }}
dataSource={libraryGroups}
- locale={{ emptyText: "暂无素材库组" }}
+ locale={{ emptyText: t("draft.noLibraryGroups") }}
renderItem={(item: any) => (
<List.Item>
<div
@@ -907,7 +907,7 @@ const PublishDialog = memo(
item.type === "img" ? "#52c41a" : "#1890ff",
}}
>
- {item.type === "img" ? "图片组" : "视频组"}
+ {item.type === "img" ? t("draft.imageGroup") : t("draft.videoGroup")}
</div>
</div>
</List.Item>
@@ -922,7 +922,7 @@ const PublishDialog = memo(
type="link"
onClick={() => setSelectedLibraryGroup(null)}
>
- 返回素材库组
+ {t("draft.backToLibraryGroups")}
</Button>
</div>
{libraryLoading ? (
@@ -933,7 +933,7 @@ const PublishDialog = memo(
<List
grid={{ gutter: 16, column: 2 }}
dataSource={libraryItems}
- locale={{ emptyText: "该组暂无素材" }}
+ locale={{ emptyText: t("draft.noLibraryItems") }}
renderItem={(item: any) => (
<List.Item>
<div