Skip to content

Commit

Permalink
Fix: update and fix translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamboster committed Dec 6, 2023
1 parent 13cad3a commit 4259971
Show file tree
Hide file tree
Showing 33 changed files with 4,503 additions and 1,942 deletions.
2 changes: 1 addition & 1 deletion i18next-parser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
lineEnding: 'auto',
// Control the line ending. See options at https://github.com/ryanve/eol

locales: ['en', 'es'],
locales: ['en', 'es', 'nl', 'fr', 'ja', 'de', 'pt', 'ru', 'zh'],
// An array of the locales in your applications

namespaceSeparator: false,
Expand Down
746 changes: 533 additions & 213 deletions locales/de/translation.json

Large diffs are not rendered by default.

458 changes: 283 additions & 175 deletions locales/en/translation.json

Large diffs are not rendered by default.

458 changes: 295 additions & 163 deletions locales/es/translation.json

Large diffs are not rendered by default.

754 changes: 537 additions & 217 deletions locales/fr/translation.json

Large diffs are not rendered by default.

744 changes: 532 additions & 212 deletions locales/ja/translation.json

Large diffs are not rendered by default.

746 changes: 533 additions & 213 deletions locales/nl/translation.json

Large diffs are not rendered by default.

744 changes: 532 additions & 212 deletions locales/pt/translation.json

Large diffs are not rendered by default.

744 changes: 532 additions & 212 deletions locales/ru/translation.json

Large diffs are not rendered by default.

744 changes: 532 additions & 212 deletions locales/zh/translation.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/components/list/TransactionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ const TransactionRow = ({
icon && <IconContainer>{icon}</IconContainer>
)}
{!!description && (
<Description
numberOfLines={details ? 2 : 1}
ellipsizeMode={'tail'}>
<Description numberOfLines={details ? 2 : 1} ellipsizeMode={'tail'}>
{description}
{details && (
<ListItemSubText>
Expand All @@ -84,7 +82,9 @@ const TransactionRow = ({
)}
<TailContainer>
{value ? <Value>{value}</Value> : null}
{time ? <ListItemSubText textAlign={'right'}>{time}</ListItemSubText> : null}
{time ? (
<ListItemSubText textAlign={'right'}>{time}</ListItemSubText>
) : null}
</TailContainer>
</TransactionContainer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/card/components/CardIntroFeatureTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const FEES = (): CardTableData[] => {
title: 'Card Load',
description: (
<>
<TextAlign align="right">{t('No conversion fee\n')}</TextAlign>
<TextAlign align="right">{t('No conversion fee') + '\n'}</TextAlign>
<TextAlign align="right">
<A href={URL.HELP_MINER_FEES}>
{t('Network and miner fees may apply')}
Expand Down
162 changes: 89 additions & 73 deletions src/navigation/card/components/CardIntroHighlights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,56 +87,66 @@ const CARD_HIGHLIGHTS = (): CardHighlight[] => {
</HighlightTitle>
),
description: (
<SubText>
<>
{t(
`The BitPay Card is only one of the ways we help you live on crypto. More ways to spend and cash out crypto with BitPay include:
\u2022 Pay with crypto -`,
)}{' '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/spend-crypto/'),
)
}>
<>{t('Spend crypto')}</>
</UnderlineLink>{' '}
{t(
'directly from your wallet with BitPay merchants. View a curated list of merchants who accept crypto in the',
)}{' '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/directory'),
)
}>
<>{t('BitPay Merchant Directory')}</>
</UnderlineLink>
{t(`.
\u2022 Buy gift cards -`)}{' '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/gift-cards/'),
)
}>
<>{t('Convert crypto into gift cards')}</>
</UnderlineLink>{' '}
{t(`for the most popular brands and retailers.
\u2022 Swap crypto -`)}{' '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser(
'https://bitpay.com/blog/what-is-a-crypto-swap/',
),
)
}>
<>{t('Swap crypto')}</>
</UnderlineLink>{' '}
{t('into a stablecoin like USDC using the BitPay app.')}
</>
</SubText>
<>
<SubText>
<>
{t(
'The BitPay Card is only one of the ways we help you live on crypto. More ways to spend and cash out crypto with BitPay include:',
)}
</>
</SubText>
<SubText style={{marginHorizontal: 15}}>
<>
{'\u2022 ' + t('Pay with crypto')}
{' - '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/spend-crypto/'),
)
}>
<>{t('Spend crypto')}</>
</UnderlineLink>{' '}
{t(
'directly from your wallet with BitPay merchants. View a curated list of merchants who accept crypto in the',
)}{' '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/directory'),
)
}>
<>{t('BitPay Merchant Directory')}</>
</UnderlineLink>
{'.'}
{'\n\u2022 ' + t('Buy gift cards')}
{' - '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser('https://bitpay.com/gift-cards/'),
)
}>
<>{t('Convert crypto into gift cards')}</>
</UnderlineLink>{' '}
{t('for the most popular brands and retailers.') +
'\n\u2022 ' +
t('Swap crypto')}
{' - '}
<UnderlineLink
onPress={() =>
dispatch(
openUrlWithInAppBrowser(
'https://bitpay.com/blog/what-is-a-crypto-swap/',
),
)
}>
<>{t('Swap crypto')}</>
</UnderlineLink>{' '}
{t('into a stablecoin like USDC using the BitPay app.')}
</>
</SubText>
</>
),
},
{
Expand Down Expand Up @@ -190,29 +200,35 @@ const CARD_HIGHLIGHTS = (): CardHighlight[] => {
</HighlightTitle>
),
description: (
<SubText>
<>
{t(
`BitPay supports Bitcoin, major alt coins, tokens, and stablecoins. We are constantly evaluating and adding new coins. Currently we support:
\u2022 Bitcoin (BTC)
\u2022 Ethereum (ETH)
\u2022 Bitcoin Cash (BCH)
\u2022 Dogecoin (DOGE)
\u2022 Shiba Inu (SHIB)
\u2022 Litecoin (LTC)
\u2022 XRP (XRP)
\u2022 ApeCoin (APE)
\u2022 Polygon (MATIC)
\u2022 Dai (DAI)
\u2022 Binance USD (BUSD)
\u2022 USD Coin (USDC)
\u2022 Wrapped Bitcoin (WBTC)
\u2022 Pax Dollar (USDP)
\u2022 Gemini Dollar (GUSD)
\u2022 Euro Coin (EUROC)`,
)}
</>
</SubText>
<>
<SubText>
<>
{t(
'BitPay supports Bitcoin, major alt coins, tokens, and stablecoins. We are constantly evaluating and adding new coins. Currently we support:',
)}
</>
</SubText>
<SubText style={{marginHorizontal: 15}}>
<>
{'\n\u2022 Bitcoin (BTC)'}
{'\n\u2022 Ethereum (ETH)'}
{'\n\u2022 Bitcoin Cash (BCH)'}
{'\n\u2022 Dogecoin (DOGE)'}
{'\n\u2022 Shiba Inu (SHIB)'}
{'\n\u2022 Litecoin (LTC)'}
{'\n\u2022 XRP (XRP)'}
{'\n\u2022 ApeCoin (APE)'}
{'\n\u2022 Polygon (MATIC)'}
{'\n\u2022 Dai (DAI)'}
{'\n\u2022 Binance USD (BUSD)'}
{'\n\u2022 USD Coin (USDC)'}
{'\n\u2022 Wrapped Bitcoin (WBTC)'}
{'\n\u2022 Pax Dollar (USDP)'}
{'\n\u2022 Gemini Dollar (GUSD)'}
{'\n\u2022 Euro Coin (EUROC)'}
</>
</SubText>
</>
),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ const ChangellyCheckout: React.FC = () => {
try {
const message =
fromWalletSelected.currencyAbbreviation.toUpperCase() +
t(' to ') +
' ' +
t('to') +
' ' +
toWalletSelected.currencyAbbreviation.toUpperCase();
let outputs = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const BanxaSettings: React.FC = () => {
</Settings>
</SettingsContainer>
<FooterSupport>
<SupportTxt>Having problems with Banxa?</SupportTxt>
<SupportTxt>{t('Having problems with Banxa?')}</SupportTxt>
<TouchableOpacity
onPress={() => {
haptic('impactLight');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const MoonpaySettings: React.FC = () => {
</Settings>
</SettingsContainer>
<FooterSupport>
<SupportTxt>Having problems with Moonpay?</SupportTxt>
<SupportTxt>{t('Having problems with Moonpay?')}</SupportTxt>
<TouchableOpacity
onPress={() => {
haptic('impactLight');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const RampSettings: React.FC = () => {
</Settings>
</SettingsContainer>
<FooterSupport>
<SupportTxt>Having problems with Ramp?</SupportTxt>
<SupportTxt>{t('Having problems with Ramp?')}</SupportTxt>
<TouchableOpacity
onPress={() => {
haptic('impactLight');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const SardineSettings: React.FC = () => {
</Settings>
</SettingsContainer>
<FooterSupport>
<SupportTxt>Having problems with Sardine?</SupportTxt>
<SupportTxt>{t('Having problems with Sardine?')}</SupportTxt>
<TouchableOpacity
onPress={() => {
haptic('impactLight');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const SimplexSettings: React.FC = () => {
</Settings>
</SettingsContainer>
<FooterSupport>
<SupportTxt>Having problems with Simplex?</SupportTxt>
<SupportTxt>{t('Having problems with Simplex?')}</SupportTxt>
<TouchableOpacity
onPress={() => {
haptic('impactLight');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ const EmailNotifications = () => {
/>

<CheckboxLabel>
{t('I agree to the ')}
{t('I agree to the') + ' '}
<A href={URL.TOU_BITPAY_ID}>
{t('Terms of Use')}
</A>{' '}
{t('and ')}
{t('and') + ' '}
<A href={URL.PRIVACY_POLICY}>
{t('Privacy Policy')}
</A>
Expand Down
13 changes: 7 additions & 6 deletions src/navigation/tabs/shop/ShopHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,17 @@ const ShopHome: React.FC<
marginHorizontal: 3,
numTabs: 3,
tabWidth: 111,
langAdjustments: true,
})}
screenListeners={{
tabPress: tab => {
if (tab.target) {
setActiveTab(
tab.target.includes(ShopTabs.GIFT_CARDS)
? t('Gift Cards')
? ShopTabs.GIFT_CARDS
: tab.target.includes(ShopTabs.BILLS)
? t('Pay Bills')
: t('Shop Online'),
? ShopTabs.BILLS
: ShopTabs.SHOP_ONLINE,
);
if (tab.target.includes(ShopTabs.BILLS)) {
dispatch(
Expand All @@ -351,14 +352,14 @@ const ShopHome: React.FC<
},
}}>
<Tab.Screen
name={ShopTabs.GIFT_CARDS}
name={t('Gift Cards')}
component={memoizedGiftCardCatalog}
/>
<Tab.Screen
name={ShopTabs.SHOP_ONLINE}
name={t('Shop Online')}
component={memoizedShopOnline}
/>
<Tab.Screen name={ShopTabs.BILLS} component={memoizedBills} />
<Tab.Screen name={t('Pay Bills')} component={memoizedBills} />
</Tab.Navigator>
</ShopInnerContainer>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/tabs/shop/bill/screens/Payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const Payment = ({
<AmountDue>{formatFiatAmount(payment.amount, 'USD')}</AmountDue>
<PaymentDateContainer>
<PaymentDate>
{t('Amount paid on: ')}
{t('Amount paid on:') + ' '}
<Paragraph style={{fontWeight: '500'}}>
{moment(payment.createdOn).format('MM/DD/YY')}
</Paragraph>
Expand Down
4 changes: 3 additions & 1 deletion src/navigation/tabs/shop/components/ShopOnline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ export const ShopOnline = ({
</HideableView>
<HideableView show={!!(searchVal && searchResults.length)}>
<SectionContainer>
<SectionHeader>{t('Search Results for ') + searchVal}</SectionHeader>
<SectionHeader>
{t('Search Results for') + ' ' + searchVal}
</SectionHeader>
</SectionContainer>
<SearchResults>
{searchResults.map(integration => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const MerchantDetails = ({
<Button
onPress={() => Linking.openURL(directIntegration.link)}
buttonStyle={'primary'}>
{t('Go to ') + directIntegration.displayName}
{t('Go to') + ' ' + directIntegration.displayName}
</Button>
</FooterButton>
</>
Expand Down
6 changes: 3 additions & 3 deletions src/navigation/wallet/screens/DeleteKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ const DeleteKey = () => {
<ScrollView>
<Title>{t('Warning!')}</Title>
<DeleteKeyParagraph>
{t(
'Permanently deletes all wallets using this key. \nTHIS ACTION CANNOT BE REVERSED.',
)}
{t('Permanently deletes all wallets using this key.') +
'\n' +
t('THIS ACTION CANNOT BE REVERSED.')}
</DeleteKeyParagraph>

<Button onPress={() => setIsVisible(true)}>{t('Delete')}</Button>
Expand Down
6 changes: 5 additions & 1 deletion src/navigation/wallet/screens/TransactionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ const TransactionDetails = () => {
<H7>
{txs.feeFiatStr}{' '}
{txs.feeRateStr
? '(' + txs.feeRateStr + ' of total amount)'
? '(' +
txs.feeRateStr +
' ' +
t('of total amount') +
')'
: null}
</H7>
) : (
Expand Down
6 changes: 5 additions & 1 deletion src/navigation/wallet/screens/TransactionProposalDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ const TransactionProposalDetails = () => {
<H7>
{txp.feeFiatStr}{' '}
{txp.feeRateStr
? '(' + txp.feeRateStr + t(' of total amount') + ')'
? '(' +
txp.feeRateStr +
' ' +
t('of total amount') +
')'
: null}
</H7>
) : (
Expand Down
Loading

0 comments on commit 4259971

Please sign in to comment.