diff --git a/i18n/en/code.json b/i18n/en/code.json
index 73e9b4006..9d89ad73c 100644
--- a/i18n/en/code.json
+++ b/i18n/en/code.json
@@ -669,5 +669,155 @@
"theme.tags.tagsPageTitle": {
"message": "Tags",
"description": "The title of the tag list page"
+ },
+ "Deriv website": {
+ "message": "Deriv website"
+ },
+ "Who we are": {
+ "message": "Who we are"
+ },
+ "Contact us": {
+ "message": "Contact us"
+ },
+ "Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)": {
+ "message": "Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)"
+ },
+ "The name cannot contain “Binary”, “Deriv”, or similar words.": {
+ "message": "The name cannot contain “Binary”, “Deriv”, or similar words."
+ },
+ "Your website URL cannot exceed 255 characters.": {
+ "message": "Your website URL cannot exceed 255 characters."
+ },
+ "Enter a valid URL. (Example: https://www.[YourDomainName].com)": {
+ "message": "Enter a valid URL. (Example: https://www.[YourDomainName].com)"
+ },
+ "Your markup value cannot be more than 4 characters.": {
+ "message": "Your markup value cannot be more than 4 characters."
+ },
+ "Your markup value must be equal to or above 0.00 and no more than 3.00.": {
+ "message": "Your markup value must be equal to or above 0.00 and no more than 3.00."
+ },
+ "Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader.": {
+ "message": "Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader."
+ },
+ "Benefits of using Deriv API": {
+ "message": "Benefits of using Deriv API"
+ },
+ "Automation": {
+ "message": "Automation"
+ },
+ "Easy integration": {
+ "message": "Easy integration"
+ },
+ "Fast execution": {
+ "message": "Fast execution"
+ },
+ "A trading app created using Deriv API shown on a laptop.": {
+ "message": "A trading app created using Deriv API shown on a laptop."
+ },
+ "Personalise your trading": {
+ "message": "Personalise your trading"
+ },
+ "Personalise 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.": {
+ "message": "Personalise 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."
+ },
+ "Build a business and earn more": {
+ "message": "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.": {
+ "message": "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."
+ },
+ "Name": {
+ "message": "Name"
+ },
+ "Token": {
+ "message": "Token"
+ },
+ "Scopes": {
+ "message": "Scopes"
+ },
+ "Last Used": {
+ "message": "Last Used"
+ },
+ "Valid for IP": {
+ "message": "Valid for IP"
+ },
+ "Update Application": {
+ "message": "Update Application"
+ },
+ "Register Application": {
+ "message": "Register Application"
+ },
+ "Your account": {
+ "message": "Your account"
+ },
+ "Choose your API token with the admin scope": {
+ "message": "Choose your API token with the admin scope"
+ },
+ "Application Name": {
+ "message": "Application Name"
+ },
+ "Application ID": {
+ "message": "Application ID"
+ },
+ "Redirect URL": {
+ "message": "Redirect URL"
+ },
+ "Actions": {
+ "message": "Actions"
+ },
+ "Only alphanumeric characters with spaces and underscores are allowed.": {
+ "message": "Only alphanumeric characters with spaces and underscores are allowed."
+ },
+ "The name can contain up to 48 characters.": {
+ "message": "The name can contain up to 48 characters."
+ },
+ "Duplicate token names aren’t allowed.": {
+ "message": "Duplicate token names aren’t allowed."
+ },
+ "Only alphanumeric characters with spaces and underscores are allowed": {
+ "message": "Only alphanumeric characters with spaces and underscores are allowed"
+ },
+ "Only 2-32 characters are allowed": {
+ "message": "Only 2-32 characters are allowed"
+ },
+ "No duplicate token names are allowed for the same account.": {
+ "message": "No duplicate token names are allowed for the same account."
+ },
+ "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3eriv\" are allowed.": {
+ "message": "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3eriv\" are allowed."
+ },
+ "Name your token and click on Create to generate your token.": {
+ "message": "Name your token and click on Create to generate your token."
+ },
+ "Token name (You've created {numberOfTokens} out of 30 tokens)": {
+ "message": "Token name (You've created {numberOfTokens} out of 30 tokens)"
+ },
+ "Create": {
+ "message": "Create"
+ },
+ "theme.docs.DocCard.categoryDescription.plurals": {
+ "message": "1 item|{count} items",
+ "description": "The default description for a category card in the generated index about how many items this category includes"
+ },
+ "theme.admonition.warning": {
+ "message": "warning",
+ "description": "The default label used for the Warning admonition (:::warning)"
+ },
+ "theme.DocSidebarItem.expandCategoryAriaLabel": {
+ "message": "Expand sidebar category '{label}'",
+ "description": "The ARIA label to expand the sidebar category"
+ },
+ "theme.DocSidebarItem.collapseCategoryAriaLabel": {
+ "message": "Collapse sidebar category '{label}'",
+ "description": "The ARIA label to collapse the sidebar category"
+ },
+ "theme.unlistedContent.title": {
+ "message": "Unlisted page",
+ "description": "The unlisted content banner title"
+ },
+ "theme.unlistedContent.message": {
+ "message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.",
+ "description": "The unlisted content banner message"
}
}
diff --git a/package-lock.json b/package-lock.json
index d99ad1cd4..b62e6b6ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.0.0",
"dependencies": {
"@deriv/deriv-api": "^1.0.11",
- "@deriv/quill-icons": "^1.22.7",
+ "@deriv/quill-icons": "^1.22.10",
"@deriv/ui": "^0.8.0",
"@docusaurus/core": "^3.3.2",
"@docusaurus/plugin-client-redirects": "^3.3.2",
@@ -2573,9 +2573,9 @@
}
},
"node_modules/@deriv/api-types": {
- "version": "1.0.809",
- "resolved": "https://registry.npmjs.org/@deriv/api-types/-/api-types-1.0.809.tgz",
- "integrity": "sha512-V6vM69/Nhwy76SK1htva7ld+xGQqR/UY5uyIIw4vPElbjfsqje9dsYz55jTdyh6H2HNEd7mRJv9ZXlqPaYMoaQ==",
+ "version": "1.0.908",
+ "resolved": "https://registry.npmjs.org/@deriv/api-types/-/api-types-1.0.908.tgz",
+ "integrity": "sha512-YjnUGV3pZ0LpHhXwGfHdJRps0HrqEGM5m1bHyQ8jyTGqmteIY59IiQiVwtcRugUObj1AxQ6Hmh1ktmrbwYqfZg==",
"dev": true
},
"node_modules/@deriv/deriv-api": {
@@ -2589,9 +2589,9 @@
}
},
"node_modules/@deriv/quill-icons": {
- "version": "1.22.10",
- "resolved": "https://registry.npmjs.org/@deriv/quill-icons/-/quill-icons-1.22.10.tgz",
- "integrity": "sha512-BtyMfKln7iBcTcERiaj3t8ADMplCOfE3J184Asaa/9RnE42e5JtehkYw78lwinYTBTzr1sL5tK0GRNlziFNRKw==",
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/@deriv/quill-icons/-/quill-icons-1.22.11.tgz",
+ "integrity": "sha512-51xz0lJGovQ/J58QNkuk+7pMIx6r1XoWu4UN91J9Tj1gHpXxBSM2SstuMR44FBygUWUw6VRBSUVWNSgvDCtUHw==",
"peerDependencies": {
"react": ">= 16",
"react-dom": ">= 16"
@@ -4828,9 +4828,9 @@
}
},
"node_modules/@mui/core-downloads-tracker": {
- "version": "5.15.19",
- "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.19.tgz",
- "integrity": "sha512-tCHSi/Tomez9ERynFhZRvFO6n9ATyrPs+2N80DMDzp6xDVirbBjEwhPcE+x7Lj+nwYw0SqFkOxyvMP0irnm55w==",
+ "version": "5.15.20",
+ "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.20.tgz",
+ "integrity": "sha512-DoL2ppgldL16utL8nNyj/P12f8mCNdx/Hb/AJnX9rLY4b52hCMIx1kH83pbXQ6uMy6n54M3StmEbvSGoj2OFuA==",
"peer": true,
"funding": {
"type": "opencollective",
@@ -4838,17 +4838,17 @@
}
},
"node_modules/@mui/material": {
- "version": "5.15.19",
- "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.19.tgz",
- "integrity": "sha512-lp5xQBbcRuxNtjpWU0BWZgIrv2XLUz4RJ0RqFXBdESIsKoGCQZ6P3wwU5ZPuj5TjssNiKv9AlM+vHopRxZhvVQ==",
+ "version": "5.15.20",
+ "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.20.tgz",
+ "integrity": "sha512-tVq3l4qoXx/NxUgIx/x3lZiPn/5xDbdTE8VrLczNpfblLYZzlrbxA7kb9mI8NoBF6+w9WE9IrxWnKK5KlPI2bg==",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.23.9",
"@mui/base": "5.0.0-beta.40",
- "@mui/core-downloads-tracker": "^5.15.19",
- "@mui/system": "^5.15.15",
+ "@mui/core-downloads-tracker": "^5.15.20",
+ "@mui/system": "^5.15.20",
"@mui/types": "^7.2.14",
- "@mui/utils": "^5.15.14",
+ "@mui/utils": "^5.15.20",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
@@ -4892,13 +4892,13 @@
}
},
"node_modules/@mui/private-theming": {
- "version": "5.15.14",
- "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz",
- "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==",
+ "version": "5.15.20",
+ "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.20.tgz",
+ "integrity": "sha512-BK8F94AIqSrnaPYXf2KAOjGZJgWfvqAVQ2gVR3EryvQFtuBnG6RwodxrCvd3B48VuMy6Wsk897+lQMUxJyk+6g==",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/utils": "^5.15.14",
+ "@mui/utils": "^5.15.20",
"prop-types": "^15.8.1"
},
"engines": {
@@ -4951,16 +4951,16 @@
}
},
"node_modules/@mui/system": {
- "version": "5.15.15",
- "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz",
- "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==",
+ "version": "5.15.20",
+ "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.20.tgz",
+ "integrity": "sha512-LoMq4IlAAhxzL2VNUDBTQxAb4chnBe8JvRINVNDiMtHE2PiPOoHlhOPutSxEbaL5mkECPVWSv6p8JEV+uykwIA==",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.23.9",
- "@mui/private-theming": "^5.15.14",
+ "@mui/private-theming": "^5.15.20",
"@mui/styled-engine": "^5.15.14",
"@mui/types": "^7.2.14",
- "@mui/utils": "^5.15.14",
+ "@mui/utils": "^5.15.20",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
"prop-types": "^15.8.1"
@@ -5014,9 +5014,9 @@
}
},
"node_modules/@mui/utils": {
- "version": "5.15.14",
- "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz",
- "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==",
+ "version": "5.15.20",
+ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.20.tgz",
+ "integrity": "sha512-mAbYx0sovrnpAu1zHc3MDIhPqL8RPVC5W5xcO1b7PiSCJPtckIZmBkp8hefamAvUiAV8gpfMOM6Zb+eSisbI2A==",
"peer": true,
"dependencies": {
"@babel/runtime": "^7.23.9",
@@ -7900,9 +7900,9 @@
}
},
"node_modules/acorn-globals/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -7920,9 +7920,23 @@
}
},
"node_modules/acorn-walk": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
- "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
+ "version": "8.3.3",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
+ "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk/node_modules/acorn": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
"engines": {
"node": ">=0.4.0"
}
@@ -8024,9 +8038,9 @@
}
},
"node_modules/algoliasearch-helper": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.21.0.tgz",
- "integrity": "sha512-hjVOrL15I3Y3K8xG0icwG1/tWE+MocqBrhW6uVBWpU+/kVEMK0BnM2xdssj6mZM61eJ4iRxHR0djEI3ENOpR8w==",
+ "version": "3.22.0",
+ "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.22.0.tgz",
+ "integrity": "sha512-ZIVcE0929m2g00GuMiRWpemsGW3589qYxIcQonB7ms4B/KoeS94OiqPRMJ9hGoL23SlYJOmMNjZyXSoItDXO1w==",
"dependencies": {
"@algolia/events": "^4.0.1"
},
@@ -9044,9 +9058,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001632",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz",
- "integrity": "sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==",
+ "version": "1.0.30001636",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz",
+ "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==",
"funding": [
{
"type": "opencollective",
@@ -11047,9 +11061,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
"node_modules/electron-to-chromium": {
- "version": "1.4.798",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.798.tgz",
- "integrity": "sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q=="
+ "version": "1.4.806",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.806.tgz",
+ "integrity": "sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg=="
},
"node_modules/emittery": {
"version": "0.13.1",
@@ -11468,16 +11482,16 @@
}
},
"node_modules/eslint-plugin-react": {
- "version": "7.34.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.2.tgz",
- "integrity": "sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw==",
+ "version": "7.34.3",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz",
+ "integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.8",
"array.prototype.findlast": "^1.2.5",
"array.prototype.flatmap": "^1.3.2",
"array.prototype.toreversed": "^1.1.2",
- "array.prototype.tosorted": "^1.1.3",
+ "array.prototype.tosorted": "^1.1.4",
"doctrine": "^2.1.0",
"es-iterator-helpers": "^1.0.19",
"estraverse": "^5.3.0",
@@ -11737,9 +11751,9 @@
}
},
"node_modules/espree/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"devOptional": true,
"bin": {
"acorn": "bin/acorn"
@@ -12381,9 +12395,9 @@
}
},
"node_modules/foreground-child": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
- "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz",
+ "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==",
"dependencies": {
"cross-spawn": "^7.0.0",
"signal-exit": "^4.0.1"
@@ -13214,9 +13228,9 @@
}
},
"node_modules/hast-util-raw": {
- "version": "9.0.3",
- "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.3.tgz",
- "integrity": "sha512-ICWvVOF2fq4+7CMmtCPD5CM4QKjPbHpPotE6+8tDooV0ZuyJVUzHsrNX+O5NaRbieTf0F7FfeBOMAwi6Td0+yQ==",
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.4.tgz",
+ "integrity": "sha512-LHE65TD2YiNsHD3YuXcKPHXPLuYh/gjp12mOfU8jxSrm1f/yJpsb0F/KKljS6U9LJoP0Ux+tCe8iJ2AsPzTdgA==",
"dependencies": {
"@types/hast": "^3.0.0",
"@types/unist": "^3.0.0",
@@ -16754,9 +16768,9 @@
}
},
"node_modules/jsdom/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -16939,9 +16953,9 @@
}
},
"node_modules/launch-editor": {
- "version": "2.6.1",
- "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz",
- "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==",
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.8.0.tgz",
+ "integrity": "sha512-vJranOAJrI/llyWGRQqiDM+adrw+k83fvmmx3+nV47g3+36xM15jE+zyZ6Ffel02+xSvuM0b2GDRosXZkbb6wA==",
"dependencies": {
"picocolors": "^1.0.0",
"shell-quote": "^1.8.1"
@@ -18807,9 +18821,9 @@
]
},
"node_modules/micromark-extension-mdxjs/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -20364,6 +20378,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/package-json-from-dist": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
+ "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw=="
+ },
"node_modules/package-json/node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
@@ -21834,9 +21853,9 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.51.5",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.51.5.tgz",
- "integrity": "sha512-J2ILT5gWx1XUIJRETiA7M19iXHlG74+6O3KApzvqB/w8S5NQR7AbU8HVZrMALdmDgWpRPYiZJl0zx8Z4L2mP6Q==",
+ "version": "7.52.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.52.0.tgz",
+ "integrity": "sha512-mJX506Xc6mirzLsmXUJyqlAI3Kj9Ph2RhplYhUVffeOQSnubK2uVqBFOBJmvKikvbFV91pxVXmDiR+QMF19x6A==",
"engines": {
"node": ">=12.22.0"
},
@@ -21845,7 +21864,7 @@
"url": "https://opencollective.com/react-hook-form"
},
"peerDependencies": {
- "react": "^16.8.0 || ^17 || ^18"
+ "react": "^16.8.0 || ^17 || ^18 || ^19"
}
},
"node_modules/react-is": {
@@ -22787,9 +22806,9 @@
}
},
"node_modules/rfdc": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz",
- "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==",
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
+ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
"dev": true
},
"node_modules/rimraf": {
@@ -22919,9 +22938,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/sass": {
- "version": "1.77.4",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz",
- "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==",
+ "version": "1.77.6",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz",
+ "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
@@ -24019,14 +24038,15 @@
}
},
"node_modules/sucrase/node_modules/glob": {
- "version": "10.4.1",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz",
- "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==",
+ "version": "10.4.2",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz",
+ "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==",
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^3.1.2",
"minimatch": "^9.0.4",
"minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
"path-scurry": "^1.11.1"
},
"bin": {
@@ -24280,9 +24300,9 @@
}
},
"node_modules/terser/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -24530,9 +24550,9 @@
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="
},
"node_modules/ts-jest": {
- "version": "29.1.4",
- "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz",
- "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==",
+ "version": "29.1.5",
+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.5.tgz",
+ "integrity": "sha512-UuClSYxM7byvvYfyWdFI+/2UxMmwNyJb0NPkZPQE2hew3RurV7l7zURgOHAd/1I1ZdPpe3GUsXNXAcN8TFKSIg==",
"dependencies": {
"bs-logger": "0.x",
"fast-json-stable-stringify": "2.x",
@@ -24638,9 +24658,9 @@
}
},
"node_modules/ts-node/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"devOptional": true,
"bin": {
"acorn": "bin/acorn"
@@ -25465,9 +25485,9 @@
}
},
"node_modules/webpack": {
- "version": "5.91.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz",
- "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==",
+ "version": "5.92.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz",
+ "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==",
"dependencies": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
@@ -25475,10 +25495,10 @@
"@webassemblyjs/wasm-edit": "^1.12.1",
"@webassemblyjs/wasm-parser": "^1.12.1",
"acorn": "^8.7.1",
- "acorn-import-assertions": "^1.9.0",
+ "acorn-import-attributes": "^1.9.5",
"browserslist": "^4.21.10",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.16.0",
+ "enhanced-resolve": "^5.17.0",
"es-module-lexer": "^1.2.1",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
@@ -25536,9 +25556,9 @@
}
},
"node_modules/webpack-bundle-analyzer/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -25555,9 +25575,9 @@
}
},
"node_modules/webpack-bundle-analyzer/node_modules/ws": {
- "version": "7.5.9",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
- "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
"engines": {
"node": ">=8.3.0"
},
@@ -25684,9 +25704,9 @@
}
},
"node_modules/webpack/node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz",
+ "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==",
"bin": {
"acorn": "bin/acorn"
},
@@ -25694,10 +25714,10 @@
"node": ">=0.4.0"
}
},
- "node_modules/webpack/node_modules/acorn-import-assertions": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
- "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
+ "node_modules/webpack/node_modules/acorn-import-attributes": {
+ "version": "1.9.5",
+ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",
+ "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",
"peerDependencies": {
"acorn": "^8"
}
@@ -26159,9 +26179,9 @@
}
},
"node_modules/ws": {
- "version": "8.17.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz",
- "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==",
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
+ "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
"engines": {
"node": ">=10.0.0"
},
diff --git a/package.json b/package.json
index 7522a1673..075dce8c4 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
},
"dependencies": {
"@deriv/deriv-api": "^1.0.11",
- "@deriv/quill-icons": "^1.22.7",
+ "@deriv/quill-icons": "^1.22.10",
"@deriv/ui": "^0.8.0",
"@docusaurus/core": "^3.3.2",
"@docusaurus/plugin-client-redirects": "^3.3.2",
diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx
index 8eecfff46..2e6761e12 100644
--- a/src/components/Header/index.tsx
+++ b/src/components/Header/index.tsx
@@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
import styles from './Header.module.scss';
import Link from '@docusaurus/Link';
import RenderOfficialContents from '../RenderOfficialContents';
+import Translate from '@docusaurus/Translate';
export const Header = () => {
useEffect(() => {
@@ -18,13 +19,13 @@ export const Header = () => {
- Deriv website
+ Deriv website
- Who we are
+ Who we are
- Contact us
+ Contact us
diff --git a/src/contexts/api-token/api-token.context.tsx b/src/contexts/api-token/api-token.context.tsx
index 9d55e38fc..994aa766a 100644
--- a/src/contexts/api-token/api-token.context.tsx
+++ b/src/contexts/api-token/api-token.context.tsx
@@ -6,6 +6,8 @@ export interface IApiTokenContext {
isLoadingTokens: boolean;
currentToken: TTokenType;
updateCurrentToken: (token: TTokenType) => void;
+ lastTokenDisplayName: string;
+ setLastTokenDisplayName: (name: string) => void;
}
export const ApiTokenContext = React.createContext(null);
diff --git a/src/contexts/api-token/api-token.provider.tsx b/src/contexts/api-token/api-token.provider.tsx
index 19db6a81b..3ac9b34e3 100644
--- a/src/contexts/api-token/api-token.provider.tsx
+++ b/src/contexts/api-token/api-token.provider.tsx
@@ -11,6 +11,7 @@ type TTokenProviderProps = {
const ApiTokenProvider = ({ children }: TTokenProviderProps) => {
const [tokens, setTokens] = useState([]);
const [currentToken, setCurrentToken] = useState();
+ const [lastTokenDisplayName, setLastTokenDisplayName] = useState('');
const { send: getAllTokens, data, is_loading } = useWS('api_token');
const { is_authorized } = useAuthContext();
@@ -46,8 +47,18 @@ const ApiTokenProvider = ({ children }: TTokenProviderProps) => {
currentToken,
updateCurrentToken,
updateTokens,
+ lastTokenDisplayName,
+ setLastTokenDisplayName,
};
- }, [currentToken, is_loading, tokens, updateCurrentToken, updateTokens]);
+ }, [
+ currentToken,
+ is_loading,
+ tokens,
+ updateCurrentToken,
+ updateTokens,
+ lastTokenDisplayName,
+ setLastTokenDisplayName,
+ ]);
return {children};
};
diff --git a/src/features/Apiexplorer/RequestResponseRenderer/index.tsx b/src/features/Apiexplorer/RequestResponseRenderer/index.tsx
index 73988158e..3840c9a9f 100644
--- a/src/features/Apiexplorer/RequestResponseRenderer/index.tsx
+++ b/src/features/Apiexplorer/RequestResponseRenderer/index.tsx
@@ -8,6 +8,7 @@ import PlaygroundSection from './PlaygroundSection';
import LoginDialog from '../LoginDialog';
import styles from '../RequestJSONBox/RequestJSONBox.module.scss';
import { ValidDialog } from '../ValidDialog';
+import Translate from '@docusaurus/Translate';
export interface IResponseRendererProps {
name: T;
@@ -62,10 +63,10 @@ function RequestResponseRenderer({
disabled={disableSendRequest(auth) || reqData === ''}
onClick={handleClick}
>
- Send Request
+ Send Request
{!is_not_valid ? (
diff --git a/src/features/Home/ApiFeatures/ApiFeatures.tsx b/src/features/Home/ApiFeatures/ApiFeatures.tsx
index ab1c4cb04..348070fd0 100644
--- a/src/features/Home/ApiFeatures/ApiFeatures.tsx
+++ b/src/features/Home/ApiFeatures/ApiFeatures.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import { Text } from '@deriv/ui';
import styles from './ApiFeatures.module.scss';
-import Translate from '@docusaurus/Translate';
+import Translate, { translate } from '@docusaurus/Translate';
export const ApiFeatures = () => {
return (
@@ -66,7 +66,10 @@ export const ApiFeatures = () => {
src='/img/api-featutes.png'
className={styles.ApiFeaturesImage}
data-testid='api-features-img'
- alt='Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader.'
+ alt={translate({
+ message:
+ 'Using Deriv API to build a trading app with features like real-time pricing charts available on Dtrader.',
+ })}
/>
);
diff --git a/src/features/Home/Benefits/Benefits.tsx b/src/features/Home/Benefits/Benefits.tsx
index 4a0c6a6e4..603016173 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, { translate } from '@docusaurus/Translate';
type TBenefitsIcon = {
icon: string;
@@ -40,28 +41,50 @@ export const Benefits = () => {
- Benefits of using Deriv API
+ Benefits of using Deriv API
-
-
-
+
+
+
- Personalise your trading
+ Personalise your trading
- Personalise 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.
+
+ Personalise 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.
+
@@ -72,12 +95,14 @@ export const Benefits = () => {
/>
- Build a business and earn more
+ 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/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx b/src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx
index ac38aef27..8422c2f05 100644
--- a/src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx
+++ b/src/features/dashboard/components/ApiTokenForm/CreateTokenField/index.tsx
@@ -5,6 +5,7 @@ import useApiToken from '@site/src/hooks/useApiToken';
import { FieldErrorsImpl, UseFormRegisterReturn } from 'react-hook-form';
import CustomErrors from './CustomErrors';
import TokenCreationDialogSuccess from '../../Dialogs/TokenCreationDialogSuccess';
+import Translate, { translate } from '@docusaurus/Translate';
type TCreateTokenField = {
register: UseFormRegisterReturn;
@@ -44,6 +45,7 @@ const CreateTokenField = ({
setFormIsCleared(false);
}
}, [form_is_cleared]);
+
const getTokenNames = useMemo(() => {
const token_names = [];
for (const token_object of tokens) {
@@ -71,7 +73,7 @@ const CreateTokenField = ({
- Name your token and click on Create to generate your token.
+ Name your token and click on Create to generate your token.
@@ -93,11 +95,16 @@ const CreateTokenField = ({
className={styles.inlineLabel}
data-testid='token-count-label'
>
- Token name (You've created {numberOfTokens} out of 30 tokens )
+ {translate(
+ {
+ message: "Token name (You've created {numberOfTokens} out of 30 tokens)",
+ },
+ { numberOfTokens },
+ )}
{errors && errors.name && (
diff --git a/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx b/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx
index 16a26c5b6..6bbff31e3 100644
--- a/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx
+++ b/src/features/dashboard/components/ApiTokenForm/__tests__/api-token.form.test.tsx
@@ -77,6 +77,7 @@ describe('Home Page', () => {
valid_for_ip: '',
},
],
+ lastTokenDisplayName: '',
}));
render();
@@ -207,21 +208,6 @@ describe('Home Page', () => {
expect(mockCreateToken).not.toHaveBeenCalled();
});
- it('Should open success dialog when token is created ', async () => {
- const nameInput = screen.getByRole('textbox');
- await act(async () => {
- await userEvent.type(nameInput, 'test create token');
- });
-
- const submitButton = screen.getByRole('button', { name: /Create/i });
-
- await act(async () => {
- await userEvent.click(submitButton);
- });
-
- const modal = await screen.getByText('Your API token is ready to be used.');
- expect(modal).toBeVisible();
- });
it('Should have create button disabled in case of empty input or error message', async () => {
const submitButton = screen.getByRole('button', { name: /Create/i });
diff --git a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx b/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx
index d81757575..3da24aed7 100644
--- a/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx
+++ b/src/features/dashboard/components/ApiTokenForm/api-token.form.tsx
@@ -10,7 +10,7 @@ import * as yup from 'yup';
import styles from './api-token.form.module.scss';
import TokenNameRestrictions from '../TokenNameRestrictions/TokenNameRestrictions';
import CreateTokenField from './CreateTokenField';
-import Translate from '@docusaurus/Translate';
+import Translate, { translate } from '@docusaurus/Translate';
const schema = yup
.object({
@@ -24,14 +24,18 @@ const schema = yup
.min(2, 'Your token name must be atleast 2 characters long.')
.max(32, 'Only up to 32 characters are allowed.')
.matches(/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9_ ]*$/, {
- message:
- 'Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)',
+ message: translate({
+ message:
+ 'Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)',
+ }),
excludeEmptyString: true,
})
.matches(
/^(?!.*deriv|.*d3r1v|.*der1v|.*d3riv|.*b1nary|.*binary|.*b1n4ry|.*bin4ry|.*blnary|.*b\|nary).*$/i,
{
- message: 'The name cannot contain “Binary”, “Deriv”, or similar words.',
+ message: translate({
+ message: 'The name cannot contain “Binary”, “Deriv”, or similar words.',
+ }),
excludeEmptyString: true,
},
),
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx b/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx
index 961ed0c28..56409815c 100644
--- a/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx
+++ b/src/features/dashboard/components/ApiTokenTable/CopyButton/__tests__/CopyButton.test.tsx
@@ -14,7 +14,7 @@ describe('CopyButton', () => {
jest.spyOn(navigator.clipboard, 'writeText');
it('should render the CopyButton', () => {
- render();
+ render();
const copy_button = screen.getByRole('button');
expect(copy_button).toBeInTheDocument();
@@ -79,7 +79,6 @@ describe('CopyButton', () => {
expect(modal).not.toBeInTheDocument();
});
-
it('should show a green check for 2 seconds when copied', async () => {
const user = userEvent.setup({ delay: null });
jest.useFakeTimers();
diff --git a/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx b/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx
index 6ab218ede..1d35c430f 100644
--- a/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx
+++ b/src/features/dashboard/components/ApiTokenTable/CopyButton/index.tsx
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import CopyTokenDialog from '../CopyTokenDialog';
import styles from '../token-cell.module.scss';
+import { StandaloneCopyRegularIcon } from '@deriv/quill-icons';
type TCopyButton = {
value: string;
diff --git a/src/features/dashboard/components/ApiTokenTable/index.tsx b/src/features/dashboard/components/ApiTokenTable/index.tsx
index e4d3407c1..bf6662b2e 100644
--- a/src/features/dashboard/components/ApiTokenTable/index.tsx
+++ b/src/features/dashboard/components/ApiTokenTable/index.tsx
@@ -8,31 +8,42 @@ import ApiTokenCell from './table.token.cell';
import ApiLastUsedCell from './table.lastused.cell';
import ScopesCell from '../Table/scopes.cell';
import Table from '../Table';
+import { translate } from '@docusaurus/Translate';
export type TTokenColumn = Column;
const tableColumns: TTokenColumn[] = [
{
- Header: 'Name',
+ Header: translate({
+ message: 'Name',
+ }),
accessor: 'display_name',
},
{
- Header: 'Token',
+ Header: translate({
+ message: 'Token',
+ }),
accessor: 'token',
Cell: ApiTokenCell,
},
{
- Header: 'Scopes',
+ Header: translate({
+ message: 'Scopes',
+ }),
accessor: 'scopes',
Cell: ScopesCell,
},
{
- Header: 'Last Used',
+ Header: translate({
+ message: 'Last Used',
+ }),
accessor: 'last_used',
Cell: ApiLastUsedCell,
},
{
- Header: 'Valid for IP',
+ Header: translate({
+ message: 'Valid for IP',
+ }),
accessor: 'valid_for_ip',
},
];
diff --git a/src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx b/src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx
index 9c0d9acee..ce3d8fa39 100644
--- a/src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx
+++ b/src/features/dashboard/components/ApiTokenTable/table.token.cell.tsx
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import { TTokenType } from '@site/src/types';
import { CellProps } from 'react-table';
import styles from './token-cell.module.scss';
-import CopyButton from './CopyButton';
const ApiTokenCell = ({ cell }: React.PropsWithChildren>) => {
const [is_hiding_token, setIsHidingToken] = useState(true);
@@ -24,16 +23,7 @@ const ApiTokenCell = ({ cell }: React.PropsWithChildren
-