优化部分多国语言

This commit is contained in:
myf 2022-05-06 17:38:32 +08:00
parent 0aa34cfc85
commit c85534bb8f
14 changed files with 83 additions and 58 deletions

View File

@ -20,4 +20,6 @@ REACT_APP_SNAPSHOT_VOTING_API = "https://xtjyd0liqe.execute-api.ap-northeast-1.a
REACT_APP_REQUEST_URL = 'http://101.35.117.69:9090' REACT_APP_REQUEST_URL = 'http://101.35.117.69:9090'
# REACT_APP_REQUEST_URL = 'http://192.168.2.147:8080'
# REACT_APP_REQUEST_URL = 'http://192.168.2.28:8080' # REACT_APP_REQUEST_URL = 'http://192.168.2.28:8080'
# REACT_APP_REQUEST_URL = 'http://6o7g1fv83e.51xd.pub'

View File

@ -1122,5 +1122,8 @@
"Insufficient Balance": "余额不足", "Insufficient Balance": "余额不足",
"HCC Currency amount": "HCC币总量", "HCC Currency amount": "HCC币总量",
"Lock up time": "锁仓时间", "Lock up time": "锁仓时间",
"possess LP": "持有LP" "possess LP": "持有LP",
"capital pool": "资金池",
"Unclaimed income": "待领取收益",
"pledge": "质押"
} }

View File

@ -35,28 +35,28 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [
icon: 'FarmIcon', icon: 'FarmIcon',
href: 'https://pancake.kiemtienonline360.com/#/pool', href: 'https://pancake.kiemtienonline360.com/#/pool',
}, },
// {
// label: t('Farms'),
// icon: 'FarmIcon',
// href: '/farms',
// },
// {
// label: t('Pools'),
// icon: 'PoolIcon',
// href: '/pools',
// },
{ {
label: t('Farms'), label: t('recommend'),
icon: 'FarmIcon',
href: '/farms',
},
{
label: t('Pools'),
icon: 'PoolIcon',
href: '/pools',
},
{
label: t('Referral'),
icon: 'PoolIcon', icon: 'PoolIcon',
href: '/referral', href: '/referral',
}, },
// {
// label: 'NFT',
// icon: 'TicketIcon',
// href: '/nft',
// },
{ {
label: 'NFT', label: t('capital pool'),
icon: 'TicketIcon',
href: '/nft',
},
{
label: t('Board'),
icon: 'TicketIcon', icon: 'TicketIcon',
href: '/board', href: '/board',
}, },

View File

@ -66,7 +66,6 @@ const Menu = (props) => {
useEffect(() => { useEffect(() => {
getDetails() getDetails()
}, []) }, [])
return ( return (
<UikitMenu <UikitMenu
account={account} account={account}

View File

@ -30,34 +30,34 @@ export const ZHCN: Language = { locale: 'zh-CN', language: '简体中文', code:
export const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' } export const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' }
export const languages = { export const languages = {
'ar-SA': AR, // 'ar-SA': AR,
'bn-BD': BN, // 'bn-BD': BN,
'en-US': EN, 'en-US': EN,
'de-DE': DE, // 'de-DE': DE,
'el-GR': EL, // 'el-GR': EL,
'es-ES': ESES, // 'es-ES': ESES,
'fi-FI': FI, // 'fi-FI': FI,
'fil-PH': FIL, // 'fil-PH': FIL,
'fr-FR': FR, // 'fr-FR': FR,
'hi-IN': HI, // 'hi-IN': HI,
'hu-HU': HU, // 'hu-HU': HU,
'id-ID': ID, // 'id-ID': ID,
'it-IT': IT, // 'it-IT': IT,
'ja-JP': JA, // 'ja-JP': JA,
'ko-KR': KO, // 'ko-KR': KO,
'nl-NL': NL, // 'nl-NL': NL,
'pl-PL': PL, // 'pl-PL': PL,
'pt-BR': PTBR, // 'pt-BR': PTBR,
'pt-PT': PTPT, // 'pt-PT': PTPT,
'ro-RO': RO, // 'ro-RO': RO,
'ru-RU': RU, // 'ru-RU': RU,
'sv-SE': SVSE, // 'sv-SE': SVSE,
'ta-IN': TA, // 'ta-IN': TA,
'tr-TR': TR, // 'tr-TR': TR,
'uk-UA': UK, // 'uk-UA': UK,
'vi-VN': VI, // 'vi-VN': VI,
'zh-CN': ZHCN, 'zh-CN': ZHCN,
'zh-TW': ZHTW, // 'zh-TW': ZHTW,
} }
export const languageList = Object.values(languages) export const languageList = Object.values(languages)

View File

@ -1250,5 +1250,8 @@
"Loaded all": "Loaded all", "Loaded all": "Loaded all",
"HCC Currency amount": "HCC Currency amount", "HCC Currency amount": "HCC Currency amount",
"Lock up time": "Lock up time", "Lock up time": "Lock up time",
"possess LP": "possess LP" "possess LP": "possess LP",
"capital pool": "capital pool",
"Unclaimed income": "Unclaimed income",
"pledge": "pledge"
} }

View File

@ -4,7 +4,7 @@ import { CACHE_TOKEN } from 'config/constants/cacheKey'
// create an axios instance // create an axios instance
const request = axios.create({ const request = axios.create({
baseURL: process.env.REACT_APP_REQUEST_URL, baseURL: process.env.REACT_APP_REQUEST_URL,
timeout: 50000, // request timeout timeout: 5000000, // request timeout
}) })
let hasInit = false let hasInit = false
export const initAxios = (clearUserInfo, toast) => { export const initAxios = (clearUserInfo, toast) => {

View File

@ -6,6 +6,7 @@ interface InfoProps {
title?: string title?: string
content?: string content?: string
publishTime?: number publishTime?: number
top?: boolean
} }
const FlexTable = styled(Flex)` const FlexTable = styled(Flex)`
@ -18,9 +19,10 @@ const FlexTable = styled(Flex)`
const TableInfo = styled.div` const TableInfo = styled.div`
width: 70%; width: 70%;
` `
const TextTitle = styled(Text)` const FlexTitle = styled(Flex)`
font-size: 18px; font-size: 18px;
color: #333333; color: #333333;
align-items: center;
` `
const TextInfo = styled(Text)` const TextInfo = styled(Text)`
overflow: hidden; overflow: hidden;
@ -36,13 +38,28 @@ const TextTime = styled(Text)`
font-size: 18px; font-size: 18px;
color: #999999; color: #999999;
` `
const TextTop = styled(Flex)`
margin-left: 10px;
width: 50px;
height: 25px;
align-items: center;
justify-content: center;
background: #eff4f5;
opacity: 0.75;
border-radius: 15px;
font-size: 12px;
color: #1fc7d4;
`
const ListItem: React.FC<InfoProps> = ({ title, content, publishTime }) => { const ListItem: React.FC<InfoProps> = ({ title, content, publishTime, top = false }) => {
return ( return (
<> <>
<FlexTable> <FlexTable>
<TableInfo> <TableInfo>
<TextTitle>{title}</TextTitle> <FlexTitle>
{title}
{top ? <TextTop></TextTop> : ''}
</FlexTitle>
<TextInfo>{content}</TextInfo> <TextInfo>{content}</TextInfo>
</TableInfo> </TableInfo>
<TextTime color="textSubtle">{publishTime}</TextTime> <TextTime color="textSubtle">{publishTime}</TextTime>

View File

@ -186,7 +186,7 @@ const Announcement: React.FC = () => {
<div> <div>
{list.map((item) => ( {list.map((item) => (
<Text key={item.id} onClick={() => lookDetail(item.id)}> <Text key={item.id} onClick={() => lookDetail(item.id)}>
<ListItem title={item.title} publishTime={item.publishTime} content={item.content} /> <ListItem title={item.title} publishTime={item.publishTime} content={item.content} top={item.top} />
</Text> </Text>
))} ))}
</div> </div>

View File

@ -62,7 +62,7 @@ const FCard = styled.div`
padding: 24px; padding: 24px;
position: relative; position: relative;
text-align: center; text-align: center;
min-height: 310px; min-height: 410px;
` `
const Divider = styled.div` const Divider = styled.div`

View File

@ -59,7 +59,7 @@ const CardActions: React.FC<NodeCardActionsProps> = ({ board, account }) => {
<StakeAction stakedBalance={stakedBalance} tokenBalance={tokenBalance} pid={pid} /> <StakeAction stakedBalance={stakedBalance} tokenBalance={tokenBalance} pid={pid} />
<Flex flexDirection="column" alignItems="flex-start" mt="10"> <Flex flexDirection="column" alignItems="flex-start" mt="10">
<Text color="textSubtle" fontSize="12px"> <Text color="textSubtle" fontSize="12px">
{t('TotalProfit')} {t('Unclaimed income')}
</Text> </Text>
<HarvestAction earnings={new BigNumber(estimatedProfit)} pid={pid} /> <HarvestAction earnings={new BigNumber(estimatedProfit)} pid={pid} />
</Flex> </Flex>

View File

@ -59,7 +59,7 @@ const StakeAction: React.FC<NodeCardActionsProps> = ({ stakedBalance, tokenBalan
} }
const renderStakingButtons = () => { const renderStakingButtons = () => {
return rawStakedBalance === 0 ? ( return rawStakedBalance === 0 ? (
<Button onClick={onPresentDeposit}>{t(`Stake Token`)}</Button> <Button onClick={onPresentDeposit}>{t(`pledge`)}</Button>
) : ( ) : (
<IconButtonWrapper> <IconButtonWrapper>
{userData.stakedBalance > 0 ? ( {userData.stakedBalance > 0 ? (

View File

@ -45,7 +45,7 @@ const DepositModal: React.FC<DepositModalProps> = ({
}, [fullBalance, setVal]) }, [fullBalance, setVal])
return ( return (
<Modal title={t('Stake tokens')} onDismiss={onDismiss}> <Modal title={t('pledge')} onDismiss={onDismiss}>
<ModalInput <ModalInput
value={val} value={val}
onSelectMax={handleSelectMax} onSelectMax={handleSelectMax}

View File

@ -148,7 +148,7 @@ const FristCom: React.FC = () => {
Object.keys(item.linkMap).forEach((key) => { Object.keys(item.linkMap).forEach((key) => {
links.push({ name: key, link: item.linkMap[key], icon: item.iconResource.url }) links.push({ name: key, link: item.linkMap[key], icon: item.iconResource.url })
}) })
list.push({ icon: item.iconResource.url, list: links }) list.push({ icon: item.iconResource.url, name: item.name, list: links })
}) })
setLinkList(list) setLinkList(list)
setDetail(data) setDetail(data)
@ -158,8 +158,8 @@ const FristCom: React.FC = () => {
}, []) }, [])
const openLink = (link) => { const openLink = (link) => {
console.log('link:', link) console.log('link:', link)
// window.open(link) window.open(link)
window.location.href = link // window.location.href = link
} }
return ( return (
<> <>
@ -185,6 +185,7 @@ const FristCom: React.FC = () => {
<BtnImage <BtnImage
style={{ borderRadius: '50%' }} style={{ borderRadius: '50%' }}
src={item.icon} src={item.icon}
title={item.name}
alt={item.name} alt={item.name}
width={34} width={34}
height={34} height={34}