diff --git a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx index f0883e32..3ce0f493 100644 --- a/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx +++ b/src/features/Apiexplorer/Dropdown/DropdownList/index.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { playground_requests } from '@site/src/utils/playground_requests'; import clsx from 'clsx'; import styles from './DropdownList.module.scss'; +import Translate from '@docusaurus/Translate'; type TDropdownList = { selected: string; @@ -35,10 +36,14 @@ const DropdownList = ({ />
- Select API Call - Version 3 + + Select API Call - Version 3 +
- ALL CALLS + + ALL CALLS +
{playground_requests .filter((option) => { diff --git a/src/features/Apiexplorer/LoginDialog/index.tsx b/src/features/Apiexplorer/LoginDialog/index.tsx index 48f14d9b..a720f93e 100644 --- a/src/features/Apiexplorer/LoginDialog/index.tsx +++ b/src/features/Apiexplorer/LoginDialog/index.tsx @@ -2,6 +2,7 @@ import React, { useCallback } from 'react'; import { Modal, Button } from '@deriv/ui'; import useLoginUrl from '@site/src/hooks/useLoginUrl'; import styles from './LoginDialog.module.scss'; +import Translate from '@docusaurus/Translate'; type TLoginDialog = { setToggleModal: React.Dispatch>; @@ -34,13 +35,15 @@ export const LoginDialog = ({ setToggleModal }: TLoginDialog) => { has_close_button className={styles.wrapper} > -
Log in or sign up to continue.
+
+ Log in or sign up to continue. +
diff --git a/src/features/Apiexplorer/SubscribeRenderer/index.tsx b/src/features/Apiexplorer/SubscribeRenderer/index.tsx index a2dee172..49102d42 100644 --- a/src/features/Apiexplorer/SubscribeRenderer/index.tsx +++ b/src/features/Apiexplorer/SubscribeRenderer/index.tsx @@ -11,6 +11,7 @@ import useDisableSendRequest from '@site/src/hooks/useDisableSendRequest'; import LoginDialog from '../LoginDialog'; import PlaygroundSection from '../RequestResponseRenderer/PlaygroundSection'; import ValidDialog from '../ValidDialog'; +import Translate from '@docusaurus/Translate'; export interface IResponseRendererProps { name: T; @@ -60,10 +61,10 @@ function SubscribeRenderer({
{is_valid ? ( diff --git a/src/features/Apiexplorer/ValidDialog/index.tsx b/src/features/Apiexplorer/ValidDialog/index.tsx index 9a9a439d..06296522 100644 --- a/src/features/Apiexplorer/ValidDialog/index.tsx +++ b/src/features/Apiexplorer/ValidDialog/index.tsx @@ -1,6 +1,7 @@ import React, { useCallback } from 'react'; import { Modal } from '@deriv/ui'; import styles from '../LoginDialog/LoginDialog.module.scss'; +import Translate from '@docusaurus/Translate'; type TValidDialog = { setIsValid: React.Dispatch>; @@ -28,8 +29,10 @@ export const ValidDialog = ({ setIsValid, setToggleModal }: TValidDialog) => { className={styles.validwrapper} >
- Your JSON object is invalid. Please make sure you provide the correct syntax for your - JSON object. + + Your JSON object is invalid. Please make sure you provide the correct syntax for + your JSON object. +
diff --git a/src/features/Auth/Login/Login.tsx b/src/features/Auth/Login/Login.tsx index 9816dc6c..4ea78e3d 100644 --- a/src/features/Auth/Login/Login.tsx +++ b/src/features/Auth/Login/Login.tsx @@ -3,6 +3,7 @@ import React from 'react'; import styles from './Login.module.scss'; import useLoginUrl from '@site/src/hooks/useLoginUrl'; import Footer from '@site/src/components/Footer'; +import Translate from '@docusaurus/Translate'; export const Login = () => { const { getUrl } = useLoginUrl(); @@ -16,10 +17,12 @@ export const Login = () => {
- Log in to your Deriv account to get the API token and start using our API. + + Log in to your Deriv account to get the API token and start using our API. +
diff --git a/src/features/Endpoint/Endpoint.tsx b/src/features/Endpoint/Endpoint.tsx index 0600810b..a6bec1be 100644 --- a/src/features/Endpoint/Endpoint.tsx +++ b/src/features/Endpoint/Endpoint.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { useForm } from 'react-hook-form'; import { Button, Text } from '@deriv/ui'; import styles from './Endpoint.module.scss'; +import Translate from '@docusaurus/Translate'; const default_endpoint = { app_id: '35014', @@ -45,7 +46,7 @@ const EndPoint = () => {
- Change API endpoint + Change API endpoint
@@ -66,7 +67,9 @@ const EndPoint = () => { className={styles.textInput} required /> - + {errors.server_url && (
{errors.server_url.message} @@ -90,7 +93,9 @@ const EndPoint = () => { placeholder='e.g. 9999' required /> - + {errors.app_id && (
{errors.app_id.message} @@ -99,12 +104,14 @@ const EndPoint = () => {
- Connected to : + + Connected to : +
{current_url}
diff --git a/src/features/Home/ApiFeatures/ApiFeatures.tsx b/src/features/Home/ApiFeatures/ApiFeatures.tsx index 9475ce60..5183848b 100644 --- a/src/features/Home/ApiFeatures/ApiFeatures.tsx +++ b/src/features/Home/ApiFeatures/ApiFeatures.tsx @@ -1,17 +1,20 @@ import React from 'react'; import { Text } from '@deriv/ui'; import styles from './ApiFeatures.module.scss'; +import Translate from '@docusaurus/Translate'; export const ApiFeatures = () => { return (
- Deriv API features + Deriv API features - Deriv API gives you full access to all the trading functionalities of DTrader and allows - you to build your own comprehensive trading systems and analysis tools. + + Deriv API gives you full access to all the trading functionalities of DTrader and + allows you to build your own comprehensive trading systems and analysis tools. + {"With our API, you'll be able to:"} @@ -21,15 +24,21 @@ export const ApiFeatures = () => {
  • -
    Trade digital options and multipliers
    +
    + Trade digital options and multipliers +
  • -
    Monitor real-time pricing
    +
    + Monitor real-time pricing +
  • -
    Buy/sell contracts
    +
    + Buy/sell contracts +
  • @@ -37,7 +46,9 @@ export const ApiFeatures = () => {
  • -
    Monitor existing contracts
    +
    + Monitor existing contracts +
  • diff --git a/src/features/Home/Benefits/Benefits.tsx b/src/features/Home/Benefits/Benefits.tsx index 0f2ed0b6..59bdf7eb 100644 --- a/src/features/Home/Benefits/Benefits.tsx +++ b/src/features/Home/Benefits/Benefits.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Text } from '@deriv/ui'; import styles from './Benefits.module.scss'; +import Translate from '@docusaurus/Translate'; type TBenefitsIcon = { icon: string; @@ -40,7 +41,7 @@ export const Benefits = () => {
    - Benefits of using Deriv API + Benefits of using Deriv API
    @@ -52,11 +53,15 @@ export const Benefits = () => {
    -

    Personalize your trading

    +

    + Personalize your trading +

    - Personalize your trading apps to match your needs. Create charts and views the way you - like them. Develop your trading app using any common programming language and extend - your trading opportunities. + + Personalize your trading apps to match your needs. Create charts and views the way + you like them. Develop your trading app using any common programming language and + extend your trading opportunities. +
    @@ -65,9 +70,11 @@ export const Benefits = () => {

    Build a business and earn more

    - Create your own trading apps by taking advantage of the power of Deriv's trading - services. Share your apps with fellow traders or customers, and get a chance to earn - more or build your own business. + + Create your own trading apps by taking advantage of the power of Deriv's + trading services. Share your apps with fellow traders or customers, and get a chance + to earn more or build your own business. +
    diff --git a/src/features/Home/Carousel/Carousel.tsx b/src/features/Home/Carousel/Carousel.tsx index 0828d1d4..2ef98784 100644 --- a/src/features/Home/Carousel/Carousel.tsx +++ b/src/features/Home/Carousel/Carousel.tsx @@ -6,13 +6,14 @@ import NextButton from './NextButton'; import PrevButton from './PrevButton'; import styles from './Carousel.module.scss'; import './swiper-custom.scss'; +import Translate from '@docusaurus/Translate'; export const Carousel = () => { return (
    - See what our clients say + See what our clients say
    diff --git a/src/features/Home/ClientLibraries/ClientLibraries.tsx b/src/features/Home/ClientLibraries/ClientLibraries.tsx index 1e15a66f..d7d84a49 100644 --- a/src/features/Home/ClientLibraries/ClientLibraries.tsx +++ b/src/features/Home/ClientLibraries/ClientLibraries.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Text } from '@deriv/ui'; import styles from './ClientLibraries.module.scss'; +import Translate from '@docusaurus/Translate'; export const ClientLibraries = () => { return ( @@ -17,11 +18,13 @@ export const ClientLibraries = () => { aria-level={1} className={styles.Heading} > - Comprehensive all-in-one
    client library + Comprehensive all-in-one +
    client library

    - Simplify your development processes and get your app up and running
    - faster with the client library of your choice. + Simplify your development processes and get your app up and running +
    + faster with the client library of your choice.

@@ -56,7 +63,9 @@ export const ClientLibraries = () => { target='_blank' > - +
diff --git a/src/features/Home/GetStarted/GetStarted.tsx b/src/features/Home/GetStarted/GetStarted.tsx index 09093f6e..3bb7623a 100644 --- a/src/features/Home/GetStarted/GetStarted.tsx +++ b/src/features/Home/GetStarted/GetStarted.tsx @@ -2,6 +2,7 @@ import React from 'react'; import styles from './GetStarted.module.scss'; import { Text } from '@deriv/ui'; import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; export const GetStarted = () => { return ( @@ -15,7 +16,7 @@ export const GetStarted = () => { role='heading' as='h2' > - Get started with our API in 3 simple steps: + Get started with our API in 3 simple steps: - By using our API, you confirm that you have read and agreed to our + By using our API, you confirm that you have read and agreed to our {' '} - terms and conditions. + terms and conditions. diff --git a/src/features/Home/HeroHeader/HeroHeader.tsx b/src/features/Home/HeroHeader/HeroHeader.tsx index 1f2b7f75..540d471e 100644 --- a/src/features/Home/HeroHeader/HeroHeader.tsx +++ b/src/features/Home/HeroHeader/HeroHeader.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { Button, Text } from '@deriv/ui'; import styles from './HeroHeader.module.scss'; +import Translate from '@docusaurus/Translate'; export const HeroHeader = () => { return (
- Deriv API + Deriv API { aria-level={7} className={styles.SubHeading} > - Use our powerful, flexible, and free API to build a custom trading
- platform - for yourself or for your business. + Use our powerful, flexible, and free API to build a custom trading{' '} +
+ platform - for yourself or for your business.
diff --git a/src/features/Home/WaysToEarn/WaysToEarn.tsx b/src/features/Home/WaysToEarn/WaysToEarn.tsx index 9027b540..735e4724 100644 --- a/src/features/Home/WaysToEarn/WaysToEarn.tsx +++ b/src/features/Home/WaysToEarn/WaysToEarn.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Badge, Text } from '@deriv/ui'; import styles from './WaysToEarn.module.scss'; +import Translate from '@docusaurus/Translate'; export const WaysToEarn = () => { return ( @@ -8,7 +9,7 @@ export const WaysToEarn = () => {
- Ways to earn with Deriv API + Ways to earn with Deriv API
@@ -21,8 +22,10 @@ export const WaysToEarn = () => { visiblity='icon-and-label' > - Register your app with Deriv, and add a percentage markup to the contract prices to - profit from every purchased contract. + + Register your app with Deriv, and add a percentage markup to the contract prices + to profit from every purchased contract. + @@ -35,8 +38,10 @@ export const WaysToEarn = () => { visiblity='icon-and-label' > - Sign up as an affiliate, build your app, and get commissions on trades completed via - your app and the affiliate plan you select. + + Sign up as an affiliate, build your app, and get commissions on trades completed + via your app and the affiliate plan you select. + @@ -49,8 +54,10 @@ export const WaysToEarn = () => { visiblity='icon-and-label' > - Sign up as a payment agent, build your own custom payment website, and use our API - to earn commission on every payment you process for Deriv's clients. + + Sign up as a payment agent, build your own custom payment website, and use our API + to earn commission on every payment you process for Deriv's clients. + diff --git a/src/features/dashboard/components/ApiTokenCard/index.tsx b/src/features/dashboard/components/ApiTokenCard/index.tsx index e70baccd..b760fb06 100644 --- a/src/features/dashboard/components/ApiTokenCard/index.tsx +++ b/src/features/dashboard/components/ApiTokenCard/index.tsx @@ -5,6 +5,7 @@ import { UseFormRegister } from 'react-hook-form'; import CustomCheckbox from '@site/src/components/CustomCheckbox'; import clsx from 'clsx'; import styles from './api-token.card.module.scss'; +import Translate from '@docusaurus/Translate'; interface IApiTokenCardPros extends HTMLAttributes { register: UseFormRegister; @@ -31,7 +32,10 @@ const ApiTokenCard = ({ register, name, label, description, ...rest }: IApiToken

- Note: Do not share tokens with the Admin scope with unauthorised parties. + Note: + + Do not share tokens with the Admin scope with unauthorised parties. +

)} diff --git a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx b/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx index 8d004115..535122a3 100644 --- a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx +++ b/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx @@ -8,6 +8,7 @@ import ApiTokenCard from '../ApiTokenCard'; import useCreateToken from '@site/src/features/dashboard/hooks/useCreateToken'; import * as yup from 'yup'; import styles from './api-token.form.module.scss'; +import Translate from '@docusaurus/Translate'; const schema = yup .object({ @@ -107,7 +108,7 @@ const ApiTokenForm = (props: HTMLAttributes) => {
- Select scopes based on the access you need. + Select scopes based on the access you need.
@@ -129,7 +130,7 @@ const ApiTokenForm = (props: HTMLAttributes) => {
- Name your token and click on Create to generate your token. + Name your token and click on Create to generate your token.
@@ -140,7 +141,7 @@ const ApiTokenForm = (props: HTMLAttributes) => {
- Copy and paste the token into the app. + Copy and paste the token into the app.
diff --git a/src/features/dashboard/components/AppForm/index.tsx b/src/features/dashboard/components/AppForm/index.tsx index 7942915d..82a786ad 100644 --- a/src/features/dashboard/components/AppForm/index.tsx +++ b/src/features/dashboard/components/AppForm/index.tsx @@ -14,6 +14,7 @@ import AccountDropdown from '@site/src/components/CustomSelectDropdown/account-d import CustomCheckbox from '@site/src/components/CustomCheckbox'; import styles from './app-form.module.scss'; import clsx from 'clsx'; +import Translate from '@docusaurus/Translate'; type TAppFormProps = { initialValues?: Partial; @@ -63,7 +64,9 @@ const AppForm = ({ {!accountHasAdminToken() && ( - This account doesn't have API tokens with the admin scope. Choose another account. + + This account doesn't have API tokens with the admin scope. Choose another account. + )} @@ -85,7 +88,7 @@ const AppForm = ({ {!is_update_mode && ( - Select your api token ( it should have admin scope ) + Select your api token ( it should have admin scope ) )}
@@ -123,7 +126,9 @@ const AppForm = ({ )}
- +
{errors && errors?.name && ( @@ -132,13 +137,19 @@ const AppForm = ({ )}
-

Markup

+

+ Markup +

- You can earn commission by adding a markup to the price of each trade. Enter your - markup percentage here. + + You can earn commission by adding a markup to the price of each trade. Enter + your markup percentage here. +
- NOTE: Markup is only available for real accounts + + NOTE: Markup is only available for real accounts +
@@ -160,11 +171,15 @@ const AppForm = ({ placeholder=' ' disabled={disableMarkup} /> - +
- If you don‘t want to earn a markup, enter 0 here. Otherwise, enter a number - up to 5. Maximum: 5.00%. + + If you don‘t want to earn a markup, enter 0 here. Otherwise, enter a + number up to 5. Maximum: 5.00%. + {errors && errors?.app_markup_percentage && ( @@ -174,11 +189,15 @@ const AppForm = ({
-

OAuth details

+

+ OAuth details +

- This allows clients to log in to your app using their Deriv accounts without an - API token. + + This allows clients to log in to your app using their Deriv accounts without an + API token. +
@@ -190,11 +209,15 @@ const AppForm = ({ type='text' placeholder=' ' /> - +

- *Please note that this URL will be used as the OAuth redirect URL for the OAuth - authorization. + + *Please note that this URL will be used as the OAuth redirect URL for the OAuth + authorization. +

{errors && errors?.redirect_uri && ( {errors.redirect_uri?.message} @@ -209,7 +232,9 @@ const AppForm = ({ type='text' placeholder=' ' /> - + {errors && errors?.verification_uri && ( {errors.verification_uri?.message} @@ -219,24 +244,39 @@ const AppForm = ({
-

Scope of authorization

+

+ Scope of authorization +

- Select the scope for your app: + + Select the scope for your app: +
@@ -247,39 +287,58 @@ const AppForm = ({ register={register('trading_information')} >
- By registering your application, you acknowledge that you‘ve read and accepted - the Deriv API{' '} + + By registering your application, you acknowledge that you‘ve read and + accepted the Deriv API + - terms and conditions + + terms and conditions +
{renderButtons &&
{renderButtons()}
} diff --git a/src/features/dashboard/components/AppsTable/app-actions.cell.tsx b/src/features/dashboard/components/AppsTable/app-actions.cell.tsx index d3cbcdbb..81231898 100644 --- a/src/features/dashboard/components/AppsTable/app-actions.cell.tsx +++ b/src/features/dashboard/components/AppsTable/app-actions.cell.tsx @@ -1,3 +1,4 @@ +import Translate from '@docusaurus/Translate'; import React from 'react'; import { CellProps } from 'react-table'; import { TAppColumn } from '.'; @@ -16,14 +17,18 @@ const AppActionsCell = ({ openDeleteDialog, openEditDialog }: IAppActionsCellPro className={`${styles.updateApp} ${styles.tooltip}`} data-testid={'update-app-button'} > - Edit application details + + Edit application details +
- Delete application + + Delete application +
); diff --git a/src/features/dashboard/components/Dialogs/UpdateAppDialog/index.tsx b/src/features/dashboard/components/Dialogs/UpdateAppDialog/index.tsx index 9dc9d994..869639ca 100644 --- a/src/features/dashboard/components/Dialogs/UpdateAppDialog/index.tsx +++ b/src/features/dashboard/components/Dialogs/UpdateAppDialog/index.tsx @@ -9,6 +9,7 @@ import { RegisterAppDialogError } from '../RegisterAppDialogError'; import { scopesArrayToObject, scopesObjectToArray } from '@site/src/utils'; import styles from './update-app-dialog.module.scss'; import useAuthContext from '@site/src/hooks/useAuthContext'; +import Translate from '@docusaurus/Translate'; interface IUpdateAppDialog { app: ApplicationObject; @@ -77,9 +78,11 @@ const UpdateAppDialog = ({ app, onClose }: IUpdateAppDialog) => { return (
+ -
); }; diff --git a/src/features/dashboard/components/NoApps/index.tsx b/src/features/dashboard/components/NoApps/index.tsx index b6153a36..51fa47ed 100644 --- a/src/features/dashboard/components/NoApps/index.tsx +++ b/src/features/dashboard/components/NoApps/index.tsx @@ -2,6 +2,7 @@ import React, { useCallback } from 'react'; import styles from './no-apps.module.scss'; import { Button, Text } from '@deriv/ui'; import useAppManager from '@site/src/hooks/useAppManager'; +import Translate from '@docusaurus/Translate'; const NoApps = () => { const { updateCurrentTab } = useAppManager(); @@ -16,11 +17,13 @@ const NoApps = () => {
- To see your details reflected, please register your app via the registration form. + + To see your details reflected, please register your app via the registration form. +
diff --git a/src/features/dashboard/manage-tokens/index.tsx b/src/features/dashboard/manage-tokens/index.tsx index d1d66048..ced1968a 100644 --- a/src/features/dashboard/manage-tokens/index.tsx +++ b/src/features/dashboard/manage-tokens/index.tsx @@ -3,12 +3,13 @@ import { Text } from '@deriv/ui'; import styles from './manage-tokens.module.scss'; import ApiTokenForm from '../components/ApiTokenForm/api-token.form'; import ApiTokenTable from '../components/ApiTokenTable'; +import Translate from '@docusaurus/Translate'; const ApiToken = () => { return (
- API Token Manager + API Token Manager diff --git a/src/features/dashboard/register-app/index.tsx b/src/features/dashboard/register-app/index.tsx index b60df013..0240c488 100644 --- a/src/features/dashboard/register-app/index.tsx +++ b/src/features/dashboard/register-app/index.tsx @@ -7,6 +7,7 @@ import { RegisterAppDialogError } from '../components/Dialogs/RegisterAppDialogE import { RegisterAppDialogSuccess } from '../components/Dialogs/RegisterAppDialogSuccess'; import { IRegisterAppForm } from '../types'; import useAuthContext from '@site/src/hooks/useAuthContext'; +import Translate from '@docusaurus/Translate'; const AppRegistration = () => { const { is_loading, send: registerApp, error, clear, data } = useWS('app_register'); @@ -45,7 +46,7 @@ const AppRegistration = () => { return ( <> );