Skip to content

Commit 44b3642

Browse files
committed
feat: Improve localization translations
1 parent ed1706e commit 44b3642

6 files changed

Lines changed: 36 additions & 62 deletions

File tree

packages/neuron-ui/src/locales/en.json

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"welcome-to-nervos-neuron": "Welcome to Neuron",
4343
"create-or-import-your-first-wallet": "Create or import your first wallet",
4444
"create-new-wallet": "Create a Wallet",
45-
"import-mnemonic": "Import Mnemonic Seed",
45+
"import-mnemonic": "Import Wallet Seed",
4646
"import-keystore": "Import from Keystore",
4747
"import-wallet": "Import a Wallet",
4848
"next": "Next",
@@ -58,8 +58,8 @@
5858
"wallet-suffix": "Wallet {{suffix}}",
5959
"write-down-seed": "Write down your wallet seed and save it in a safe place",
6060
"new-name": "Use an unused name for the new wallet",
61-
"complex-password": "The password is a string of 8 to 50 characters consisting of three types of characters: uppercase letters, lowercase letters, numbers, and special symbols, and must start with a letter or a number.",
62-
"same-password": "The password and confirm password should be same"
61+
"complex-password": "The password should be 8 to 50 characters long containing at least three character categories among the following: uppercase letters, lowercase letters, numbers, and special symbols, and must start with a letter or a number.",
62+
"same-password": "The password and confirm password should match"
6363
},
6464
"import-keystore": {
6565
"label": {
@@ -88,7 +88,6 @@
8888
"confirm-password": "Confirm Password",
8989
"to": "To",
9090
"input-password-to-confirm": "Input password to confirm",
91-
"this-transaction-will-send": "This transaction will send",
9291
"scan-to-get-address": "Scan QR code to read the address to send to",
9392
"total-amount": "Total Amount",
9493
"description": "Description",
@@ -210,18 +209,6 @@
210209
"footer": {
211210
"fail-to-fetch-tip-block-number": "Cannot fetch tip block number"
212211
},
213-
"menuitem": {
214-
"add": "Add",
215-
"update": "Update",
216-
"delete": "Delete",
217-
"network": "Network",
218-
"select": "Select",
219-
"edit": "Edit",
220-
"backup": "Backup",
221-
"remove": "Remove",
222-
"save": "Save",
223-
"management": "management"
224-
},
225212
"common": {
226213
"or": "or",
227214
"confirm": "Confirm",
@@ -243,10 +230,10 @@
243230
"messages": {
244231
"error": "Error",
245232
"unknown-error": "Unknown error",
246-
"update-wallet-successfully": "Update the wallet successfully",
247-
"delete-wallet-successfully": "Delete the wallet successfully",
248-
"create-network-successfully": "Create a network successfully",
249-
"update-network-successfully": "Update the network successfully",
233+
"update-wallet-successfully": "The wallet was updated",
234+
"delete-wallet-successfully": "The Wallet was deleted",
235+
"create-network-successfully": "The network was created",
236+
"update-network-successfully": "The network was updated",
250237
"addr-copied": "Address has been copied to the clipboard",
251238
"qrcode-copied": "QR Code has been copied to the clipboard",
252239
"lock-arg-copied": "Lock Arg has been copied to the clipboard",
@@ -296,7 +283,7 @@
296283
"first-page": "First page",
297284
"last-page": "Last page",
298285
"page": "Page",
299-
"selected": "Selected"
286+
"selected": "Current page"
300287
}
301288
}
302289
}

packages/neuron-ui/src/locales/zh.json

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"translation": {
33
"launch-screen": {
4-
"loading-wallets": "加载钱包"
4+
"loading-wallets": "钱包加载中"
55
},
66
"navbar": {
7-
"overview": "概观",
7+
"overview": "总览",
88
"wallet": "钱包",
99
"send": "转账",
1010
"receive": "收款",
@@ -14,9 +14,9 @@
1414
},
1515
"overview": {
1616
"balance": "余额",
17-
"recent-activities": "近期活动",
18-
"no-recent-activities": "近期没有活动",
19-
"activity": "活动",
17+
"recent-activities": "最近收支",
18+
"no-recent-activities": "没有收支记录",
19+
"activity": "收支活动",
2020
"datetime": "时间",
2121
"status": "状态",
2222
"amount": "金额",
@@ -30,13 +30,13 @@
3030
"address": "地址",
3131
"code-hash": "Code Hash",
3232
"copy-pubkey-hash": "复制 Lock Arg (Pubkey Hash)",
33-
"confirmation": "已确认 {{confirmationCount}} 次数",
34-
"confirmations": "已确认 {{confirmationCount}} 次数",
33+
"confirmation": "{{confirmationCount}} 个确认",
34+
"confirmations": "{{confirmationCount}} 个确认",
3535
"sent": "已发送",
3636
"sending": "正在发送",
3737
"received": "已收款",
3838
"receiving": "正在收款",
39-
"more": "查看更多交易"
39+
"more": "查看更多记录"
4040
},
4141
"wizard": {
4242
"welcome-to-nervos-neuron": "欢迎使用 Neuron",
@@ -58,7 +58,7 @@
5858
"wallet-suffix": "钱包 {{suffix}}",
5959
"write-down-seed": "请记下您的助记词并保存到安全的地方",
6060
"new-name": "输入新的钱包名称",
61-
"complex-password": "密码为 8 至 50 位由大写字母、小写字母、数字、特殊符号中三类字符组成的字符串, 且必须以字母或者数字开头",
61+
"complex-password": "密码为 8 至 50 位由大写字母、小写字母、数字、特殊符号中至少三类字符组成的字符串, 且必须以字母或者数字开头",
6262
"same-password": "两次输入密码应一致"
6363
},
6464
"import-keystore": {
@@ -82,13 +82,12 @@
8282
},
8383
"send": {
8484
"address": "地址",
85-
"amount": "价值",
85+
"amount": "金额",
8686
"send": "发送",
8787
"clear": "清除",
8888
"confirm-password": "确认密码",
89-
"to": "",
89+
"to": "收款地址",
9090
"input-password-to-confirm": "输入密码以确认本次交易",
91-
"this-transaction-will-send": "本次交易将发送",
9291
"scan-to-get-address": "扫描二维码以获取地址",
9392
"total-amount": "总金额",
9493
"description": "备注",
@@ -154,7 +153,7 @@
154153
"change-address": "找零地址"
155154
},
156155
"settings": {
157-
"go-to-overview": "返回概观",
156+
"go-to-overview": "返回总览画面",
158157
"setting-tabs": {
159158
"general": "通用",
160159
"wallets": "钱包",
@@ -210,18 +209,6 @@
210209
"footer": {
211210
"fail-to-fetch-tip-block-number": "无法获取最新高度"
212211
},
213-
"menuitem": {
214-
"add": "添加",
215-
"update": "更新",
216-
"delete": "删除",
217-
"network": "网络",
218-
"select": "选择",
219-
"edit": "编辑",
220-
"backup": "备份",
221-
"remove": "移除",
222-
"Save": "保存",
223-
"management": "管理"
224-
},
225212
"common": {
226213
"or": "",
227214
"confirm": "确认",
@@ -245,11 +232,11 @@
245232
"unknown-error": "未知错误",
246233
"update-wallet-successfully": "已更新钱包信息",
247234
"delete-wallet-successfully": "已删除钱包",
248-
"create-network-successfully": "新节点已添加",
235+
"create-network-successfully": "已添加新节点",
249236
"update-network-successfully": "已更新节点信息",
250-
"addr-copied": "地址已复制到剪贴板",
251-
"qrcode-copied": "二维码已复制到剪贴板",
252-
"lock-arg-copied": "Lock Arg 已复制到剪贴板",
237+
"addr-copied": "已复制地址到剪贴板",
238+
"qrcode-copied": "已复制二维码到剪贴板",
239+
"lock-arg-copied": "已复制 Lock Arg 到剪贴板",
253240
"fields": {
254241
"wallet": "钱包",
255242
"name": "名称",

packages/neuron-wallet/src/locales/en.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
backup: 'Backup Current Wallet',
2121
delete: 'Delete Current Wallet',
2222
'change-password': 'Change Password',
23-
'import-mnemonic': 'Import Mnemonic Seed',
23+
'import-mnemonic': 'Import Wallet Seed',
2424
'import-keystore': 'Import from Keystore',
2525
},
2626
edit: {
@@ -32,7 +32,7 @@ export default {
3232
},
3333
view: {
3434
label: 'View',
35-
fullscreen: 'Fullscreen',
35+
fullscreen: 'Enter Full Screen',
3636
'address-book': 'Address Book',
3737
},
3838
window: {
@@ -88,7 +88,7 @@ export default {
8888
'used-name': '{{field}} name is used',
8989
'missing-required-argument': 'Missing required argument',
9090
'save-keystore': 'Save Keystore',
91-
'invalid-mnemonic': 'Mnemonic is invalid',
91+
'invalid-mnemonic': 'Wallet seed is invalid',
9292
'unsupported-cipher': 'Unsupported cipher',
9393
'capacity-not-enough': 'Capacity is not enough',
9494
'capacity-too-small': 'Capacity less than min',
@@ -103,8 +103,8 @@ export default {
103103
delete: 'Delete',
104104
'copy-address': 'Copy Address',
105105
'request-payment': 'Request Payment',
106-
'spend-from': 'Spend From',
107-
'view-on-explorer': 'View On Explorer',
106+
'spend-from': 'Spend from',
107+
'view-on-explorer': 'View on Explorer',
108108
detail: 'Detail',
109109
'copy-transaction-hash': 'Copy Transaction Hash',
110110
},
@@ -118,7 +118,7 @@ export default {
118118
},
119119
'remove-network': {
120120
title: 'Remove Network',
121-
message: 'Network of name: {{name}}, address: {{address}} will be removed.',
121+
message: 'Network {{name}} (address: {{address}}) will be removed.',
122122
alert: 'This is the current network, by removing it, the connection will be switched to the default network',
123123
},
124124
'remove-wallet': {

packages/neuron-wallet/src/locales/zh.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
},
3333
view: {
3434
label: '视图',
35-
fullscreen: ' 全屏',
35+
fullscreen: '进入全屏模式',
3636
'address-book': '地址簿',
3737
},
3838
window: {
@@ -60,7 +60,7 @@ export default {
6060
messages: {
6161
'failed-to-load-networks': '加载节点失败',
6262
'Networks-will-be-reset': '节点列表将被重置',
63-
'wallet-password-less-than-min-length': '密码至少{{minPasswordLength}}位字符',
63+
'wallet-password-less-than-min-length': '密码应至少包含{{minPasswordLength}}位字符',
6464
'wallet-password-more-than-max-length': '密码不能超过{{maxPasswordLength}}位字符',
6565
'wallet-password-letter-complexity': '密码包含大写字母、小写字母、数字、特殊符号的至少三类',
6666
'current-wallet-not-set': '未设置当前钱包',
@@ -97,7 +97,7 @@ export default {
9797
},
9898
contextMenu: {
9999
select: '选择',
100-
backup: ' 备份',
100+
backup: '备份',
101101
edit: '编辑',
102102
delete: '删除',
103103
'copy-address': '复制地址',
@@ -117,7 +117,7 @@ export default {
117117
},
118118
'remove-network': {
119119
title: '删除网络',
120-
message: '网络名称: {{name}}, 地址: {{address}} 的网络设置将被删除.',
120+
message: '将删除网络 {{name}}(地址: {{address}})的设置.',
121121
alert: '这是当前连接网络, 删除后会连接到默认网络',
122122
},
123123
'remove-wallet': {

packages/neuron-wallet/tests-e2e/tests/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default (app: Application, env: TransactionTestEnv) => {
1717
const res = await app.spectron.electron.ipcRenderer.sendSync('E2E_ENV')
1818
console.log(`ENV.isTestMode = ${res}`);
1919

20-
await app.clickMenu(['Wallet', 'Import Wallet', 'Import Mnemonic Seed'])
20+
await app.clickMenu(['Wallet', 'Import Wallet', 'Import Wallet Seed'])
2121
await app.waitUntilLoaded()
2222
await importWallet(app, env.mnemonic, undefined, password)
2323
})

packages/neuron-wallet/tests-e2e/tests/wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default (app: Application) => {
3737
console.info(`Switch to wallet setting ${new Date().toLocaleTimeString()}`)
3838

3939
// Go to import wallet page
40-
const importWalletButton = await app.getElementByTagName('button', 'Import Mnemonic Seed')
40+
const importWalletButton = await app.getElementByTagName('button', 'Import Wallet Seed')
4141
expect(importWalletButton).not.toBeNull()
4242
await client.elementIdClick(importWalletButton!.ELEMENT)
4343
console.info(`Go to import wallet page ${new Date().toLocaleTimeString()}`)

0 commit comments

Comments
 (0)