Skip to content

Commit

Permalink
fix: used localize method from deriv-com/translations
Browse files Browse the repository at this point in the history
  • Loading branch information
farabi-deriv committed Sep 23, 2024
1 parent d09652a commit 7beac7e
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import classnames from 'classnames';
import { formatMoney, getCurrencyDisplayCode } from '@/components/shared';
import Text from '@/components/shared_ui/text';
import { LogTypes } from '@/external/bot-skeleton';
import { Localize, localize } from '@/utils/tmp/dummy';
import { Localize, localize } from '@deriv-com/translations';
import { TFormatMessageProps } from '../journal.types';

const FormatMessage = ({ logType, className, extra }: TFormatMessageProps) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/footer/Endpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Endpoint = () => {

if (serverURL) {
return (
<Text className='app-footer__endpoint' color='red' size='sm'>
<Text className='app-footer__endpoint' color='red' size='s'>
The server{' '}
<Link className='app-footer__endpoint-text' to={ENDPOINT}>
endpoint
Expand Down
6 changes: 3 additions & 3 deletions src/components/layout/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const AppHeader = () => {
onClick={() => {
window.location.assign('https://app.deriv.com/cashier/deposit');
}}
size='md'
size='s'
className='deposit-button'
>
<Text size='sm' weight='bold'>
<Text size='s' weight='bold'>
{localize('Deposit')}
</Text>
</Button>
Expand All @@ -60,7 +60,7 @@ const AppHeader = () => {
} else {
return (
<Button
size='sm'
size='s'
variant='outlined'
color='primary-light'
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/load-modal/local-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { observer } from 'mobx-react-lite';
import { NOTIFICATION_TYPE } from '@/components/bot-notification/bot-notification-utils';
import { useStore } from '@/hooks/useStore';
import { localize } from '@/utils/tmp/dummy';
import { localize } from '@deriv-com/translations';
import { useDevice } from '@deriv-com/ui';
import Button from '../shared_ui/button';

Expand Down
2 changes: 1 addition & 1 deletion src/components/load-modal/recent-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { observer } from 'mobx-react-lite';
import { NOTIFICATION_TYPE } from '@/components/bot-notification/bot-notification-utils';
import { useStore } from '@/hooks/useStore';
import { localize } from '@/utils/tmp/dummy';
import { localize } from '@deriv-com/translations';
import Button from '../shared_ui/button';

const RecentFooter = observer(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/components/route-prompt-dialog/route-prompt-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { observer } from 'mobx-react-lite';
import { useStore } from '@/hooks/useStore';
import { Localize, localize } from '@/utils/tmp/dummy';
import { localize } from '@/utils/tmp/dummy';
import { Localize } from '@deriv-com/translations';
import Dialog from '../shared_ui/dialog';

const RoutePromptDialog = observer(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/utils/helpers/chart-notifications.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Localize, localize } from '@/utils/tmp/dummy';
import { localize } from '@/utils/tmp/dummy';
import { Localize } from '@deriv-com/translations';

export const switch_to_tick_chart = {
key: 'switch_to_tick_chart',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Money from '@/components/shared_ui/money';
import { Localize, localize } from '@/utils/tmp/dummy';
import { localize } from '@/utils/tmp/dummy';
import { Localize } from '@deriv-com/translations';

export const contractSold = (currency: string, sold_for: number | string, Money: React.ElementType) => ({
key: 'contract_sold',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/load-bot-preview/local-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { observer } from 'mobx-react-lite';
import Button from '@/components/shared_ui/button';
import { useStore } from '@/hooks/useStore';
import { localize } from '@/utils/tmp/dummy';
import { localize } from '@deriv-com/translations';
import { useDevice } from '@deriv-com/ui';
import './index.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/load-bot-preview/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { observer } from 'mobx-react-lite';
import Dialog from '@/components/shared_ui/dialog';
import { DBOT_TABS } from '@/constants/bot-contents';
import { useStore } from '@/hooks/useStore';
import { Localize, localize } from '@/utils/tmp/dummy';
import { Localize, localize } from '@deriv-com/translations';
import { useDevice } from '@deriv-com/ui';
import BotPreview from './bot-preview';
import './index.scss';
Expand Down
6 changes: 3 additions & 3 deletions src/pages/dashboard/stop-bot-modal-content.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Dialog from '@/components/shared_ui/dialog';
import Text from '@/components/shared_ui/text';
import { Localize, localize } from '@/utils/tmp/dummy';
import { Localize, localize } from '@deriv-com/translations';

export type TStopBotModalContent = {
is_running: boolean;
Expand Down Expand Up @@ -50,7 +50,7 @@ const StopBotModalContent = ({
<Text weight='bold' as='span' lineHeight='s' size='xs'>
<Localize i18n_default_text='Reports' />
</Text>
<Localize i18n_default_text='page.' />
<Localize i18n_default_text=' page.' />
</Text>
<Text as='p' lineHeight='s' size='xs'>
<Localize i18n_default_text='The Quick Strategy you just created will be loaded to the workspace.' />
Expand All @@ -67,7 +67,7 @@ const StopBotModalContent = ({
<Localize i18n_default_text='Reports' />
</Text>
<Text as='span' lineHeight='s' size='xs' styles={{ paddingInlineStart: '0.4rem' }}>
<Localize i18n_default_text='page.' />
<Localize i18n_default_text=' page.' />
</Text>
</Text>
</>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/main/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import dbot from '@/external/bot-skeleton/scratch/dbot';
import { api_base } from '@/external/bot-skeleton/services/api/api-base';
import { isDbotRTL } from '@/external/bot-skeleton/utils/workspace';
import { useStore } from '@/hooks/useStore';
import { Localize, localize } from '@/utils/tmp/dummy';
import { localize } from '@/utils/tmp/dummy';
import {
LabelPairedChartLineCaptionRegularIcon,
LabelPairedObjectsColumnCaptionRegularIcon,
LabelPairedPuzzlePieceTwoCaptionBoldIcon,
LegacyGuide1pxIcon,
} from '@deriv/quill-icons';
import { Localize } from '@deriv-com/translations';
import { useDevice } from '@deriv-com/ui';
import RunPanel from '../../components/run-panel';
import Chart from '../chart';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tutorials/dbot-tours/common/tour-end-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { observer } from 'mobx-react-lite';
import Dialog from '@/components/shared_ui/dialog';
import Text from '@/components/shared_ui/text';
import { useStore } from '@/hooks/useStore';
import { Localize, localize } from '@/utils/tmp/dummy';
import { Localize, localize } from '@deriv-com/translations';
import { useDevice } from '@deriv-com/ui';

const TourEndDialog = observer(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import StaticUrl from '@/components/shared_ui/static-url';
import { Localize, localize } from '@/utils/tmp/dummy';
import { localize } from '@/utils/tmp/dummy';
import { Localize } from '@deriv-com/translations';

export default {
text: [
Expand Down

0 comments on commit 7beac7e

Please sign in to comment.