Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

henry/fix: dtrader translation issue #9062

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,36 @@ import { Localize } from '@deriv/translations';
import { Text } from '@deriv/components';

const AccumulatorTradeDescription = ({ onClick }: { onClick: () => void }) => {
const content = [
'Accumulators allow you to express a view on the range of movement of an index and grow your stake exponentially at a fixed <0>growth rate</0>.',
'Your <0>payout</0> is the sum of your inital stake and profit.',
'Your stake will continue to grow as long as the current spot price remains within a specified <0>range</0> from the <0>previous spot price</0>. Otherwise, you lose your stake and the trade is terminated.',
'You can close your trade anytime. However, be aware of <0>slippage risk<0/>.',
];

return (
<React.Fragment>
{content.map(text => (
<Text as='p' key={text.substring(0, 6)}>
<Localize
i18n_default_text={text}
components={[
<span className='contract-type-info__content-definition' onClick={onClick} key={0} />,
]}
/>
</Text>
))}
<Text as='p'>
<Localize
i18n_default_text={
'Accumulators allow you to express a view on the range of movement of an index and grow your stake exponentially at a fixed <0>growth rate</0>.'
}
components={[<span className='contract-type-info__content-definition' onClick={onClick} key={0} />]}
/>
</Text>
<Text as='p'>
<Localize
i18n_default_text={'Your <0>payout</0> is the sum of your inital stake and profit.'}
components={[<span className='contract-type-info__content-definition' onClick={onClick} key={0} />]}
/>
</Text>
<Text as='p'>
<Localize
i18n_default_text={
'Your stake will continue to grow as long as the current spot price remains within a specified <0>range</0> from the <0>previous spot price</0>. Otherwise, you lose your stake and the trade is terminated.'
}
components={[<span className='contract-type-info__content-definition' onClick={onClick} key={0} />]}
/>
</Text>
<Text as='p'>
<Localize
i18n_default_text={'You can close your trade anytime. However, be aware of <0>slippage risk<0/>.'}
components={[<span className='contract-type-info__content-definition' onClick={onClick} key={0} />]}
/>
</Text>
</React.Fragment>
);
};
Expand Down