Skip to content

Commit 7c3f240

Browse files
cursoragentyashjoisar
andcommitted
Add Chinese (zh_CN) localization for wallet connection screens
Co-authored-by: yashjoisar <[email protected]>
1 parent 3d82a35 commit 7c3f240

File tree

6 files changed

+107
-0
lines changed

6 files changed

+107
-0
lines changed

packages/thirdweb/src/react/web/wallets/injected/locale/getInjectedWalletLocale.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export async function getInjectedWalletLocale(
2727
case "pt_BR": {
2828
return (await import("./br.js")).default;
2929
}
30+
case "zh_CN":
31+
return (await import("./zh.js")).default;
3032
default:
3133
return (await import("./en.js")).default;
3234
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { InjectedWalletLocale } from "./types.js";
2+
3+
/**
4+
* @internal
5+
*/
6+
const injectedWalletLocaleZh = (wallet: string): InjectedWalletLocale => ({
7+
connectionScreen: {
8+
failed: "连接失败",
9+
inProgress: "等待确认",
10+
instruction: `请在 ${wallet} 中接受连接请求`,
11+
retry: "重试",
12+
},
13+
download: {
14+
android: "在 Google Play 下载",
15+
chrome: "下载 Chrome 扩展",
16+
iOS: "在 App Store 下载",
17+
},
18+
getStartedLink: `没有 ${wallet}?`,
19+
getStartedScreen: {
20+
instruction: `扫描二维码下载 ${wallet} 应用`,
21+
},
22+
scanScreen: {
23+
instruction: `使用 ${wallet} 应用扫描二维码以连接`,
24+
},
25+
});
26+
27+
export default injectedWalletLocaleZh;

packages/thirdweb/src/react/web/wallets/shared/locale/getConnectLocale.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export async function getInAppWalletLocale(
2727
case "pt_BR": {
2828
return (await import("./br.js")).default;
2929
}
30+
case "zh_CN":
31+
return (await import("./zh.js")).default;
3032
default:
3133
return (await import("./en.js")).default;
3234
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import type { InAppWalletLocale } from "./types.js";
2+
3+
export default {
4+
createPassword: {
5+
confirmation: "我已保存密码",
6+
failedToSetPassword: "设置密码失败",
7+
inputPlaceholder: "输入您的密码",
8+
instruction:
9+
"为您的账户设置密码。从新设备连接时需要此密码。",
10+
saveInstruction: "请务必保存密码",
11+
submitButton: "设置密码",
12+
title: "创建密码",
13+
},
14+
emailLoginScreen: {
15+
enterCodeSendTo: "输入发送至以下地址的验证码",
16+
enterRecoveryCode:
17+
"输入您首次注册时发送至邮箱的恢复码",
18+
failedToSendCode: "发送验证码失败",
19+
invalidCode: "验证码无效",
20+
invalidCodeOrRecoveryCode: "验证码或恢复码无效",
21+
newDeviceDetected: "检测到新设备",
22+
resendCode: "重新发送验证码",
23+
sendingCode: "正在发送验证码",
24+
title: "登录",
25+
verify: "验证",
26+
},
27+
emailPlaceholder: "邮箱地址",
28+
emailRequired: "邮箱地址为必填项",
29+
enterPassword: {
30+
inputPlaceholder: "输入您的密码",
31+
instruction: "输入您账户的密码",
32+
submitButton: "验证",
33+
title: "输入密码",
34+
wrongPassword: "密码错误",
35+
},
36+
invalidEmail: "邮箱地址无效",
37+
invalidPhone: "手机号码无效",
38+
linkWallet: "关联钱包",
39+
loginAsGuest: "以访客身份继续",
40+
maxAccountsExceeded:
41+
"账户数量已达上限。请联系应用开发者。",
42+
or: "或",
43+
passkey: "通行密钥",
44+
phonePlaceholder: "手机号码",
45+
phoneRequired: "手机号码为必填项",
46+
signIn: "登录",
47+
signInWithApple: "Apple",
48+
signInWithDiscord: "Discord",
49+
signInWithEmail: "使用邮箱登录",
50+
signInWithFacebook: "Facebook",
51+
signInWithGoogle: "Google",
52+
signInWithPhone: "使用手机号登录",
53+
signInWithWallet: "使用钱包登录",
54+
socialLoginScreen: {
55+
failed: "登录失败",
56+
instruction: "在弹出窗口中登录您的账户",
57+
retry: "重试",
58+
title: "登录",
59+
},
60+
submitEmail: "继续",
61+
} satisfies InAppWalletLocale;

packages/thirdweb/src/react/web/wallets/smartWallet/locale/getSmartWalletLocale.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export async function getSmartWalletLocale(
2727
case "pt_BR": {
2828
return (await import("./br.js")).default;
2929
}
30+
case "zh_CN":
31+
return (await import("./zh.js")).default;
3032
default:
3133
return (await import("./en.js")).default;
3234
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { SmartWalletLocale } from "./types.js";
2+
3+
const smartWalletLocalZh: SmartWalletLocale = {
4+
connecting: "正在连接智能账户",
5+
failedToConnect: "连接智能账户失败",
6+
wrongNetworkScreen: {
7+
failedToSwitch: "网络切换失败",
8+
subtitle: "您的钱包未连接到所需的网络",
9+
title: "网络错误",
10+
},
11+
};
12+
13+
export default smartWalletLocalZh;

0 commit comments

Comments
 (0)