Skip to content

Commit

Permalink
improvements & translations
Browse files Browse the repository at this point in the history
  • Loading branch information
rastajpa committed Jul 6, 2022
1 parent 4c1b888 commit 0269720
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
3 changes: 2 additions & 1 deletion locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@
"Connected to": "Connected to",
"Linked Wallet": "Linked Wallet",
"Pending Requests": "Pending Requests",
"Created on": "Created on {{createdOn}}",
"Created on": "Created on {{date}}",
"Created ": "Created {{date}}",
"No pending requests": "No pending requests",
"WalletConnect is an open source protocol for connecting decentralized applications to mobile wallets with QR code scanning or deep linking.": "WalletConnect is an open source protocol for connecting decentralized applications to mobile wallets with QR code scanning or deep linking.",
"Learn More": "Learn More",
Expand Down
3 changes: 2 additions & 1 deletion locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@
"Connected to": "Conectado a",
"Linked Wallet": "Billetera vinculada",
"Pending Requests": "Solicitudes pendientes",
"Created on": "Creado el {{createdOn}}",
"Created on": "Creado el {{date}}",
"Created ": "Creado {{date}}",
"No pending requests": "No hay solicitudes pendientes",
"WalletConnect is an open source protocol for connecting decentralized applications to mobile wallets with QR code scanning or deep linking.": "WalletConnect es un protocolo de código abierto para conectar aplicaciones descentralizadas a billeteras móviles con escaneo de código QR o con un enlace profundo.",
"Learn More": "Aprender más",
Expand Down
27 changes: 19 additions & 8 deletions src/navigation/wallet-connect/screens/WalletConnectHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ import {Wallet} from '../../../store/wallet/wallet.models';
import {convertHexToNumber} from '@walletconnect/utils';
import {OnGoingProcessMessages} from '../../../components/modal/ongoing-process/OngoingProcess';
import {useTranslation} from 'react-i18next';
import {GetAmFormatDate} from '../../../store/wallet/utils/time';
import {
GetAmFormatDate,
GetAmTimeAgo,
WithinPastDay,
} from '../../../store/wallet/utils/time';

export type WalletConnectHomeParamList = {
peerId: string;
Expand Down Expand Up @@ -337,13 +341,20 @@ const WalletConnectHome = () => {
<ItemNoteContainer>
<View style={{alignItems: 'flex-end'}}>
<IconLabel>{amountStr}</IconLabel>
{request.createdOn ? (
<Smallest style={{marginRight: 12}}>
{t('Created on', {
createdOn: GetAmFormatDate(request.createdOn),
})}
</Smallest>
) : null}
{request.createdOn &&
(WithinPastDay(request.createdOn) ? (
<Smallest style={{marginRight: 12}}>
{t('Created on', {
date: GetAmFormatDate(request.createdOn),
})}
</Smallest>
) : (
<Smallest style={{marginRight: 12}}>
{t('Created ', {
date: GetAmTimeAgo(request.createdOn),
})}
</Smallest>
))}
</View>
<IconContainer>
<AngleRight />
Expand Down

0 comments on commit 0269720

Please sign in to comment.