Skip to content

Commit

Permalink
Add translations and stories
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljscript committed Aug 2, 2024
1 parent 24a425d commit 842e72c
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 160 deletions.
1 change: 1 addition & 0 deletions apps/wallet-mobile/.storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {storiesOf} from '@storybook/react-native'
import {ChainWarning} from './ChainWarning'
import * as React from 'react'

storiesOf('ChainWarning', module).add('Default', () => (
<ChainWarning title="Test Title" description="Test Description" />
))
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,5 @@ export const ChainDAppsWarning = () => {
const isMainnet = network === Chain.Network.Mainnet

if (isMainnet) return null
return (
<ChainWarning
title={'Testnet DApps 🚧'}
description={
'This is a list of DApps designed for testnet use. Note that it may be limited, as not all DApps are deployed in the testnet environment.'
}
/>
)
return <ChainWarning title={strings.testnetWarningTitle} description={strings.testnetWarningDescription} />
}
11 changes: 11 additions & 0 deletions apps/wallet-mobile/src/features/Discover/common/useStrings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const useStrings = () => {
fee: intl.formatMessage(messages.fee),
signData: intl.formatMessage(messages.signData),
signMessage: intl.formatMessage(messages.signMessage),
testnetWarningTitle: intl.formatMessage(messages.testnetWarningTitle),
testnetWarningDescription: intl.formatMessage(messages.testnetWarningDescription),
}).current
}

Expand Down Expand Up @@ -206,5 +208,14 @@ export const messages = Object.freeze(
id: 'discover.reviewTransaction.signMessage',
defaultMessage: '!!!Sign message',
},
testnetWarningTitle: {
id: 'discover.testnetWarning.title',
defaultMessage: '!!!Testnet DApps 🚧',
},
testnetWarningDescription: {
id: 'discover.testnetWarning.description',
defaultMessage:
'!!!This is a list of DApps designed for testnet use. Note that it may be limited, as not all DApps are deployed in the testnet environment.',
},
}),
)
2 changes: 2 additions & 0 deletions apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,8 @@
"discover.reviewTransaction.fee": "Transaction fee",
"discover.reviewTransaction.signData": "Sign data",
"discover.reviewTransaction.signMessage": "Sign message",
"discover.testnetWarning.title": "Testnet DApps \uD83D\uDEA7",
"discover.testnetWarning.description": "This is a list of DApps designed for testnet use. Note that it may be limited, as not all DApps are deployed in the testnet environment.",
"portfolio.portfolioDashboardScreen.totalWalletValue": "Total wallet value",
"portfolio.portfolioDashboardScreen.tokens": "Tokens ({countTokens})",
"portfolio.portfolioDashboardScreen.buyADATitle": "Start your crypto journey",
Expand Down
Loading

0 comments on commit 842e72c

Please sign in to comment.