Fix incorrect usages of I18nMessage

This commit is contained in:
infinite-persistence 2022-02-18 19:34:14 +08:00
parent 88e0ea5d7d
commit c04f61d318
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
4 changed files with 9 additions and 45 deletions

View file

@ -5,7 +5,6 @@ import React from 'react';
import Button from 'component/button';
import Card from 'component/common/card';
import Icon from 'component/common/icon';
import I18nMessage from 'component/i18nMessage';
import { Lbryio } from 'lbryinc';
import { getStripeEnvironment } from 'util/stripe';
let stripeEnvironment = getStripeEnvironment();
@ -54,18 +53,15 @@ const WalletBalance = () => {
</>
}
subtitle={
accountStatusResponse && accountStatusResponse.total_received_unpaid > 0 ? (
<I18nMessage>
This is your pending balance that will be automatically sent to your bank account.
</I18nMessage>
) : (
<I18nMessage>When you begin to receive tips your balance will be updated here.</I18nMessage>
)
accountStatusResponse && accountStatusResponse.total_received_unpaid > 0
? __('This is your pending balance that will be automatically sent to your bank account.')
: __('When you begin to receive tips your balance will be updated here.')
}
actions={
<>
<h2 className="section__title--small">
${(accountStatusResponse && accountStatusResponse.total_received_unpaid / 100) || 0} {__('Total Received Tips')}
${(accountStatusResponse && accountStatusResponse.total_received_unpaid / 100) || 0}{' '}
{__('Total Received Tips')}
</h2>
<h2 className="section__title--small">

View file

@ -6,8 +6,6 @@ import { Form, FormField } from 'component/common/form';
import { Formik } from 'formik';
import validateSendTx from 'util/form-validation';
import Card from 'component/common/card';
import I18nMessage from 'component/i18nMessage';
import LbcSymbol from 'component/common/lbc-symbol';
import WalletSpendableBalanceHelp from 'component/walletSpendableBalanceHelp';
import classnames from 'classnames';
import ChannelSelector from 'component/channelSelector';
@ -88,9 +86,7 @@ class WalletSend extends React.PureComponent<Props> {
return (
<Card
title={__('Send Credits')}
subtitle={
<I18nMessage tokens={{ lbc: <LbcSymbol /> }}>Send Credits to your friends or favorite creators.</I18nMessage>
}
subtitle={__('Send Credits to your friends or favorite creators.')}
actions={
<Formik
initialValues={{

View file

@ -12,7 +12,6 @@ import { SUPPORTED_MOONPAY_COUNTRIES } from 'constants/moonpay';
import { useHistory } from 'react-router';
import Button from 'component/button';
import Nag from 'component/common/nag';
import I18nMessage from 'component/i18nMessage';
import LbcSymbol from 'component/common/lbc-symbol';
import { SIMPLE_SITE } from 'config';
// import classnames from 'classnames';
@ -97,19 +96,7 @@ export default function BuyPage(props: Props) {
const title = __('Buy Credits');
const subtitle = (
<I18nMessage
tokens={{
learn_more: (
<Button
button="link"
label={__('Learn more')}
href="https://odysee.com/@OdyseeHelp:b/BuyingSellingLBRYCredits:b"
/>
),
}}
>
%learn_more%.
</I18nMessage>
<Button button="link" label={__('Learn more')} href="https://odysee.com/@OdyseeHelp:b/BuyingSellingLBRYCredits:b" />
);
if (MOONPAY_DOWN) {

View file

@ -7,7 +7,6 @@ import ClaimEffectiveAmount from 'component/claimEffectiveAmount';
import SearchTopClaim from 'component/searchTopClaim';
import * as CS from 'constants/claim_search';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
import * as PAGES from 'constants/pages';
import { SIMPLE_SITE } from 'config';
@ -31,22 +30,8 @@ function TopPage(props: Props) {
streamType={SIMPLE_SITE ? CS.CONTENT_ALL : undefined}
meta={
<div className="search__top-links">
<I18nMessage
tokens={{
repost: (
<Button
button="secondary"
navigate={`/$/${PAGES.REPOST_NEW}?to=${queryName}`}
label={__('Repost Here')}
/>
),
publish: (
<Button button="secondary" onClick={() => beginPublish(queryName)} label={__('Publish Here')} />
),
}}
>
%repost% %publish%
</I18nMessage>
<Button button="secondary" navigate={`/$/${PAGES.REPOST_NEW}?to=${queryName}`} label={__('Repost Here')} />
<Button button="secondary" onClick={() => beginPublish(queryName)} label={__('Publish Here')} />
</div>
}
includeSupportAction