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

Farabi/bot 317/translation fixes for dbot homepage #9108

Merged
Show file tree
Hide file tree
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 @@ -34,7 +34,7 @@ Blockly.Blocks.math_modulo = {
meta() {
return {
display_name: localize('Remainder after division'),
description: localize(' Returns the remainder after the division of the given numbers.'),
description: localize('Returns the remainder after the division of the given numbers.'),
};
},
getRequiredValueInputs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import { getSavedWorkspaces } from '@deriv/bot-skeleton';
import { MobileWrapper, Text } from '@deriv/components';
import { isMobile } from '@deriv/shared';
import { Localize } from '@deriv/translations';
import { Localize, localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import RootStore from 'Stores/index';
import { TWorkspace } from 'Stores/load-modal-store';
Expand All @@ -19,7 +19,7 @@ type TRecentComponent = {
strategy_save_type: string;
};

const HEADERS = ['Bot name', 'Last modified', 'Status'];
const HEADERS = [localize('Bot name'), localize('Last modified'), localize('Status')];

const RecentComponent = ({
dashboard_strategies,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ export const DBOT_ONBOARDING = [
step_index={6}
/>
),
locale: { last: localize('Next') },
...joyride_props,
disableOverlay: false,
},
Expand Down Expand Up @@ -457,7 +456,6 @@ export const BOT_BUILDER_TOUR = [
{
target: '.animation__wrapper',
content: <Step6 show_label />,
locale: { last: localize('Next') },
...joyride_props,
},
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { localize } from '@deriv/translations';
import { TDropdownItems, TInputBaseFields, TInputsFieldNames, TSelectsFieldNames } from '../../quick-strategy.types';
import { common_inputs_properties } from '..';
import { TCommonInputsProperties } from './common-input-properties';
Expand Down Expand Up @@ -30,28 +31,28 @@ const data_fields: ReadonlyArray<TDataFields> = [
field_name: 'quick-strategy__symbol',
className: 'quick-strategy__dropdown quick-strategy__leading',
select_value: 'symbol',
label: 'Asset',
label: localize('Asset'),
},
{
id: 'trade-type',
field_name: 'quick-strategy__trade-type',
className: 'quick-strategy__dropdown quick-strategy__leading',
select_value: 'trade-type',
label: 'Trade type',
label: localize('Trade type'),
},
{
id: 'duration-unit',
field_name: 'quick-strategy__duration-unit',
className: '',
select_value: 'duration-unit',
label: 'Duration unit',
label: localize('Duration unit'),
is_able_disabled: true,
},
{
id: 'duration-value',
field_name: 'quick-strategy__duration-value',
input_value: 'input_duration_value',
label: 'Duration value',
label: localize('Duration value'),
placeholder: '5',
trailing_icon_message: 'The trade length of your purchased contract.',
...common_inputs_properties,
Expand All @@ -60,7 +61,7 @@ const data_fields: ReadonlyArray<TDataFields> = [
id: 'stake',
field_name: 'quick-strategy__stake',
input_value: 'input_stake',
label: 'Initial stake',
label: localize('Initial stake'),
placeholder: '10',
trailing_icon_message: 'The amount that you pay to enter a trade.',
...common_inputs_properties,
Expand All @@ -69,7 +70,7 @@ const data_fields: ReadonlyArray<TDataFields> = [
id: 'loss',
field_name: 'quick-strategy__loss',
input_value: 'input_loss',
label: 'Loss threshold',
label: localize('Loss threshold'),
placeholder: '5000',
trailing_icon_message: getMessage('loss'),
...common_inputs_properties,
Expand All @@ -84,7 +85,7 @@ const data_fields: ReadonlyArray<TDataFields> = [
id: 'profit',
field_name: 'quick-strategy__profit',
input_value: 'input_profit',
label: 'Profit threshold',
label: localize('Profit threshold'),
placeholder: '5000',
trailing_icon_message: getMessage('profit'),
...common_inputs_properties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,21 @@ const TourTriggrerDialog = ({
const getTourHeaders = (tour_check: boolean, tab_id: number) => {
let text;
if (!tour_check) {
if (tab_id === 1) text = localize(is_mobile ? 'Bot Builder guide' : "Let's build a Bot!");
if (tab_id === 1) text = is_mobile ? localize('Bot Builder guide') : localize("Let's build a Bot!");
else text = localize('Get started on Deriv Bot');
} else if (tab_id === 1) text = localize('Congratulations');
else text = localize('Want to retake the tour?');
return text;
};

const tourDialogInfo = is_mobile
? 'Here’s a quick guide on how to use Deriv Bot on the go.'
: 'Learn how to build your bot from scratch using a simple strategy.';

const tourDialogAction = is_mobile
? 'You can import a bot from your mobile device or from Google drive, see a preview in the bot builder, and start trading by running the bot.'
: 'Hit the <0>Start</0> button to begin and follow the tutorial.';

const getTourContent = (type: string) => {
return (
<>
Expand All @@ -78,23 +86,12 @@ const TourTriggrerDialog = ({
(!has_tour_ended ? (
<>
<div className='dc-dialog__content__description__text'>
<Localize
key={0}
i18n_default_text={
is_mobile
? 'Here’s a quick guide on how to use Deriv Bot on the go.'
: 'Learn how to build your bot from scratch using a simple strategy.'
}
/>
<Localize key={0} i18n_default_text={tourDialogInfo} />
</div>
<div className='dc-dialog__content__description__text'>
<Localize
key={0}
i18n_default_text={
is_mobile
? 'You can import a bot from your mobile device or from Google drive, see a preview in the bot builder, and start trading by running the bot.'
: 'Hit the <0>Start</0> button to begin and follow the tutorial.'
}
i18n_default_text={tourDialogAction}
components={[<strong key={0} />]}
/>
</div>
Expand Down