diff --git a/packages/dashboard/src/locales/en-US.json b/packages/dashboard/src/locales/en-US.json
index 02acdf804773..fc655205616a 100644
--- a/packages/dashboard/src/locales/en-US.json
+++ b/packages/dashboard/src/locales/en-US.json
@@ -247,7 +247,7 @@
"settings_backup_preview_associated_account": "Associated Account",
"settings_backup_preview_posts": "Encrypted Post",
"settings_backup_preview_contacts": "Contacts",
- "settings_backup_preview_fils": "File",
+ "settings_backup_preview_file": "File",
"settings_backup_preview_wallets": "Mask Wallet",
"settings_backup_preview_created_at": "Backup Time",
"settings_language_title": "Language",
diff --git a/packages/dashboard/src/pages/Settings/components/BackupContentSelector.tsx b/packages/dashboard/src/pages/Settings/components/BackupContentSelector.tsx
index 5934190f057b..2875be05f494 100644
--- a/packages/dashboard/src/pages/Settings/components/BackupContentSelector.tsx
+++ b/packages/dashboard/src/pages/Settings/components/BackupContentSelector.tsx
@@ -59,7 +59,7 @@ export default function BackupContentSelector({ json, onChange }: BackupContentS
sub: true,
},
{
- name: t.settings_backup_preview_fils(),
+ name: t.settings_backup_preview_file(),
value: json.files,
sub: true,
},
diff --git a/packages/dashboard/src/pages/Settings/components/BackupPreviewCard.tsx b/packages/dashboard/src/pages/Settings/components/BackupPreviewCard.tsx
index 2e2688b2319b..29d103abe5b3 100644
--- a/packages/dashboard/src/pages/Settings/components/BackupPreviewCard.tsx
+++ b/packages/dashboard/src/pages/Settings/components/BackupPreviewCard.tsx
@@ -53,7 +53,7 @@ export default function BackupPreviewCard({ json }: Props) {
sub: true,
},
{
- name: t.settings_backup_preview_fils(),
+ name: t.settings_backup_preview_file(),
value: json.files,
sub: true,
},
diff --git a/packages/mask/shared-ui/locales/en-US.json b/packages/mask/shared-ui/locales/en-US.json
index 16a3b9986cbb..204889271277 100644
--- a/packages/mask/shared-ui/locales/en-US.json
+++ b/packages/mask/shared-ui/locales/en-US.json
@@ -89,6 +89,7 @@
"cancel": "Cancel",
"twitter_account": "realMaskNetwork",
"facebook_account": "masknetwork",
+ "hash_tag": "#mask_io",
"comment_box__placeholder": "Add an encrypted comment…",
"confirm": "Confirm",
"copy_text": "Copy text",
@@ -131,7 +132,7 @@
"setup_guide_verify_dismiss": "Don't show again.",
"setup_guide_verify_checking": "Checking",
"setup_guide_verify_post_not_found": "No verification post found",
- "setup_guide_verifying": "Verfiying",
+ "setup_guide_verifying": "Verifiying",
"setup_guide_verifying_failed": "Re-Verfiy",
"user_guide_tip_connected": "You have connected to this account successfully.",
"user_guide_tip_need_verify_on_next_id": "Mask Network requires you to post a verification tweet to access Next.ID-based products.",
@@ -566,6 +567,10 @@
"plugin_ito_continue": "Continue",
"plugin_ito_view_on_explorer": "View on Explorer",
"plugin_ito_unlock_tip": "Allow the contract {{address}} to use your {{symbol}} tokens when a new ITO round starts later.",
+ "plugin_ito_account_promote$default": "",
+ "plugin_ito_account_promote$twitter": "Follow @$t(twitter_account) (mask.io) to claim airdrop.",
+ "plugin_ito_account_promote$facebook": "Follow @$t(facebook_account) (mask.io) to claim airdrop.",
+ "plugin_ito_share_text": "I just claimed {{symbol}} with {{balance}}.{{account_promote}}\n$t(hash_tag)\n{{link}}",
"plugin_collectible_you": "You",
"plugin_collectible_done": "Done",
"plugin_collectible_retry": "Retry",
@@ -752,6 +757,10 @@
"plugin_dhedge_insufficient_balance": "Insufficient {{symbol}} balance",
"plugin_dhedge_pool_not_found": "Invalid pool address.",
"plugin_dhedge_smt_wrong": "Something went wrong!",
+ "plugin_dhedge_account_promote$default": "",
+ "plugin_dhedge_account_promote$twitter": "Follow @$t(twitter_account) (mask.io) to invest dHEDGE pools.",
+ "plugin_dhedge_account_promote$facebook": "Follow @$t(facebook_account) (mask.io) to invest dHEDGE pools.",
+ "plugin_dhedge_share_text": "I just invested {{amount}} {{symbol}} in {{pool}}. {{account_promote}}\n$t(hash_tag)",
"plugin_pooltogether_tab_pools": "Pools",
"plugin_pooltogether_name": "PoolTogether",
"plugin_pooltogether_description": "Participate in lossless lottery on Twitter.",
@@ -838,7 +847,7 @@
"plugin_unlockprotocol_no_lock_found": "No lock found. Create your own lock at Unlock protocol Creator Dashboard.",
"plugin_unlockprotocol_submit_post": "Submit Post",
"plugin_unlockprotocol_title": "Unlock Protocol",
- "plugin_unlockprotocol_server_error": "Some Server error occured, Please try again later.",
+ "plugin_unlockprotocol_server_error": "Some Server error occurred, Please try again later.",
"plugin_furucombo_tab_pool": "Pool",
"plugin_furucombo_dapp_name": "Furucombo",
"plugin_furucombo_dapp_description": "Create customized DeFi legos and put all strategies into one transaction.",
diff --git a/packages/mask/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx b/packages/mask/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx
index 7ba0f86157cb..321bfe7074c3 100644
--- a/packages/mask/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx
+++ b/packages/mask/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx
@@ -97,25 +97,23 @@ export function DonateDialog(props: DonateDialogProps) {
const [{ loading }, donateCallback] = useDonateCallback(address ?? '', amount.toFixed(), token)
// #endregion
- const cashTag = isTwitter(activatedSocialNetworkUI) ? '$' : ''
-
const openShareTxDialog = useOpenShareTxDialog()
const donate = useCallback(async () => {
const hash = await donateCallback()
if (typeof hash !== 'string') return
+ const cashTag = isTwitter(activatedSocialNetworkUI) ? '$' : ''
+ const isOnTwitter = isTwitter(activatedSocialNetworkUI)
+ const isOnFacebook = isFacebook(activatedSocialNetworkUI)
const shareText = token
- ? [
- `I just donated ${title} with ${formatBalance(amount, token.decimals)} ${cashTag}${token.symbol}. ${
- isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
- ? `Follow @${
- isTwitter(activatedSocialNetworkUI) ? tr('twitter_account') : tr('facebook_account')
- } (mask.io) to donate Gitcoin grants.`
- : ''
- }`,
- t.promote(),
- '#mask_io',
- postLink,
- ].join('\n')
+ ? t.share_text({
+ title,
+ balance: formatBalance(amount, token?.decimals),
+ symbol: `${cashTag}${token?.symbol || ''}`,
+ account_promote: t.account_promote({
+ context: isOnTwitter ? 'twitter' : isOnFacebook ? 'facebook' : 'default',
+ }),
+ link: postLink.toString(),
+ })
: ''
await openShareTxDialog({
hash,
diff --git a/packages/mask/src/plugins/Gitcoin/locales/en-US.json b/packages/mask/src/plugins/Gitcoin/locales/en-US.json
index 96bdf7b52625..3d48fab8d61b 100644
--- a/packages/mask/src/plugins/Gitcoin/locales/en-US.json
+++ b/packages/mask/src/plugins/Gitcoin/locales/en-US.json
@@ -11,5 +11,9 @@
"last_updated": "Last update:",
"by": "By",
"view_on": "View on Gitcoin",
- "readme_fund_link": "https://gitcoin.co/grants/86/gitcoin-sustainability-fund"
+ "readme_fund_link": "https://gitcoin.co/grants/86/gitcoin-sustainability-fund",
+ "account_promote$default": "",
+ "account_promote$twitter": "Follow @$t(mask:twitter_account) (mask.io) to donate Gitcoin grants",
+ "account_promote$facebook": "Follow @$t(mask:facebook_account) (mask.io) to donate Gitcoin grants",
+ "share_text": "I just donated {{title}} with {{balance}} {{symbol}}.\n{{account_promote}}\n$t(promote)\n$t(mask:hash_tag)\n{{link}}"
}
diff --git a/packages/mask/src/plugins/ITO/SNSAdaptor/ITO_Card.tsx b/packages/mask/src/plugins/ITO/SNSAdaptor/ITO_Card.tsx
index a075ed0152d7..456830eaa2b7 100644
--- a/packages/mask/src/plugins/ITO/SNSAdaptor/ITO_Card.tsx
+++ b/packages/mask/src/plugins/ITO/SNSAdaptor/ITO_Card.tsx
@@ -2,7 +2,7 @@ import type { ChainId, SchemaType } from '@masknet/web3-shared-evm'
import { Alert, Box, Skeleton, Typography } from '@mui/material'
import { useOpenShareTxDialog } from '@masknet/shared'
import { makeStyles, useStylesExtends } from '@masknet/theme'
-import { useCallback, useEffect } from 'react'
+import { useCallback, useEffect, useMemo } from 'react'
import { usePostLink } from '../../../components/DataSource/usePostInfo'
import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton'
import { activatedSocialNetworkUI } from '../../../social-network'
@@ -64,19 +64,20 @@ export function ITO_Card(props: ITO_CardProps) {
// #region claim
const [{ loading: isClaiming }, claimCallback] = useMaskClaimCallback()
const openShareTxDialog = useOpenShareTxDialog()
- const cashTag = isTwitter(activatedSocialNetworkUI) ? '$' : ''
const postLink = usePostLink()
- const shareText = [
- `I just claimed ${cashTag}${token?.symbol} with ${formatBalance(packet?.claimable, 18, 6)}.${
- isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
- ? `Follow @${
- isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account')
- } (mask.io) to claim airdrop.`
- : ''
- }`,
- '#mask_io',
- postLink,
- ].join('\n')
+ const shareText = useMemo(() => {
+ const isOnTwitter = isTwitter(activatedSocialNetworkUI)
+ const isOnFacebook = isFacebook(activatedSocialNetworkUI)
+ const cashTag = isOnTwitter ? '$' : ''
+ return t('plugin_ito_share_text', {
+ symbol: `${cashTag}${token?.symbol}`,
+ balance: formatBalance(packet?.claimable, 18, 6),
+ account_promote: t('plugin_ito_account_promote', {
+ context: isOnTwitter ? 'twitter' : isOnFacebook ? 'facebook' : 'default',
+ }),
+ link: postLink,
+ })
+ }, [t, postLink, packet?.claimable, token?.symbol])
const claim = useCallback(async () => {
const hash = await claimCallback()
@@ -90,7 +91,7 @@ export function ITO_Card(props: ITO_CardProps) {
onUpdateBalance()
packetRetry()
- }, [openShareTxDialog, claimCallback])
+ }, [shareText, openShareTxDialog, claimCallback])
// #endregion
// #region update parent amount
diff --git a/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketNft.tsx b/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketNft.tsx
index 5abe095bada5..bf5360c2065a 100644
--- a/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketNft.tsx
+++ b/packages/mask/src/plugins/RedPacket/SNSAdaptor/RedPacketNft.tsx
@@ -286,22 +286,21 @@ export function RedPacketNft({ payload }: RedPacketNftProps) {
const postLink = usePostLink()
const networkType = useNetworkType(NetworkPluginID.PLUGIN_EVM)
const shareText = useMemo(() => {
- const isTwitterOrFacebook = isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
+ const isOnTwitter = isTwitter(activatedSocialNetworkUI)
+ const isOnFacebook = isFacebook(activatedSocialNetworkUI)
const options = {
sender: payload.senderName,
payload: postLink.toString(),
network: networkResolver.networkName(networkType) || '',
- account: isTwitter(activatedSocialNetworkUI) ? i18n('twitter_account') : i18n('facebook_account'),
- }
+ account_promote: t.account_promote({
+ context: isOnTwitter ? 'twitter' : isOnFacebook ? 'facebook' : 'default',
+ }),
+ } as const
if (availability?.isClaimed) {
- return isTwitterOrFacebook
- ? t.nft_share_claimed_message(options)
- : t.nft_share_claimed_message_not_twitter(options)
+ return t.nft_share_claimed_message(options)
}
- return isTwitterOrFacebook
- ? t.nft_share_foreshow_message(options)
- : t.nft_share_foreshow_message_not_twitter(options)
- }, [availability?.isClaimed, t, i18n])
+ return t.nft_share_foreshow_message(options)
+ }, [availability?.isClaimed, t])
const onShare = useCallback(() => {
if (shareText) activatedSocialNetworkUI.utils.share?.(shareText)
diff --git a/packages/mask/src/plugins/RedPacket/locales/en-US.json b/packages/mask/src/plugins/RedPacket/locales/en-US.json
index 7cdfea81e923..163cd6210b8d 100644
--- a/packages/mask/src/plugins/RedPacket/locales/en-US.json
+++ b/packages/mask/src/plugins/RedPacket/locales/en-US.json
@@ -16,10 +16,11 @@
"completed": "Completed",
"expired": "Expired",
"nft_tip": "This is an NFT lucky drop.",
- "nft_share_foreshow_message_not_twitter": "@{{sender}} is sending an NFT lucky drop on {{network}} network. \n{{payload}}",
- "nft_share_foreshow_message": "@{{sender}} is sending an NFT lucky drop on {{network}} network. Follow @{{account}} (mask.io) to claim NFT lucky drops.\n#mask_io #LuckyDrop\n{{payload}}",
- "nft_share_claimed_message_not_twitter": "I just claimed an NFT lucky drop from @{{sender}} on {{network}} network.\n$t(promote_short) \n{{payload}}",
- "nft_share_claimed_message": "I just claimed an NFT lucky drop from @{{sender}} on {{network}} network. Follow @{{account}} (mask.io) to claim NFT lucky drops.\n$t(promote_short)\n#mask_io #LuckyDrop\n{{payload}}",
+ "account_promote$default": "",
+ "account_promote$twitter": "Follow @$t(mask:twitter_account) (mask.io) to claim NFT lucky drops.",
+ "account_promote$facebook": "Follow @$t(mask:facebook_account) (mask.io) to claim NFT lucky drops.",
+ "nft_share_foreshow_message": "@{{sender}} is sending an NFT lucky drop on {{network}} network. {{account_promote}}\n$t(mask:hash_tag) #LuckyDrop\n{{payload}}",
+ "nft_share_claimed_message": "I just claimed an NFT lucky drop from @{{sender}} on {{network}} network. {{account_promote}}\n$t(promote_short)\n$t(mask:hash_tag) #LuckyDrop\n{{payload}}",
"nft_total_amount": "Total Amount",
"nft_attached_message": "Attached Message",
"nft_account_name": "Wallet account",
diff --git a/packages/mask/src/plugins/Trader/SNSAdaptor/trader/Trader.tsx b/packages/mask/src/plugins/Trader/SNSAdaptor/trader/Trader.tsx
index f5f916f63e8f..cd910066f40a 100644
--- a/packages/mask/src/plugins/Trader/SNSAdaptor/trader/Trader.tsx
+++ b/packages/mask/src/plugins/Trader/SNSAdaptor/trader/Trader.tsx
@@ -17,7 +17,6 @@ import { useChainId, useChainIdValid, useFungibleTokenBalance, useWallet, useAcc
import { activatedSocialNetworkUI } from '../../../../social-network'
import { isFacebook } from '../../../../social-network-adaptor/facebook.com/base'
import { isTwitter } from '../../../../social-network-adaptor/twitter.com/base'
-import { useI18N as useBaseI18N } from '../../../../utils'
import { useI18N } from '../../locales'
import { isNativeTokenWrapper } from '../../helpers'
import { PluginTraderMessages } from '../../messages'
@@ -59,7 +58,6 @@ export function Trader(props: TraderProps) {
const { NATIVE_TOKEN_ADDRESS } = useTokenConstants()
const classes = useStylesExtends(useStyles(), props)
const t = useI18N()
- const { t: tr } = useBaseI18N()
const { setTargetChainId } = TargetChainIdContext.useContainer()
// #region trade state
@@ -227,27 +225,21 @@ export function Trader(props: TraderProps) {
const [openConfirmDialog, setOpenConfirmDialog] = useState(false)
const shareText = useMemo(() => {
+ const isOnTwitter = isTwitter(activatedSocialNetworkUI)
+ const isOnFacebook = isFacebook(activatedSocialNetworkUI)
const cashTag = isTwitter(activatedSocialNetworkUI) ? '$' : ''
return focusedTrade?.value && inputToken && outputToken
- ? [
- `I just swapped ${formatBalance(focusedTrade.value.inputAmount, inputToken.decimals, 6)} ${cashTag}${
- inputToken.symbol
- } for ${formatBalance(focusedTrade.value.outputAmount, outputToken.decimals, 6)} ${cashTag}${
- outputToken.symbol
- }.${
- isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
- ? `Follow @${
- isTwitter(activatedSocialNetworkUI) ? tr('twitter_account') : tr('facebook_account')
- } (mask.io) to swap cryptocurrencies on ${
- isTwitter(activatedSocialNetworkUI) ? 'Twitter' : 'Facebook'
- }.`
- : ''
- }`,
- '#mask_io',
- t.promote(),
- ].join('\n')
+ ? t.share_text({
+ input_amount: formatBalance(focusedTrade.value.inputAmount, inputToken.decimals, 6),
+ input_symbol: `${cashTag}${inputToken.symbol}`,
+ output_amount: formatBalance(focusedTrade.value.outputAmount, outputToken.decimals, 6),
+ output_symbol: `${cashTag}${outputToken.symbol}`,
+ account_promote: t.account_promote({
+ context: isOnTwitter ? 'twitter' : isOnFacebook ? 'facebook' : 'default',
+ }),
+ })
: ''
- }, [focusedTrade?.value, inputToken, outputToken, tr, t])
+ }, [focusedTrade?.value, inputToken, outputToken, t])
const openShareTxDialog = useOpenShareTxDialog()
const onConfirmDialogConfirm = useCallback(async () => {
setOpenConfirmDialog(false)
diff --git a/packages/mask/src/plugins/Trader/locales/en-US.json b/packages/mask/src/plugins/Trader/locales/en-US.json
index 5920a7a664f4..77152e0ff335 100644
--- a/packages/mask/src/plugins/Trader/locales/en-US.json
+++ b/packages/mask/src/plugins/Trader/locales/en-US.json
@@ -1,3 +1,7 @@
{
- "promote": "Instantly token exchange on Twitter. Install Mask.io to explore “better server” on Multi-chain Dex."
+ "promote": "Instantly token exchange on Twitter. Install Mask.io to explore “better server” on Multi-chain Dex.",
+ "account_promote$default": "",
+ "account_promote$twitter": "Follow @$t(mask:twitter_account) to swap cryptocurrencies on Twitter",
+ "account_promote$facebook": "Follow @$t(mask:facebook_account) to swap cryptocurrencies on Facebook",
+ "share_text": "I just swapped {{input_amount}} {{input_symbol}} for {{output_amount}} {{output_symbol}}. {{account_promote}}\n$t(mask:hash_tag)"
}
diff --git a/packages/mask/src/plugins/Trader/types/0x.ts b/packages/mask/src/plugins/Trader/types/0x.ts
index 5175a9d86ed0..7cc29a212e52 100644
--- a/packages/mask/src/plugins/Trader/types/0x.ts
+++ b/packages/mask/src/plugins/Trader/types/0x.ts
@@ -20,7 +20,7 @@ export interface SwapOrder {
signature: string
}
-export interface SwapPorportion {
+export interface SwapProportion {
name: ZrxTradePool
proportion: string
}
@@ -63,7 +63,7 @@ export interface SwapQuoteResponse {
minimumProtocolFee: string
buyAmount: string
sellAmount: string
- sources: SwapPorportion[]
+ sources: SwapProportion[]
buyTokenAddress: string
sellTokenAddress: string
orders: SwapOrder[]
diff --git a/packages/mask/src/plugins/dHEDGE/UI/InvestDialog.tsx b/packages/mask/src/plugins/dHEDGE/UI/InvestDialog.tsx
index d44507e27798..aa80632556e3 100644
--- a/packages/mask/src/plugins/dHEDGE/UI/InvestDialog.tsx
+++ b/packages/mask/src/plugins/dHEDGE/UI/InvestDialog.tsx
@@ -92,17 +92,17 @@ export function InvestDialog() {
const [{ loading: isInvesting }, investCallback] = useInvestCallback(pool, amount.toFixed(), token)
const openShareTxDialog = useOpenShareTxDialog()
const cashTag = isTwitter(activatedSocialNetworkUI) ? '$' : ''
+ const isOnTwitter = isTwitter(activatedSocialNetworkUI)
+ const isOnFacebook = isFacebook(activatedSocialNetworkUI)
const shareText = token
- ? [
- `I just invested ${formatBalance(amount, token.decimals)} ${cashTag}${token.symbol} in ${pool?.name}. ${
- isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
- ? `Follow @${
- isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account')
- } (mask.io) to invest dHEDGE pools.`
- : ''
- }`,
- '#mask_io',
- ].join('\n')
+ ? t('plugin_dhedge_share_text', {
+ amount: formatBalance(amount, token.decimals),
+ symbol: `${cashTag}${token.symbol}`,
+ pool: pool?.name,
+ account_promote: t('plugin_dhedge_account_promote', {
+ context: isOnTwitter ? 'twitter' : isOnFacebook ? 'facebook' : 'default',
+ }),
+ })
: ''
const invest = useCallback(async () => {
const hash = await investCallback()
diff --git a/packages/mask/src/social-network-adaptor/facebook.com/utils/selector.ts b/packages/mask/src/social-network-adaptor/facebook.com/utils/selector.ts
index ebc5798d5034..e11cb4460adf 100644
--- a/packages/mask/src/social-network-adaptor/facebook.com/utils/selector.ts
+++ b/packages/mask/src/social-network-adaptor/facebook.com/utils/selector.ts
@@ -103,21 +103,21 @@ export const profileTabUnselectedSelector: () => LiveSelector = () =>
export const profileTabSelectedSelector: () => LiveSelector = () =>
querySelector('[data-pagelet="ProfileTabs"] [aria-selected="true"]')
-// fot inserting web3 tab
+// for inserting web3 tab
export const searchProfileTabSelector: () => LiveSelector = () =>
querySelector('[data-pagelet="ProfileTabs"] a:nth-child(7)')
-// fot getting the inserted web3 tab
+// for getting the inserted web3 tab
export const web3TabSelector: () => LiveSelector = () =>
querySelector('[data-pagelet="ProfileTabs"] a:nth-child(7)+span')
-// fot inserting web3 tab content
+// for inserting web3 tab content
export const searchProfileTabPageSelector: () => LiveSelector = () =>
querySelector('[data-pagelet="ProfileAppSection_0"], [data-pagelet="ProfileTimeline"]')
.closest(1)
.querySelector('div:first-of-type')
-// fot getting profile section style
+// for getting profile section style
export const profileSectionSelector: () => LiveSelector = () =>
querySelector('[data-pagelet="ProfileAppSection_0"], [data-pagelet="ProfileTimeline"]').querySelector('[style]')
diff --git a/packages/mask/src/social-network-adaptor/twitter.com/injection/ToolboxHint_UI.tsx b/packages/mask/src/social-network-adaptor/twitter.com/injection/ToolboxHint_UI.tsx
index bb4f75987aee..df7e2f0892b0 100644
--- a/packages/mask/src/social-network-adaptor/twitter.com/injection/ToolboxHint_UI.tsx
+++ b/packages/mask/src/social-network-adaptor/twitter.com/injection/ToolboxHint_UI.tsx
@@ -22,8 +22,7 @@ const ListItem = styled(ListItemButton)<{ itemPadding?: string }>`
height: 50px;
}
`
-const Text = styled(Typography)<{ textMarginLeft?: string }>`
- margin-left: ${(props) => props.textMarginLeft ?? '20px'};
+const Text = styled(Typography)`
margin-right: 16px;
font-size: 15px;
font-family: inherit;
@@ -46,7 +45,7 @@ export function ToolboxHintAtTwitter(props: { category: 'wallet' | 'application'
iconFontSize="1.75rem"
mini={mini}
ListItemIcon={Icon}
- Typography={({ children }) => {children}}
+ Typography={({ children }) => {children}}
ListItemButton={({ children, onClick }) => (
{children}
diff --git a/packages/mask/src/utils/i18n-next-ui.ts b/packages/mask/src/utils/i18n-next-ui.ts
index 1e893020cca6..bccc2d6981bd 100644
--- a/packages/mask/src/utils/i18n-next-ui.ts
+++ b/packages/mask/src/utils/i18n-next-ui.ts
@@ -3,11 +3,17 @@ import type en from '../../shared-ui/locales/en-US.json'
import type { i18NextInstance, TranslateOptions } from '@masknet/shared-base'
import { SupportedLanguages } from '@masknet/public-api'
-export type I18NFunction = (
+type PluralsSuffix = 'zero' | 'one' | 'two' | 'few' | 'many' | 'other'
+
+type LocaleKeys = keyof typeof en
+type ExtendBaseKeys = K extends `${infer B}$${string}` ? B | K : K extends `${infer B}_${PluralsSuffix}` ? B | K : K
+type AvailableLocaleKeys = ExtendBaseKeys
+
+export type I18NFunction = (
key: TKeys | TKeys[],
// defaultValue?: string,
options?: TranslateOptions | string,
-) => typeof en[TKeys]
+) => string
/**
* Enhanced version of useTranslation
diff --git a/packages/plugins/GoPlusSecurity/src/locales/en-US.json b/packages/plugins/GoPlusSecurity/src/locales/en-US.json
index cddc79794532..a47f2827a25f 100644
--- a/packages/plugins/GoPlusSecurity/src/locales/en-US.json
+++ b/packages/plugins/GoPlusSecurity/src/locales/en-US.json
@@ -33,9 +33,9 @@
"risk_contract_source_code_not_verified_title": "Contract source code not verified",
"risk_contract_source_code_not_verified_body": "This token contract has not been verified. We cannot check the contract code for details. Unsourced token contracts are likely to have malicious functions to defraud users of their assets.",
"risk_proxy_contract_title": "Proxy contract",
- "risk_proxy_contract_body": "This contract is an Admin Upgradeability Proxy. The proxy contract means the contract owner can modifiy the function of the token and could possibly effect the price.There is possibly a way for the team to Rug or Scam. Please confirm the details with the project team before buying.",
+ "risk_proxy_contract_body": "This contract is an Admin Upgradeability Proxy. The proxy contract means the contract owner can modify the function of the token and could possibly effect the price.There is possibly a way for the team to Rug or Scam. Please confirm the details with the project team before buying.",
"risk_no_proxy_title": "No proxy",
- "risk_no_proxy_body": "There is no proxy in the contract. The proxy contract means contract owner can modifiy the function of the token and possibly effect the price.",
+ "risk_no_proxy_body": "There is no proxy in the contract. The proxy contract means contract owner can modify the function of the token and possibly effect the price.",
"risk_mint_function_title": "Mint function",
"risk_mint_function_body": "The contract may contain additional issuance functions, which could maybe generate a large number of tokens, resulting in significant fluctuations in token prices. It is recommended to confirm with the project team whether it complies with the token issuance instructions.",
"risk_no_mint_function_title": "No mint function",
diff --git a/packages/shared-base/src/i18n/instance.ts b/packages/shared-base/src/i18n/instance.ts
index 3e2e3cd9ff7a..fe89d0fafe4d 100644
--- a/packages/shared-base/src/i18n/instance.ts
+++ b/packages/shared-base/src/i18n/instance.ts
@@ -15,6 +15,7 @@ if (!i18n.isInitialized) {
i18n.use(Detector).init({
keySeparator: false,
interpolation: { escapeValue: false },
+ contextSeparator: '$',
fallbackLng: {
'zh-CN': ['zh-TW', 'en'],
'zh-TW': ['zh-CN', 'en'],
diff --git a/packages/shared/src/locales/en-US.json b/packages/shared/src/locales/en-US.json
index 5aa0d8a559a4..a697764017a2 100644
--- a/packages/shared/src/locales/en-US.json
+++ b/packages/shared/src/locales/en-US.json
@@ -7,7 +7,7 @@
"erc20_token_list_loading": "Loading token lists...",
"erc20_search_token_loading": "Loading token...",
"erc20_search_not_token_found": "No results or contract address does not meet the query criteria.",
- "address_viewer_binding_rules_title": "The NFT gallary will show NFTs as below rules:",
+ "address_viewer_binding_rules_title": "The NFT gallery will show NFTs as below rules:",
"address_viewer_binding_rule1": "The nickname is ENS or RNS.",
"address_viewer_binding_rule2": "The bio contains ENS, RNS or a valid address.",
"address_viewer_binding_rule3": "The ID + suffix is ENS or RNS.",