Skip to content

Commit

Permalink
feat: Improve localization translations
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Sep 12, 2019
1 parent ed1706e commit 44b3642
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 62 deletions.
29 changes: 8 additions & 21 deletions packages/neuron-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"welcome-to-nervos-neuron": "Welcome to Neuron",
"create-or-import-your-first-wallet": "Create or import your first wallet",
"create-new-wallet": "Create a Wallet",
"import-mnemonic": "Import Mnemonic Seed",
"import-mnemonic": "Import Wallet Seed",
"import-keystore": "Import from Keystore",
"import-wallet": "Import a Wallet",
"next": "Next",
Expand All @@ -58,8 +58,8 @@
"wallet-suffix": "Wallet {{suffix}}",
"write-down-seed": "Write down your wallet seed and save it in a safe place",
"new-name": "Use an unused name for the new wallet",
"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.",
"same-password": "The password and confirm password should be same"
"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.",
"same-password": "The password and confirm password should match"
},
"import-keystore": {
"label": {
Expand Down Expand Up @@ -88,7 +88,6 @@
"confirm-password": "Confirm Password",
"to": "To",
"input-password-to-confirm": "Input password to confirm",
"this-transaction-will-send": "This transaction will send",
"scan-to-get-address": "Scan QR code to read the address to send to",
"total-amount": "Total Amount",
"description": "Description",
Expand Down Expand Up @@ -210,18 +209,6 @@
"footer": {
"fail-to-fetch-tip-block-number": "Cannot fetch tip block number"
},
"menuitem": {
"add": "Add",
"update": "Update",
"delete": "Delete",
"network": "Network",
"select": "Select",
"edit": "Edit",
"backup": "Backup",
"remove": "Remove",
"save": "Save",
"management": "management"
},
"common": {
"or": "or",
"confirm": "Confirm",
Expand All @@ -243,10 +230,10 @@
"messages": {
"error": "Error",
"unknown-error": "Unknown error",
"update-wallet-successfully": "Update the wallet successfully",
"delete-wallet-successfully": "Delete the wallet successfully",
"create-network-successfully": "Create a network successfully",
"update-network-successfully": "Update the network successfully",
"update-wallet-successfully": "The wallet was updated",
"delete-wallet-successfully": "The Wallet was deleted",
"create-network-successfully": "The network was created",
"update-network-successfully": "The network was updated",
"addr-copied": "Address has been copied to the clipboard",
"qrcode-copied": "QR Code has been copied to the clipboard",
"lock-arg-copied": "Lock Arg has been copied to the clipboard",
Expand Down Expand Up @@ -296,7 +283,7 @@
"first-page": "First page",
"last-page": "Last page",
"page": "Page",
"selected": "Selected"
"selected": "Current page"
}
}
}
45 changes: 16 additions & 29 deletions packages/neuron-ui/src/locales/zh.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"translation": {
"launch-screen": {
"loading-wallets": "加载钱包"
"loading-wallets": "钱包加载中"
},
"navbar": {
"overview": "概观",
"overview": "总览",
"wallet": "钱包",
"send": "转账",
"receive": "收款",
Expand All @@ -14,9 +14,9 @@
},
"overview": {
"balance": "余额",
"recent-activities": "近期活动",
"no-recent-activities": "近期没有活动",
"activity": "活动",
"recent-activities": "最近收支",
"no-recent-activities": "没有收支记录",
"activity": "收支活动",
"datetime": "时间",
"status": "状态",
"amount": "金额",
Expand All @@ -30,13 +30,13 @@
"address": "地址",
"code-hash": "Code Hash",
"copy-pubkey-hash": "复制 Lock Arg (Pubkey Hash)",
"confirmation": "已确认 {{confirmationCount}} 次数",
"confirmations": "已确认 {{confirmationCount}} 次数",
"confirmation": "{{confirmationCount}} 个确认",
"confirmations": "{{confirmationCount}} 个确认",
"sent": "已发送",
"sending": "正在发送",
"received": "已收款",
"receiving": "正在收款",
"more": "查看更多交易"
"more": "查看更多记录"
},
"wizard": {
"welcome-to-nervos-neuron": "欢迎使用 Neuron",
Expand All @@ -58,7 +58,7 @@
"wallet-suffix": "钱包 {{suffix}}",
"write-down-seed": "请记下您的助记词并保存到安全的地方",
"new-name": "输入新的钱包名称",
"complex-password": "密码为 8 至 50 位由大写字母、小写字母、数字、特殊符号中三类字符组成的字符串, 且必须以字母或者数字开头",
"complex-password": "密码为 8 至 50 位由大写字母、小写字母、数字、特殊符号中至少三类字符组成的字符串, 且必须以字母或者数字开头",
"same-password": "两次输入密码应一致"
},
"import-keystore": {
Expand All @@ -82,13 +82,12 @@
},
"send": {
"address": "地址",
"amount": "价值",
"amount": "金额",
"send": "发送",
"clear": "清除",
"confirm-password": "确认密码",
"to": "",
"to": "收款地址",
"input-password-to-confirm": "输入密码以确认本次交易",
"this-transaction-will-send": "本次交易将发送",
"scan-to-get-address": "扫描二维码以获取地址",
"total-amount": "总金额",
"description": "备注",
Expand Down Expand Up @@ -154,7 +153,7 @@
"change-address": "找零地址"
},
"settings": {
"go-to-overview": "返回概观",
"go-to-overview": "返回总览画面",
"setting-tabs": {
"general": "通用",
"wallets": "钱包",
Expand Down Expand Up @@ -210,18 +209,6 @@
"footer": {
"fail-to-fetch-tip-block-number": "无法获取最新高度"
},
"menuitem": {
"add": "添加",
"update": "更新",
"delete": "删除",
"network": "网络",
"select": "选择",
"edit": "编辑",
"backup": "备份",
"remove": "移除",
"Save": "保存",
"management": "管理"
},
"common": {
"or": "",
"confirm": "确认",
Expand All @@ -245,11 +232,11 @@
"unknown-error": "未知错误",
"update-wallet-successfully": "已更新钱包信息",
"delete-wallet-successfully": "已删除钱包",
"create-network-successfully": "新节点已添加",
"create-network-successfully": "已添加新节点",
"update-network-successfully": "已更新节点信息",
"addr-copied": "地址已复制到剪贴板",
"qrcode-copied": "二维码已复制到剪贴板",
"lock-arg-copied": "Lock Arg 已复制到剪贴板",
"addr-copied": "已复制地址到剪贴板",
"qrcode-copied": "已复制二维码到剪贴板",
"lock-arg-copied": "已复制 Lock Arg 到剪贴板",
"fields": {
"wallet": "钱包",
"name": "名称",
Expand Down
12 changes: 6 additions & 6 deletions packages/neuron-wallet/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
backup: 'Backup Current Wallet',
delete: 'Delete Current Wallet',
'change-password': 'Change Password',
'import-mnemonic': 'Import Mnemonic Seed',
'import-mnemonic': 'Import Wallet Seed',
'import-keystore': 'Import from Keystore',
},
edit: {
Expand All @@ -32,7 +32,7 @@ export default {
},
view: {
label: 'View',
fullscreen: 'Fullscreen',
fullscreen: 'Enter Full Screen',
'address-book': 'Address Book',
},
window: {
Expand Down Expand Up @@ -88,7 +88,7 @@ export default {
'used-name': '{{field}} name is used',
'missing-required-argument': 'Missing required argument',
'save-keystore': 'Save Keystore',
'invalid-mnemonic': 'Mnemonic is invalid',
'invalid-mnemonic': 'Wallet seed is invalid',
'unsupported-cipher': 'Unsupported cipher',
'capacity-not-enough': 'Capacity is not enough',
'capacity-too-small': 'Capacity less than min',
Expand All @@ -103,8 +103,8 @@ export default {
delete: 'Delete',
'copy-address': 'Copy Address',
'request-payment': 'Request Payment',
'spend-from': 'Spend From',
'view-on-explorer': 'View On Explorer',
'spend-from': 'Spend from',
'view-on-explorer': 'View on Explorer',
detail: 'Detail',
'copy-transaction-hash': 'Copy Transaction Hash',
},
Expand All @@ -118,7 +118,7 @@ export default {
},
'remove-network': {
title: 'Remove Network',
message: 'Network of name: {{name}}, address: {{address}} will be removed.',
message: 'Network {{name}} (address: {{address}}) will be removed.',
alert: 'This is the current network, by removing it, the connection will be switched to the default network',
},
'remove-wallet': {
Expand Down
8 changes: 4 additions & 4 deletions packages/neuron-wallet/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
},
view: {
label: '视图',
fullscreen: ' 全屏',
fullscreen: '进入全屏模式',
'address-book': '地址簿',
},
window: {
Expand Down Expand Up @@ -60,7 +60,7 @@ export default {
messages: {
'failed-to-load-networks': '加载节点失败',
'Networks-will-be-reset': '节点列表将被重置',
'wallet-password-less-than-min-length': '密码至少{{minPasswordLength}}位字符',
'wallet-password-less-than-min-length': '密码应至少包含{{minPasswordLength}}位字符',
'wallet-password-more-than-max-length': '密码不能超过{{maxPasswordLength}}位字符',
'wallet-password-letter-complexity': '密码包含大写字母、小写字母、数字、特殊符号的至少三类',
'current-wallet-not-set': '未设置当前钱包',
Expand Down Expand Up @@ -97,7 +97,7 @@ export default {
},
contextMenu: {
select: '选择',
backup: ' 备份',
backup: '备份',
edit: '编辑',
delete: '删除',
'copy-address': '复制地址',
Expand All @@ -117,7 +117,7 @@ export default {
},
'remove-network': {
title: '删除网络',
message: '网络名称: {{name}}, 地址: {{address}} 的网络设置将被删除.',
message: '将删除网络 {{name}}(地址: {{address}})的设置.',
alert: '这是当前连接网络, 删除后会连接到默认网络',
},
'remove-wallet': {
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/tests-e2e/tests/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default (app: Application, env: TransactionTestEnv) => {
const res = await app.spectron.electron.ipcRenderer.sendSync('E2E_ENV')
console.log(`ENV.isTestMode = ${res}`);

await app.clickMenu(['Wallet', 'Import Wallet', 'Import Mnemonic Seed'])
await app.clickMenu(['Wallet', 'Import Wallet', 'Import Wallet Seed'])
await app.waitUntilLoaded()
await importWallet(app, env.mnemonic, undefined, password)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/tests-e2e/tests/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default (app: Application) => {
console.info(`Switch to wallet setting ${new Date().toLocaleTimeString()}`)

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

0 comments on commit 44b3642

Please sign in to comment.