Skip to content

Commit

Permalink
Merge branch 'main' into fet897-merge-useselfabilities-usesubnameabil…
Browse files Browse the repository at this point in the history
…ities
  • Loading branch information
storywithoutend committed Jul 13, 2023
2 parents e9c8815 + 5a74d01 commit 42ddae2
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 23 deletions.
4 changes: 2 additions & 2 deletions public/locales/zh/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"filter": "筛选",
"view": "查看",
"noProfile": {
"title": "未设置主名",
"message": "创建个人资料前,请为该钱包设置一个主名"
"title": "未设置主名称",
"message": "创建个人资料前,请为该钱包设置一个主名称"
},
"noResults": "未找到名称",
"errors": {
Expand Down
11 changes: 8 additions & 3 deletions public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"myProfile": "个人资料",
"disconnect": "断开连接",
"connect": "连接",
"noPrimaryName": "未设置主名",
"noPrimaryName": "未设置主名称",
"viewProfile": "查看个人资料",
"viewDetails": "查看详情",
"register": "注册"
Expand All @@ -98,6 +98,7 @@
"notOwned": "未被持有",
"manager": "管理员",
"all": "所有名称",
"yourPrimaryName": "您的主名称",
"expiresInYears_one": "{{count}} 年后到期",
"expiresInYears_other": "{{count}} 年后到期",
"expiresInMonths_one": "{{count}} 个月后到期",
Expand Down Expand Up @@ -178,10 +179,11 @@
"migrateProfile": "迁移个人资料",
"migrateProfileWithReset": "迁移个人资料",
"migrateProfileWithSync": "迁移并更新个人资料",
"migrateProfileWithEthAddress": "迁移并更新 ETH 地址",
"wrapName": "包装名称",
"updateResolver": "更新解析器",
"updateProfile": "更新个人资料",
"setPrimaryName": "设置主名",
"setPrimaryName": "设置主名称",
"updateEthAddress": "更新 ETH 地址",
"testSendName": "发送名称",
"burnFuses": "烧毁权限",
Expand All @@ -206,11 +208,14 @@
"migrateProfile": "将现有记录设置到新的解析器上",
"migrateProfileWithReset": "将现有记录设置到新的解析器上",
"migrateProfileWithSync": "将现有记录设置到新的解析器上",
"migrateProfileWithEthAddress": "在新解析器上设置现有记录和 ETH 地址",
"wrapName2": "包装名称并设置解析器",
"wrapName": "包装该名称",
"updateResolver": "将解析器更改为",
"updateProfile": "更新现有解析器上的记录",
"setPrimaryName": "为您的地址设置主名",
"setPrimaryName": "为您的地址设置主名称",
"updateEthAddress": "将该地址更新到 ETH 地址记录",
"updateEthAddressOnLatestResolver": "在最新的解析器上更新 ETH 地址",
"testSendName": "设置该名称的管理员和注册人",
"createSubname": "在该名称上创建子名称",
"burnFuses": "烧毁选中的权限,直到名称过期",
Expand Down
7 changes: 4 additions & 3 deletions public/locales/zh/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"name": "个人资料",
"actions": {
"setAsPrimaryName": {
"label": "设置为主名",
"title": "设置您的主名",
"description": "如果将该名称设置为主名,ETH 地址记录必须与此地址相匹配。"
"label": "设置为主名称",
"title": "设置您的主名称",
"description": "如果将该名称设置为主名称,ETH 地址记录必须与此地址相匹配。"
},
"deleteSubname": {
"label": "删除子名称"
Expand Down Expand Up @@ -205,6 +205,7 @@
"custom": "自定义",
"latest": "最新版",
"outdated": "已过时",
"wildcard": "通配符",
"version": "版本",
"etherscan": "Etherscan"
},
Expand Down
4 changes: 2 additions & 2 deletions public/locales/zh/register.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"pricing": {
"insufficientBalance": "余额不足",
"multipleYearsMessage": "一次续期数年可以避免每年进行交易,从而节省网络成本。",
"primaryName": "作为主名使用",
"primaryNameMessage": "把您的地址关联到该名称,这样在连接到 dApp 时,就可以将它作为您的个人资料显示出来。每个地址只能有一个主名",
"primaryName": "作为主名称使用",
"primaryNameMessage": "把您的地址关联到该名称,这样在连接到 dApp 时,就可以将它作为您的个人资料显示出来。每个地址只能有一个主名称",
"premium": {
"heading": "该名称存在一个临时溢价",
"subheading": "为了给刚过期的名称提供公平的注册机会,溢价从 1 亿美元开始,在 21 天内逐步降至 0 美元。您可以在下面利用日期计算溢价。",
Expand Down
19 changes: 9 additions & 10 deletions public/locales/zh/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
},
"transaction": {
"title": "交易",
"noRecentTransactions": "近期无交易"
"noRecentTransactions": "近期无交易",
"clearTransactions": {
"title": "清除交易历史",
"description": "这会在 ENS 应用程序中彻底清除交易历史记录。这些交易在区块链上仍然存在。",
"actionLabel": "清除历史"
}
},
"primary": {
"title": "主名",
"loading": "主名加载中...",
"noName": "主名未设置。",
"input": {
"title": "选择主名",
"noNames": "此地址上未找到符合条件的名称",
"noOtherNames": "此地址上未找到其他符合条件的名称",
"loading": "名称加载中"
}
"title": "主名称",
"noNameDescription": "主名称将您的地址链接到名称,这样在连接到 dApp 时会将主名称显示为您的个人资料。了解主名称",
"choosePrimaryName": "选择主名称"
}
}
}
27 changes: 26 additions & 1 deletion public/locales/zh/transactionFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"action": "迁移"
},
"noResolver": {
"title": "未指定解析器",
"title": "未设置解析器",
"subtitle": "在编辑个人资料之前,需要设置解析器。",
"action": "更新"
},
Expand Down Expand Up @@ -292,6 +292,17 @@
"deleteEmancipatedSubnameWarning": {
"title": "不能重新创建该子名称",
"message": "删除该子名称意味着不能再使用或重新创建它,一直到它过期 {{date}}。由于父名称控制权限已被撤销,因此该操作也无法撤消。"
},
"selectPrimaryName": {
"title": "选择一个主名称",
"errors": {
"noNamesFound": "未找到名称",
"noEligibleNames": "没有符合条件的名称"
}
},
"resetPrimaryName": {
"title": "移除主名称",
"description": "移除后它不会再作为当前地址的名称来显示。但是,发送到该名称的交易仍将解析到当前地址,除非您删除该名称的 ETH 记录。"
}
},
"transaction": {
Expand All @@ -314,6 +325,20 @@
"syncManager": {
"description": "同步管理员会让您成为该名称的新管理员。当前管理员 <b>({{manager}})</b> 将会失去管理权限。",
"wrappedWarning": "同步管理员也将解除该名称的包装,这会烧毁 NFT 并重置所有权限。"
},
"selectPrimaryName": {
"updateEthAddress": {
"title": "更新 ETH 地址",
"description": "该名称的 ETH 地址和当前钱包无法匹配。要使用该名称作为您的主名称,您需要先更新该名称的 ETH 地址记录。"
},
"noResolver": {
"title": "未设置解析器",
"description": "要使用该名称作为您的主名称,您需要先设置一个解析器并更新该名称的 ETH 地址记录。"
},
"invalidResolver": {
"title": "未经授权的解析器",
"description": "要使用此名称作为您的主名称,您需要先设置一个有效的解析器并更新该名称的 ETH 地址记录。"
}
}
},
"errors": {
Expand Down
5 changes: 3 additions & 2 deletions public/locales/zh/translationNorms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": "您的"
Expand All @@ -30,6 +30,7 @@
- "confirm": "确认". 通常译作 "确认",而没有使用 "确定"。
- "remove": "移除"
- "delete": "删除"
- "clear": "清除"
- "selected": "选中项"
- "gas": "网络费". Metamask 中的译文为 "燃料"。
- "sign": "签名"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 42ddae2

Please sign in to comment.