-
Notifications
You must be signed in to change notification settings - Fork 619
Add chinese locale to connect button #7807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
joaquim-verges
merged 5 commits into
main
from
cursor/add-chinese-locale-to-connect-button-1320
Aug 10, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
26b8bc3
Add Chinese (zh_CN) localization for Connect Wallet UI
cursoragent 3d82a35
changeset and fix
Yash094 7c3f240
Add Chinese (zh_CN) localization for wallet connection screens
cursoragent 4f16cb6
fix
Yash094 59f6ac9
Add Chinese (Simplified) locale to LocaleFormControl
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "thirdweb": patch | ||
| --- | ||
|
|
||
| Add chinese locale support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
packages/thirdweb/src/react/web/ui/ConnectWallet/locale/zh.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| import type { ConnectLocale } from "./types.js"; | ||
|
|
||
| const connectLocaleZh: ConnectLocale = { | ||
| agreement: { | ||
| and: "和", | ||
| prefix: "连接即表示您同意", | ||
| privacyPolicy: "隐私政策", | ||
| termsOfService: "服务条款", | ||
| }, | ||
| backupWallet: "备份钱包", | ||
| buy: "购买", | ||
| confirmInWallet: "在钱包中确认", | ||
| connectAWallet: "连接钱包", | ||
| connectedToSmartWallet: "智能钱包", | ||
| connecting: "连接中", | ||
| continueAsGuest: "以访客身份继续", | ||
| copyAddress: "复制地址", | ||
| currentNetwork: "当前网络", | ||
| defaultButtonTitle: "连接", | ||
| defaultModalTitle: "登录", | ||
| disconnectWallet: "断开钱包连接", | ||
| getStarted: "开始使用", | ||
| goBackButton: "返回", | ||
| guest: "访客", | ||
| guestWalletWarning: | ||
| "这是一个临时访客钱包。如果您不想失去访问权限,请备份钱包", | ||
| id: "zh_CN", | ||
| installed: "已安装", | ||
| manageWallet: { | ||
| connectAnApp: "连接应用", | ||
| exportPrivateKey: "导出私钥", | ||
| linkedProfiles: "已关联配置文件", | ||
| linkProfile: "关联配置文件", | ||
| title: "管理钱包", | ||
| }, | ||
| networkSelector: { | ||
| addCustomNetwork: "添加自定义网络", | ||
| allNetworks: "全部", | ||
| categoryLabel: { | ||
| others: "所有网络", | ||
| popular: "热门", | ||
| recentlyUsed: "最近使用", | ||
| }, | ||
| failedToSwitch: "网络切换失败", | ||
| inputPlaceholder: "搜索网络或链 ID", | ||
| loading: "加载中", | ||
| mainnets: "主网", | ||
| testnets: "测试网", | ||
| title: "选择网络", | ||
| }, | ||
| newToWallets: "刚接触钱包?", | ||
| or: "或", | ||
| passkeys: { | ||
| linkPasskey: "添加通行密钥", | ||
| title: "通行密钥", | ||
| }, | ||
| payTransactions: "法币交易", | ||
| personalWallet: "个人钱包", | ||
| receive: "接收", | ||
| receiveFundsScreen: { | ||
| instruction: "复制地址以向此钱包发送资金", | ||
| title: "接收资金", | ||
| }, | ||
| recommended: "推荐", | ||
| requestTestnetFunds: "申请测试网资金", | ||
| send: "发送", | ||
| sendFundsScreen: { | ||
| amount: "金额", | ||
| insufficientFunds: "余额不足", | ||
| invalidAddress: "地址无效", | ||
| noTokensFound: "未找到代币", | ||
| searchToken: "搜索或粘贴代币地址", | ||
| selectTokenTitle: "选择代币", | ||
| sending: "发送中", | ||
| sendTo: "发送到", | ||
| submitButton: "发送", | ||
| successMessage: "交易成功", | ||
| title: "发送资金", | ||
| token: "代币", | ||
| transactionFailed: "交易失败", | ||
| transactionRejected: "交易被拒绝", | ||
| }, | ||
| signatureScreen: { | ||
| instructionScreen: { | ||
| disconnectWallet: "断开钱包连接", | ||
| instruction: "请在您的钱包中签署消息请求以继续", | ||
| signInButton: "登录", | ||
| title: "登录", | ||
| }, | ||
| signingScreen: { | ||
| approveTransactionInSafe: "在 Safe 中批准交易", | ||
| failedToSignIn: "登录失败", | ||
| inProgress: "等待确认", | ||
| prompt: "在您的钱包中签署签名请求", | ||
| promptForSafe: "在您的钱包中签署签名请求并在 Safe 中批准交易", | ||
| title: "登录中", | ||
| tryAgain: "重试", | ||
| }, | ||
| }, | ||
| signIn: "登录", | ||
| smartWallet: "智能钱包", | ||
| switchAccount: "切换账户", | ||
| switchingNetwork: "网络切换中", | ||
| switchNetwork: "切换网络", | ||
| switchTo: "切换到", | ||
| transactions: "交易", | ||
| viewAllTransactions: "查看所有交易", | ||
| viewFunds: { | ||
| title: "查看资产", | ||
| viewAssets: "查看资产", | ||
| viewNFTs: "查看NFT资产", | ||
| viewTokens: "查看代币", | ||
| }, | ||
| walletTransactions: "钱包交易", | ||
| welcomeScreen: { | ||
| defaultSubtitle: "连接钱包以开始使用", | ||
| defaultTitle: "您通往去中心化世界的门户", | ||
| }, | ||
| }; | ||
|
|
||
| export default connectLocaleZh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,4 +9,5 @@ export type LocaleId = | |
| | "de_DE" | ||
| | "fr_FR" | ||
| | "ru_RU" | ||
| | "pt_BR"; | ||
| | "pt_BR" | ||
| | "zh_CN"; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/thirdweb/src/react/web/wallets/injected/locale/zh.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import type { InjectedWalletLocale } from "./types.js"; | ||
|
|
||
| /** | ||
| * @internal | ||
| */ | ||
| const injectedWalletLocaleZh = (wallet: string): InjectedWalletLocale => ({ | ||
| connectionScreen: { | ||
| failed: "连接失败", | ||
| inProgress: "等待用户确认", | ||
| instruction: `请在 ${wallet} 中接受连接请求`, | ||
| retry: "重试", | ||
| }, | ||
| download: { | ||
| android: "从 Google Play 下载", | ||
| chrome: "下载 Chrome 扩展", | ||
| iOS: "从 App Store 下载", | ||
| }, | ||
| getStartedLink: `没有 ${wallet}?`, | ||
| getStartedScreen: { | ||
| instruction: `扫描二维码下载 ${wallet} 应用`, | ||
| }, | ||
| scanScreen: { | ||
| instruction: `用 ${wallet} 扫描二维码连接`, | ||
| }, | ||
| }); | ||
|
|
||
| export default injectedWalletLocaleZh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
packages/thirdweb/src/react/web/wallets/shared/locale/zh.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| import type { InAppWalletLocale } from "./types.js"; | ||
|
|
||
| export default { | ||
| createPassword: { | ||
| confirmation: "我已保存密码", | ||
| failedToSetPassword: "设置密码失败", | ||
| inputPlaceholder: "输入密码", | ||
| instruction: "为账户设置密码。使用新设备登录时需要此密码。", | ||
| saveInstruction: "请妥善保存密码", | ||
| submitButton: "设置密码", | ||
| title: "创建密码", | ||
| }, | ||
| emailLoginScreen: { | ||
| enterCodeSendTo: "输入发送至您邮箱的验证码", | ||
| enterRecoveryCode: "输入您首次注册时邮箱收到的恢复码", | ||
| failedToSendCode: "发送验证码失败", | ||
| invalidCode: "验证码无效", | ||
| invalidCodeOrRecoveryCode: "验证码或恢复码无效", | ||
| newDeviceDetected: "检测到新设备", | ||
| resendCode: "重新发送验证码", | ||
| sendingCode: "正在发送验证码", | ||
| title: "登录", | ||
| verify: "验证", | ||
| }, | ||
| emailPlaceholder: "邮箱地址", | ||
| emailRequired: "请输入邮箱地址", | ||
| enterPassword: { | ||
| inputPlaceholder: "输入您的密码", | ||
| instruction: "输入您账户的密码", | ||
| submitButton: "验证", | ||
| title: "输入密码", | ||
| wrongPassword: "密码错误", | ||
| }, | ||
| invalidEmail: "邮箱地址无效", | ||
| invalidPhone: "手机号码无效", | ||
| linkWallet: "连接钱包", | ||
| loginAsGuest: "以访客身份继续", | ||
| maxAccountsExceeded: "账户数量已达上限。请联系应用开发者。", | ||
| or: "或", | ||
| passkey: "通行密钥", | ||
| phonePlaceholder: "手机号码", | ||
| phoneRequired: "手机号码为必填项", | ||
| signIn: "登录", | ||
| signInWithApple: "Apple", | ||
| signInWithDiscord: "Discord", | ||
| signInWithEmail: "邮箱登录", | ||
| signInWithFacebook: "Facebook", | ||
| signInWithGoogle: "Google", | ||
| signInWithPhone: "使用手机号登录", | ||
| signInWithWallet: "使用钱包登录", | ||
| socialLoginScreen: { | ||
| failed: "登录失败", | ||
| instruction: "请在弹窗中登录账户", | ||
| retry: "重试", | ||
| title: "登录", | ||
| }, | ||
| submitEmail: "继续", | ||
| } satisfies InAppWalletLocale; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/thirdweb/src/react/web/wallets/smartWallet/locale/zh.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type { SmartWalletLocale } from "./types.js"; | ||
|
|
||
| const smartWalletLocalZh: SmartWalletLocale = { | ||
| connecting: "正在连接智能账户", | ||
| failedToConnect: "连接智能账户失败", | ||
| wrongNetworkScreen: { | ||
| failedToSwitch: "网络切换失败", | ||
| subtitle: "钱包未连接至所需网络", | ||
| title: "网络错误", | ||
| }, | ||
| }; | ||
|
|
||
| export default smartWalletLocalZh; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo in the variable name
smartWalletLocalZh. It should besmartWalletLocaleZhto maintain consistency with the naming convention used in other locale files.Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.