From 84af10352c72d11d01f09c1ebb510a9309e210af Mon Sep 17 00:00:00 2001 From: liubenben Date: Sun, 25 Jun 2023 13:32:09 +0800 Subject: [PATCH 1/4] Sync changes in /en to /zh. Jun 25 --- public/locales/zh/address.json | 4 ++-- public/locales/zh/common.json | 11 ++++++++--- public/locales/zh/profile.json | 7 ++++--- public/locales/zh/register.json | 4 ++-- public/locales/zh/settings.json | 8 ++++---- public/locales/zh/transactionFlow.json | 27 +++++++++++++++++++++++++- public/locales/zh/translationNorms.md | 4 ++-- 7 files changed, 48 insertions(+), 17 deletions(-) diff --git a/public/locales/zh/address.json b/public/locales/zh/address.json index ae008ec94..9cdd9b8f1 100644 --- a/public/locales/zh/address.json +++ b/public/locales/zh/address.json @@ -4,8 +4,8 @@ "filter": "筛选", "view": "查看", "noProfile": { - "title": "未设置主名", - "message": "创建个人资料前,请为该钱包设置一个主名" + "title": "未设置主名称", + "message": "创建个人资料前,请为该钱包设置一个主名称" }, "noResults": "未找到名称", "errors": { diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index cb3484100..55d142537 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -79,7 +79,7 @@ "myProfile": "个人资料", "disconnect": "断开连接", "connect": "连接", - "noPrimaryName": "未设置主名", + "noPrimaryName": "未设置主名称", "viewProfile": "查看个人资料", "viewDetails": "查看详情", "register": "注册" @@ -98,6 +98,7 @@ "notOwned": "未被持有", "manager": "管理员", "all": "所有名称", + "yourPrimaryName": "您的主名称", "expiresInYears_one": "{{count}} 年后到期", "expiresInYears_other": "{{count}} 年后到期", "expiresInMonths_one": "{{count}} 个月后到期", @@ -178,10 +179,11 @@ "migrateProfile": "迁移个人资料", "migrateProfileWithReset": "迁移个人资料", "migrateProfileWithSync": "迁移并更新个人资料", + "migrateProfileWithEthAddress": "迁移并更新 ETH 地址", "wrapName": "包装名称", "updateResolver": "更新解析器", "updateProfile": "更新个人资料", - "setPrimaryName": "设置主名", + "setPrimaryName": "设置主名称", "updateEthAddress": "更新 ETH 地址", "testSendName": "发送名称", "burnFuses": "烧毁权限", @@ -206,11 +208,14 @@ "migrateProfile": "将现有记录设置到新的解析器上", "migrateProfileWithReset": "将现有记录设置到新的解析器上", "migrateProfileWithSync": "将现有记录设置到新的解析器上", + "migrateProfileWithEthAddress": "在新解析器上设置现有记录和 ETH 地址", + "wrapName2": "包装名称并设置解析器", "wrapName": "包装该名称", "updateResolver": "将解析器更改为", "updateProfile": "更新现有解析器上的记录", - "setPrimaryName": "为您的地址设置主名", + "setPrimaryName": "为您的地址设置主名称", "updateEthAddress": "将该地址更新到 ETH 地址记录", + "updateEthAddressOnLatestResolver": "在最新的解析器上更新 ETH 地址", "testSendName": "设置该名称的管理员和注册人", "createSubname": "在该名称上创建子名称", "burnFuses": "烧毁选中的权限,直到名称过期", diff --git a/public/locales/zh/profile.json b/public/locales/zh/profile.json index 99048b440..fc0d6afc1 100644 --- a/public/locales/zh/profile.json +++ b/public/locales/zh/profile.json @@ -23,9 +23,9 @@ "name": "个人资料", "actions": { "setAsPrimaryName": { - "label": "设置为主名", - "title": "设置您的主名", - "description": "如果将该名称设置为主名,ETH 地址记录必须与此地址相匹配。" + "label": "设置为主名称", + "title": "设置您的主名称", + "description": "如果将该名称设置为主名称,ETH 地址记录必须与此地址相匹配。" }, "deleteSubname": { "label": "删除子名称" @@ -205,6 +205,7 @@ "custom": "自定义", "latest": "最新版", "outdated": "已过时", + "wildcard": "通配符", "version": "版本", "etherscan": "Etherscan" }, diff --git a/public/locales/zh/register.json b/public/locales/zh/register.json index aad096737..80e9fb942 100644 --- a/public/locales/zh/register.json +++ b/public/locales/zh/register.json @@ -18,8 +18,8 @@ "pricing": { "insufficientBalance": "余额不足", "multipleYearsMessage": "一次续期数年可以避免每年进行交易,从而节省网络成本。", - "primaryName": "作为主名使用", - "primaryNameMessage": "把您的地址关联到该名称,这样在连接到 dApp 时,就可以将它作为您的个人资料显示出来。每个地址只能有一个主名。", + "primaryName": "作为主名称使用", + "primaryNameMessage": "把您的地址关联到该名称,这样在连接到 dApp 时,就可以将它作为您的个人资料显示出来。每个地址只能有一个主名称。", "premium": { "heading": "该名称存在一个临时溢价", "subheading": "为了给刚过期的名称提供公平的注册机会,溢价从 1 亿美元开始,在 21 天内逐步降至 0 美元。您可以在下面利用日期计算溢价。", diff --git a/public/locales/zh/settings.json b/public/locales/zh/settings.json index 9b97af339..9e24a4b59 100644 --- a/public/locales/zh/settings.json +++ b/public/locales/zh/settings.json @@ -9,11 +9,11 @@ "noRecentTransactions": "近期无交易" }, "primary": { - "title": "主名", - "loading": "主名加载中...", - "noName": "主名未设置。", + "title": "主名称", + "loading": "主名称加载中...", + "noName": "主名称未设置。", "input": { - "title": "选择主名", + "title": "选择主名称", "noNames": "此地址上未找到符合条件的名称", "noOtherNames": "此地址上未找到其他符合条件的名称", "loading": "名称加载中" diff --git a/public/locales/zh/transactionFlow.json b/public/locales/zh/transactionFlow.json index c3c7cfb89..dd58e61d0 100644 --- a/public/locales/zh/transactionFlow.json +++ b/public/locales/zh/transactionFlow.json @@ -126,7 +126,7 @@ "action": "迁移" }, "noResolver": { - "title": "未指定解析器", + "title": "未设置解析器", "subtitle": "在编辑个人资料之前,需要设置解析器。", "action": "更新" }, @@ -292,6 +292,17 @@ "deleteEmancipatedSubnameWarning": { "title": "不能重新创建该子名称", "message": "删除该子名称意味着不能再使用或重新创建它,一直到它过期 {{date}}。由于父名称控制权限已被撤销,因此该操作也无法撤消。" + }, + "selectPrimaryName": { + "title": "选择一个主名称", + "errors": { + "noNamesFound": "未找到名称", + "noEligibleNames": "没有符合条件的名称" + } + }, + "resetPrimaryName": { + "title": "移除主名称", + "description": "移除后它不会再作为当前地址的名称来显示。但是,发送到该名称的交易仍将解析到当前地址,除非您删除该名称的 ETH 记录。" } }, "transaction": { @@ -314,6 +325,20 @@ "syncManager": { "description": "同步管理员会让您成为该名称的新管理员。当前管理员 ({{manager}}) 将会失去管理权限。", "wrappedWarning": "同步管理员也将解除该名称的包装,这会烧毁 NFT 并重置所有权限。" + }, + "selectPrimaryName": { + "updateEthAddress": { + "title": "更新 ETH 地址", + "description": "该名称的 ETH 地址和当前钱包无法匹配。要使用该名称作为您的主名称,您需要先更新该名称的 ETH 地址记录。" + }, + "noResolver": { + "title": "未设置解析器", + "description": "要使用该名称作为您的主名称,您需要先设置一个解析器并更新该名称的 ETH 地址记录。" + }, + "invalidResolver": { + "title": "未经授权的解析器", + "description": "要使用此名称作为您的主名称,您需要先设置一个有效的解析器并更新该名称的 ETH 地址记录。" + } } }, "errors": { diff --git a/public/locales/zh/translationNorms.md b/public/locales/zh/translationNorms.md index 1966f2272..74cc71683 100644 --- a/public/locales/zh/translationNorms.md +++ b/public/locales/zh/translationNorms.md @@ -7,8 +7,8 @@ - "name": "名称". 一般统一译为 "名称" 而非 "名字"、"域名"。 - "subname": "子名称". 不同于 "subdomain",这里的 "subname" 译为 "子名称" 更合适。 - "parent", "parent name": "父名称" -- "primary name": "主名" -- "primary ENS name": "ENS 主名" +- "primary name": "主名称" +- "primary ENS name": "ENS 主名称" - "profile": "个人资料" - "you": "您" - "your": "您的" From f55c182c8ef80573355b50776ddfe1dd35ee2519 Mon Sep 17 00:00:00 2001 From: liubenben Date: Sun, 25 Jun 2023 13:47:39 +0800 Subject: [PATCH 2/4] Sync changes in /en to /zh. Jun 25 - 2 --- public/locales/zh/settings.json | 17 ++++++++--------- public/locales/zh/translationNorms.md | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/locales/zh/settings.json b/public/locales/zh/settings.json index 9e24a4b59..b73af235b 100644 --- a/public/locales/zh/settings.json +++ b/public/locales/zh/settings.json @@ -6,18 +6,17 @@ }, "transaction": { "title": "交易", - "noRecentTransactions": "近期无交易" + "noRecentTransactions": "近期无交易", + "clearTransactions": { + "title": "清除交易历史", + "description": "这会在 ENS 应用程序中彻底清除交易历史记录。这些交易在区块链上仍然存在。", + "actionLabel": "清除历史" + } }, "primary": { "title": "主名称", - "loading": "主名称加载中...", - "noName": "主名称未设置。", - "input": { - "title": "选择主名称", - "noNames": "此地址上未找到符合条件的名称", - "noOtherNames": "此地址上未找到其他符合条件的名称", - "loading": "名称加载中" - } + "noNameDescription": "主名称将您的地址链接到名称,这样在连接到 dApp 时会将主名称显示为您的个人资料。了解主名称", + "choosePrimaryName": "选择主名称" } } } diff --git a/public/locales/zh/translationNorms.md b/public/locales/zh/translationNorms.md index 74cc71683..63dced36b 100644 --- a/public/locales/zh/translationNorms.md +++ b/public/locales/zh/translationNorms.md @@ -30,6 +30,7 @@ - "confirm": "确认". 通常译作 "确认",而没有使用 "确定"。 - "remove": "移除" - "delete": "删除" +- "clear": "清除" - "selected": "选中项" - "gas": "网络费". Metamask 中的译文为 "燃料"。 - "sign": "签名" From bb29681f5c3915fbad6e770503d32dd7cd171b47 Mon Sep 17 00:00:00 2001 From: tate Date: Tue, 11 Jul 2023 10:30:00 +1000 Subject: [PATCH 3/4] fix: close tx modal on chain switch --- .../TransactionDialogManager.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/@molecules/TransactionDialogManager/TransactionDialogManager.tsx b/src/components/@molecules/TransactionDialogManager/TransactionDialogManager.tsx index a0a467c08..90c4c088e 100644 --- a/src/components/@molecules/TransactionDialogManager/TransactionDialogManager.tsx +++ b/src/components/@molecules/TransactionDialogManager/TransactionDialogManager.tsx @@ -8,6 +8,7 @@ import { WagmiConfig, useAccount } from 'wagmi' import { Dialog } from '@ensdomains/thorin' +import { useChainId } from '@app/hooks/useChainId' import { transactions } from '@app/transaction-flow/transaction' import { wagmiClientWithRefetch } from '@app/utils/query' @@ -19,7 +20,18 @@ import { TransactionStageModal } from './stage/TransactionStageModal' export const useResetSelectedKey = (dispatch: any) => { const { address } = useAccount() + const chainId = useChainId() + const prevAddress = usePrevious(address) + const prevChainId = usePrevious(chainId) + + useEffect(() => { + if (prevChainId && prevChainId !== chainId) { + dispatch({ + name: 'stopFlow', + }) + } + }, [prevChainId, chainId, dispatch]) useEffect(() => { if (prevAddress && prevAddress !== address) { From c886dfda3592d4b460a5a37ba98b45cde5dc37d1 Mon Sep 17 00:00:00 2001 From: tate Date: Wed, 12 Jul 2023 14:00:22 +1000 Subject: [PATCH 4/4] fix: chinese characters in transaction dialog --- .../TransactionDialogManager/stage/TransactionStageModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/@molecules/TransactionDialogManager/stage/TransactionStageModal.tsx b/src/components/@molecules/TransactionDialogManager/stage/TransactionStageModal.tsx index 6c8c7d5e6..dfe63b69e 100644 --- a/src/components/@molecules/TransactionDialogManager/stage/TransactionStageModal.tsx +++ b/src/components/@molecules/TransactionDialogManager/stage/TransactionStageModal.tsx @@ -113,6 +113,7 @@ const BarPrefix = styled.div( ({ theme }) => css` padding: ${theme.space['2']} ${theme.space['4']}; width: min-content; + white-space: nowrap; height: ${theme.space['9']}; margin-right: -1px;