diff --git a/i18n/en/code.json b/i18n/en/code.json index 8b10e554e..41c69b2c1 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -760,9 +760,6 @@ "Application ID": { "message": "Application ID" }, - "Redirect URL": { - "message": "Redirect URL" - }, "Actions": { "message": "Actions" }, @@ -930,5 +927,278 @@ }, "Register tokens": { "message": "Register tokens" + }, + "Account type": { + "message": "Account type" + }, + "Add new token": { + "message": "Add new token" + }, + "Home": { + "message": "Home" + }, + "API Explorer": { + "message": "API Explorer" + }, + "Enter your app name.": { + "message": "Enter your app name." + }, + "Your markup value must be equal to or above 0.00": { + "message": "Your markup value must be equal to or above 0.00" + }, + "Your markup value must be no more than 3.00.": { + "message": "Your markup value must be no more than 3.00." + }, + "Authorisation required": { + "message": "Authorisation required" + }, + "Invalid JSON": { + "message": "Invalid JSON" + }, + "Applications": { + "message": "Applications" + }, + "API tokens": { + "message": "API tokens" + }, + "Edit application": { + "message": "Edit application" + }, + "Create token": { + "message": "Create token" + }, + "Do not share tokens with the admin scope with unauthorized parties.": { + "message": "Do not share tokens with the admin scope with unauthorized parties." + }, + "Enable admin access": { + "message": "Enable admin access" + }, + "Are you sure you want to enable admin scope for your token?": { + "message": "Are you sure you want to enable admin scope for your token?" + }, + "Granting admin access gives your token full control over your account and increases security risks. We recommend granting this level of access only when it's essential.": { + "message": "Granting admin access gives your token full control over your account and increases security risks. We recommend granting this level of access only when it's essential." + }, + "Trading Information": { + "message": "Trading Information" + }, + "App Dashboard": { + "message": "App Dashboard" + }, + "Start using Deriv API to bring custom integrations and powerful automation to your apps.": { + "message": "Start using Deriv API to bring custom integrations and powerful automation to your apps." + }, + "Accounts": { + "message": "Accounts" + }, + "Account Type": { + "message": "Account Type" + }, + "Token scopes": { + "message": "Token scopes" + }, + "Last used": { + "message": "Last used" + }, + "API token manager": { + "message": "API token manager" + }, + "Access all your API token details here.": { + "message": "Access all your API token details here." + }, + "Create new token": { + "message": "Create new token" + }, + "Never": { + "message": "Never" + }, + "You'll have full access to your clients' information.": { + "message": "You'll have full access to your clients' information." + }, + "You'll be able to buy and sell contracts on your clients' behalf.": { + "message": "You'll be able to buy and sell contracts on your clients' behalf." + }, + "You‘ll be able to view your clients’ trading information, including their account balance.": { + "message": "You‘ll be able to view your clients’ trading information, including their account balance." + }, + "You‘ll be able to perform deposits and withdrawals on your clients’ behalf.": { + "message": "You‘ll be able to perform deposits and withdrawals on your clients’ behalf." + }, + "Full account access, including the access to manage security tokens.": { + "message": "Full account access, including the access to manage security tokens." + }, + "Enter your app's name": { + "message": "Enter your app's name" + }, + "Use only letters, numbers, spaces, and underscores.": { + "message": "Use only letters, numbers, spaces, and underscores." + }, + "Your app's name can contain up to 48 characters.": { + "message": "Your app's name can contain up to 48 characters." + }, + "Your app's name cannot contain the words \"Binary\", \"Deriv\", or any of their variations.": { + "message": "Your app's name cannot contain the words \"Binary\", \"Deriv\", or any of their variations." + }, + "You must accept the terms and conditions.": { + "message": "You must accept the terms and conditions." + }, + "Filter by OAuth scopes": { + "message": "Filter by OAuth scopes" + }, + "OAuth Scopes": { + "message": "OAuth Scopes" + }, + "OAuth Redirect URL": { + "message": "OAuth Redirect URL" + }, + "Select your account type:": { + "message": "Select your account type:" + }, + "Select scopes based on the access you need:": { + "message": "Select scopes based on the access you need:" + }, + "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3riv\" are allowed.": { + "message": "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3riv\" are allowed." + }, + "Select an account type.": { + "message": "Select an account type." + }, + "Enter your token name.": { + "message": "Enter your token name." + }, + "Enter the name of the application you want to register:": { + "message": "Enter the name of the application you want to register:" + }, + "Add a markup to the price of each trade to help you earn a commission. Enter your markup percentage below. Learn more about markup calculations in our detailed": { + "message": "Add a markup to the price of each trade to help you earn a commission. Enter your markup percentage below. Learn more about markup calculations in our detailed" + }, + "Markup is only available for real accounts and trading applications.": { + "message": "Markup is only available for real accounts and trading applications." + }, + "OAuth settings": { + "message": "OAuth settings" + }, + "Log in to your app using your Deriv account without an API token. With OAuth, third-party applications can securely authorise access without requiring password sharing, enhancing both security and user control.": { + "message": "Log in to your app using your Deriv account without an API token. With OAuth, third-party applications can securely authorise access without requiring password sharing, enhancing both security and user control." + }, + "Use OAuth if your application requires other users to sign in.": { + "message": "Use OAuth if your application requires other users to sign in." + }, + "Redirect URL is mandatory to enable OAuth on your app.": { + "message": "Redirect URL is mandatory to enable OAuth on your app." + }, + "URL Configuration": { + "message": "URL Configuration" + }, + "To set up OAuth for your app, specify the URL where users should be redirected after authorisation.": { + "message": "To set up OAuth for your app, specify the URL where users should be redirected after authorisation." + }, + "Redirect URL": { + "message": "Redirect URL" + }, + "If your app includes verification logic, enter the email verification URL below (e.g. for account opening, verification, and password reset):": { + "message": "If your app includes verification logic, enter the email verification URL below (e.g. for account opening, verification, and password reset):" + }, + "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the Redirect URL with the token will be used.": { + "message": "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the Redirect URL with the token will be used." + }, + "Scopes of authorisation": { + "message": "Scopes of authorisation" + }, + "You'll be able to process your clients’ payments.": { + "message": "You'll be able to process your clients’ payments." + }, + "Grant admin access only when it’s essential for your app's workflow.": { + "message": "Grant admin access only when it’s essential for your app's workflow." + }, + "Update application": { + "message": "Update application" + }, + "Enable admin access for your app?": { + "message": "Enable admin access for your app?" + }, + "For better security, enable admin access only when it's necessary. This approach limits access to client activities, minimising risks and safeguarding both workflow efficiency and client trust.": { + "message": "For better security, enable admin access only when it's necessary. This approach limits access to client activities, minimising risks and safeguarding both workflow efficiency and client trust." + }, + "Enter your token name": { + "message": "Enter your token name" + }, + "Token name": { + "message": "Token name" + }, + "App name (A to Z)": { + "message": "App name (A to Z)" + }, + "App name (Z to A)": { + "message": "App name (Z to A)" + }, + "App ID (A to Z)": { + "message": "App ID (A to Z)" + }, + "App ID (Z to A)": { + "message": "App ID (Z to A)" + }, + "All": { + "message": "All" + }, + "(No scope)": { + "message": "(No scope)" + }, + "Sort by": { + "message": "Sort by" + }, + "Apply": { + "message": "Apply" + }, + "Error!": { + "message": "Error!" + }, + "Success!": { + "message": "Success!" + }, + "Ok": { + "message": "Ok" + }, + "Configure now": { + "message": "Configure now" + }, + "Maybe later": { + "message": "Maybe later" + }, + "Application registered successfully!": { + "message": "Application registered successfully!" + }, + "Ready to take the next step?": { + "message": "Ready to take the next step?" + }, + "Optimise your app's capabilities by:": { + "message": "Optimise your app's capabilities by:" + }, + "Creating an API token to use with your application.": { + "message": "Creating an API token to use with your application." + }, + "Adding OAuth authentication in your app.": { + "message": "Adding OAuth authentication in your app." + }, + "Selecting the scopes of OAuth authorisation for your app.": { + "message": "Selecting the scopes of OAuth authorisation for your app." + }, + "Note: You can make these changes later through the dashboard.": { + "message": "Note: You can make these changes later through the dashboard." + }, + "documentation": { + "message": "documentation" + }, + "Authorisation URL is mandatory to enable OAuth on your app.": { + "message": "Authorisation URL is mandatory to enable OAuth on your app." + }, + "Authorisation URL": { + "message": "Authorisation URL" + }, + "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the authorisation URL with the token will be used.": { + "message": "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the authorisation URL with the token will be used." + }, + "You'll be able to perform deposits and withdrawals on your clients' behalf.": { + "message": "You'll be able to perform deposits and withdrawals on your clients' behalf." } } diff --git a/i18n/fr/code.json b/i18n/fr/code.json index 995429c87..374569771 100644 --- a/i18n/fr/code.json +++ b/i18n/fr/code.json @@ -235,7 +235,7 @@ "message": "Ce compte n'a pas de jetons API ayant un accès Admin. Choisissez un autre compte." }, "App information": { - "message": "Informations sur l'application" + "message": "Champ d'informations sur l'application" }, "Select your api token ( it should have admin scope )": { "message": "Sélectionnez votre jeton API (il doit avoir un accès admin)" @@ -259,7 +259,7 @@ "message": "Pourcentage de majoration (facultatif)" }, "Enter 0 if you don‘t want to earn a markup. Max markup: 3%": { - "message": "Entrez 0 si vous ne souhaitez pas obtenir de majoration. Majoration maximale : 3%" + "message": "Indiquez 0 si vous ne souhaitez pas obtenir de majoration. Majoration maximale : 3 %" }, "OAuth details": { "message": "Détails OAuth" @@ -268,7 +268,7 @@ "message": "Cela permet aux clients de se connecter à votre application à l'aide de leurs comptes Deriv sans jeton API." }, "Redirect URL (optional)": { - "message": "URL de redirection (facultatif)" + "message": "URL de vérification (facultatif)" }, "Please note that this URL will be used as the OAuth redirect URL for the OAuth authorization.": { "message": "Veuillez noter que cet URL sera utilisé comme URL de redirection pour l'autorisation OAuth." @@ -361,7 +361,7 @@ "message": "Saisissez votre jeton API (avec l'accès Admin) pour enregistrer votre application." }, "You have successfully registered your application.": { - "message": "Vous avez enregistré votre demande avec succès." + "message": "Votre inscription a été réalisée avec succès." }, "You can now start using Deriv API": { "message": "Vous pouvez maintenant commencer à utiliser l'API Deriv" @@ -677,7 +677,7 @@ "message": "Qui sommes-nous ?" }, "Contact us": { - "message": "Contactez nous" + "message": "Contactez-nous." }, "Only alphanumeric characters with spaces and underscores are allowed. (Example: my_application)": { "message": "Seuls les caractères alphanumériques avec des espaces et des traits de soulignement sont autorisés. (Exemple : mon_application)" @@ -731,7 +731,7 @@ "message": "Nom" }, "Token": { - "message": "Jeton" + "message": "Token" }, "Scopes": { "message": "Scopes" @@ -752,7 +752,7 @@ "message": "Votre compte" }, "Choose your API token with the admin scope": { - "message": "Choisissez votre jeton d'API avec le champ d'application de l'administrateur" + "message": "Choisissez votre Token API avec le champ d'application administrateur" }, "Application Name": { "message": "Nom de l'application" @@ -760,9 +760,6 @@ "Application ID": { "message": "ID de l'application" }, - "Redirect URL": { - "message": "URL de redirection" - }, "Actions": { "message": "Actions" }, @@ -776,7 +773,7 @@ "message": "Les noms de jetons en double ne sont pas autorisés." }, "Only alphanumeric characters with spaces and underscores are allowed": { - "message": "Seuls les caractères alphanumériques, les espaces et les traits de soulignement sont autorisés." + "message": "Seuls les caractères alphanumériques avec des espaces et des traits de soulignement sont autorisés." }, "Only 2-32 characters are allowed": { "message": "Seuls 2-32 caractères sont autorisés" @@ -791,7 +788,7 @@ "message": "Nommez votre jeton et cliquez sur Créer pour générer votre jeton." }, "Token name (You've created {numberOfTokens} out of 30 tokens)": { - "message": "Nom du jeton (Vous avez créé {numberOfTokens} sur 30 jetons)" + "message": "Nom du token (Vous avez créé {numberOfTokens} sur 30 tokens)" }, "Create": { "message": "Créer" @@ -827,7 +824,7 @@ "message": "Oui, supprimer" }, "Delete token": { - "message": "Supprimer le jeton" + "message": "Supprimer le Token" }, "Are you sure you want to delete this token?": { "message": "Souhaitez-vous vraiment supprimer ce jeton ?" @@ -839,7 +836,7 @@ "message": "Souhaitez-vous vraiment supprimer cette application ?" }, "Update App": { - "message": "Mise à jour de l'application" + "message": "Mettre à jour l'application" }, "Your token name must be atleast 2 characters long.": { "message": "Le nom de votre jeton doit comporter au moins 2 caractères." @@ -848,16 +845,16 @@ "message": "Seuls 32 caractères sont autorisés." }, "Nevermind": { - "message": "Nevermind (L'esprit du temps)" + "message": "Annuler" }, "OK": { "message": "OK" }, "Token created successfully!": { - "message": "Token créé avec succès !" + "message": "Token créé avec succès !" }, "Please save this token key. For security reasons, it can't be viewed or copied again. If you lose this key, you'll need to generate a new token.": { - "message": "Veuillez enregistrer cette clé symbolique. Pour des raisons de sécurité, elle ne peut être ni consultée ni copiée à nouveau. Si vous perdez cette clé, vous devrez générer un nouveau jeton." + "message": "Veuillez enregistrer cette clé de Token. Pour des raisons de sécurité, elle ne peut être ni consultée ni copiée à nouveau. Si vous perdez cette clé, vous devrez générer un nouveau Token." }, "Key": { "message": "Clé" @@ -903,5 +900,305 @@ }, "Send an email": { "message": "Envoyer un e-mail" + }, + "Sort": { + "message": "Trier" + }, + "Filter": { + "message": "Filtre" + }, + "Application manager": { + "message": "Gestionnaire d'application" + }, + "Here's where you can see your app's details. Edit your app settings to suit your needs or delete them permanently.": { + "message": "C'est ici que vous pouvez voir les détails de votre application. Modifiez les paramètres de votre application selon vos besoins ou supprimez-les définitivement." + }, + "Register new application": { + "message": "Enregistrer une nouvelle application" + }, + "App’s name": { + "message": "Nom de l'application" + }, + "OAuth scopes": { + "message": "Étendues OAuth" + }, + "OAuth redirect URL": { + "message": "URL de redirection OAuth" + }, + "Register tokens": { + "message": "Enregistrer des Tokens" + }, + "Account type": { + "message": "Type de compte" + }, + "Add new token": { + "message": "Ajouter un nouveau Token" + }, + "Home": { + "message": "Accueil" + }, + "API Explorer": { + "message": "API Explorer" + }, + "Enter your app name.": { + "message": "Entrez le nom de votre application." + }, + "Your markup value must be equal to or above 0.00": { + "message": "Votre valeur de majoration doit être égale ou supérieure à 0,00" + }, + "Your markup value must be no more than 3.00.": { + "message": "Votre valeur de majoration ne doit pas dépasser 3,00." + }, + "Authorisation required": { + "message": "Autorisation requise" + }, + "Invalid JSON": { + "message": "JSON invalide" + }, + "Applications": { + "message": "Applications" + }, + "API tokens": { + "message": "Tokens API" + }, + "Edit application": { + "message": "Modifier l'application" + }, + "Create token": { + "message": "Créer un Token" + }, + "Do not share tokens with the admin scope with unauthorized parties.": { + "message": "Ne partagez pas les Tokens à l'aide de l'accès Admin avec des personnes non autorisées." + }, + "Enable admin access": { + "message": "Activer l'accès administrateur" + }, + "Are you sure you want to enable admin scope for your token?": { + "message": "Souhaitez-vous vraiment activer l'accès administrateur pour votre Token ?" + }, + "Granting admin access gives your token full control over your account and increases security risks. We recommend granting this level of access only when it's essential.": { + "message": "Accorder un accès administrateur donne à votre Token un contrôle total sur votre compte et augmente les risques de sécurité. Nous recommandons d'accorder ce niveau d'accès uniquement lorsqu'il est essentiel." + }, + "Trading Information": { + "message": "Informations de trading" + }, + "App Dashboard": { + "message": "Tableau de bord de l'application" + }, + "Start using Deriv API to bring custom integrations and powerful automation to your apps.": { + "message": "Commencez à utiliser Deriv API pour apporter des intégrations personnalisées et une automatisation puissante à vos applications." + }, + "Accounts": { + "message": "Comptes" + }, + "Account Type": { + "message": "Type de compte" + }, + "Token scopes": { + "message": "Étendues de Token" + }, + "Last used": { + "message": "Dernière utilisation" + }, + "API token manager": { + "message": "Gestionnaire de Tokens API" + }, + "Access all your API token details here.": { + "message": "Accédez à tous les détails de votre Token API ici." + }, + "Create new token": { + "message": "Créer un nouveau Token" + }, + "Never": { + "message": "Jamais" + }, + "You'll have full access to your clients' information.": { + "message": "Vous aurez un accès complet aux informations de vos clients." + }, + "You'll be able to buy and sell contracts on your clients' behalf.": { + "message": "Vous pourrez acheter et vendre des contrats pour le compte de vos clients." + }, + "You‘ll be able to view your clients’ trading information, including their account balance.": { + "message": "Vous pourrez accéder aux informations de trading de vos clients, y compris le solde de leur compte." + }, + "You‘ll be able to perform deposits and withdrawals on your clients’ behalf.": { + "message": "Vous pourrez effectuer des dépôts et des retraits pour le compte de vos clients." + }, + "Full account access, including the access to manage security tokens.": { + "message": "Accès complet au compte, y compris l'accès à la gestion des Tokens de sécurité." + }, + "Enter your app's name": { + "message": "Entrez le nom de votre application" + }, + "Use only letters, numbers, spaces, and underscores.": { + "message": "Utilisez uniquement des lettres, des chiffres, des espaces et des traits de soulignement." + }, + "Your app's name can contain up to 48 characters.": { + "message": "Le nom de votre application peut contenir jusqu'à 48 caractères." + }, + "Your app's name cannot contain the words \"Binary\", \"Deriv\", or any of their variations.": { + "message": "Le nom de votre application ne peut pas contenir les mots \"Binary\", \"Deriv\", ou l'une de leurs variations." + }, + "You must accept the terms and conditions.": { + "message": "Vous devez accepter les termes et conditions." + }, + "Filter by OAuth scopes": { + "message": "Filtrer par étendues OAuth" + }, + "OAuth Scopes": { + "message": "Étendues OAuth" + }, + "OAuth Redirect URL": { + "message": "URL de redirection OAuth" + }, + "Select your account type:": { + "message": "Sélectionnez votre type de compte :" + }, + "Select scopes based on the access you need:": { + "message": "Sélectionnez les champs en fonction de l'accès dont vous avez besoin:" + }, + "No keywords \"deriv\" or \"binary\" or words that look similar, e.g. \"_binary_\" or \"d3riv\" are allowed.": { + "message": "Aucun mot-clé \"deriv\" ou \"binary\" ou mots qui semblent similaires, par exemple \"_binary_\" ou \"d3rev\" ne sont autorisés." + }, + "Select an account type.": { + "message": "Sélectionnez un type de compte." + }, + "Enter your token name.": { + "message": "Entrez le nom de votre Token." + }, + "Enter the name of the application you want to register:": { + "message": "Entrez le nom de l'application que vous souhaitez enregistrer :" + }, + "Add a markup to the price of each trade to help you earn a commission. Enter your markup percentage below. Learn more about markup calculations in our detailed": { + "message": "Ajoutez une majoration au prix de chaque transaction pour vous aider à gagner une commission. Entrez votre pourcentage de majoration ci-dessous. Apprenez-en plus sur les calculs de majoration dans notre détaillé" + }, + "Markup is only available for real accounts and trading applications.": { + "message": "La majoration est uniquement disponible pour les comptes réels et les applications de trading." + }, + "OAuth settings": { + "message": "Paramètres OAuth" + }, + "Log in to your app using your Deriv account without an API token. With OAuth, third-party applications can securely authorise access without requiring password sharing, enhancing both security and user control.": { + "message": "Connectez-vous à votre application avec votre compte Deriv sans Token API. Avec OAuth, les applications tierces peuvent autoriser l'accès en toute sécurité sans nécessité de partager des mots de passe, renforçant ainsi la sécurité et le contrôle utilisateur." + }, + "Use OAuth if your application requires other users to sign in.": { + "message": "Utilisez OAuth si votre application nécessite que d'autres utilisateurs se connectent." + }, + "Redirect URL is mandatory to enable OAuth on your app.": { + "message": "L'URL de redirection est obligatoire pour activer OAuth sur votre application." + }, + "URL Configuration": { + "message": "Configuration de l'URL" + }, + "To set up OAuth for your app, specify the URL where users should be redirected after authorisation.": { + "message": "Pour configurer OAuth pour votre application, spécifiez l'URL où les utilisateurs doivent être redirigés après l'autorisation." + }, + "Redirect URL": { + "message": "URL de redirection" + }, + "If your app includes verification logic, enter the email verification URL below (e.g. for account opening, verification, and password reset):": { + "message": "Si votre application inclut une logique de vérification, entrez l'URL de vérification par e-mail ci-dessous (par exemple pour l'ouverture de compte, la vérification et la réinitialisation de mot de passe) :" + }, + "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the Redirect URL with the token will be used.": { + "message": "Si fourni, l'URL de vérification sera complétée par un Token et envoyée à l'email de l'utilisateur. Sinon, l'URL de redirection avec le Token sera utilisée." + }, + "Scopes of authorisation": { + "message": "Portées de l'autorisation" + }, + "You'll be able to process your clients’ payments.": { + "message": "Vous pourrez traiter les paiements de vos clients." + }, + "Grant admin access only when it’s essential for your app's workflow.": { + "message": "Accordez l'accès administrateur uniquement lorsqu'il est essentiel pour le flux de travail de votre application." + }, + "Update application": { + "message": "Mise à jour de l'application" + }, + "Enable admin access for your app?": { + "message": "Activer l'accès administrateur pour votre application ?" + }, + "For better security, enable admin access only when it's necessary. This approach limits access to client activities, minimising risks and safeguarding both workflow efficiency and client trust.": { + "message": "Pour une meilleure sécurité, activez l'accès administrateur uniquement lorsque cela est nécessaire. Cette approche limite l'accès aux activités des clients, minimise les risques et protège à la fois l'efficacité du flux de travail et la confiance des clients." + }, + "Enter your token name": { + "message": "Entrez votre nom de Token" + }, + "Token name": { + "message": "Nom du Token" + }, + "App name (A to Z)": { + "message": "Nom de l'application (A à Z)" + }, + "App name (Z to A)": { + "message": "Nom de l'application (Z à A)" + }, + "App ID (A to Z)": { + "message": "ID de l'application (A à Z)" + }, + "App ID (Z to A)": { + "message": "ID de l'application (Z à A)" + }, + "All": { + "message": "Tout" + }, + "(No scope)": { + "message": "(Aucune portée)" + }, + "Sort by": { + "message": "Trier par" + }, + "Apply": { + "message": "Appliquer" + }, + "Error!": { + "message": "Erreur !" + }, + "Success!": { + "message": "Succès !" + }, + "Ok": { + "message": "Ok" + }, + "Configure now": { + "message": "Configurer maintenant" + }, + "Maybe later": { + "message": "Peut-être plus tard" + }, + "Application registered successfully!": { + "message": "Application enregistrée avec succès !" + }, + "Ready to take the next step?": { + "message": "Prêt à passer à l'étape suivante ?" + }, + "Optimise your app's capabilities by:": { + "message": "Optimisez les capacités de votre application en :" + }, + "Creating an API token to use with your application.": { + "message": "Créant un Token API à utiliser avec votre application." + }, + "Adding OAuth authentication in your app.": { + "message": "Ajoutant une authentification OAuth dans votre application." + }, + "Selecting the scopes of OAuth authorisation for your app.": { + "message": "Sélectionnant les portées d'autorisation OAuth pour votre application." + }, + "Note: You can make these changes later through the dashboard.": { + "message": "Remarque : vous pourrez apporter ces modifications ultérieurement via le tableau de bord." + }, + "documentation": { + "message": "documentation" + }, + "Authorisation URL is mandatory to enable OAuth on your app.": { + "message": "L'URL d'autorisation est obligatoire pour activer OAuth sur votre application." + }, + "Authorisation URL": { + "message": "URL d'autorisation" + }, + "If provided, the verification URL will be appended with a token and sent to the user's email. Otherwise, the authorisation URL with the token will be used.": { + "message": "S'il est fourni, l'URL de vérification sera appariée avec un Token et envoyé à l'e-mail de l'utilisateur. Sinon, l'URL d'autorisation avec le Token sera utilisée." + }, + "You'll be able to perform deposits and withdrawals on your clients' behalf.": { + "message": "Vous pourrez effectuer des dépôts et des retraits pour le compte de vos clients." } } diff --git a/src/components/AccountSwitcher/index.tsx b/src/components/AccountSwitcher/index.tsx index 15bf12315..37de0fbed 100644 --- a/src/components/AccountSwitcher/index.tsx +++ b/src/components/AccountSwitcher/index.tsx @@ -1,7 +1,8 @@ import React, { useState, useRef } from 'react'; import { InputDropdown } from '@deriv-com/quill-ui'; -import { isNotDemoCurrency } from '@site/src/utils'; +import { translate } from '@docusaurus/Translate'; import useAuthContext from '@site/src/hooks/useAuthContext'; +import { isNotDemoCurrency } from '@site/src/utils'; import useOnClickOutside from '@site/src/hooks/useOnClickOutside'; import useAccountSelector from '@site/src/hooks/useAccountSelector'; import CurrencyIcon from '../CurrencyIcon'; @@ -38,7 +39,7 @@ const AccountSwitcher = ({ onChange }: AccountSwitcherProps) => { return (
} placeholder={currentLoginAccount.name} diff --git a/src/components/ApiTokenNavbarItem/index.tsx b/src/components/ApiTokenNavbarItem/index.tsx index 9a4c40437..3f8e10a15 100644 --- a/src/components/ApiTokenNavbarItem/index.tsx +++ b/src/components/ApiTokenNavbarItem/index.tsx @@ -8,6 +8,7 @@ import useAppManager from '@site/src/hooks/useAppManager'; import styles from './api_token_switcher.module.scss'; import RenderOfficialContents from '../RenderOfficialContents'; import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; +import Translate from '@docusaurus/Translate'; const ApiTokenNavbarItem = () => { const { is_logged_in, is_authorized } = useAuthContext(); @@ -39,7 +40,7 @@ const ApiTokenNavbarItem = () => { className={styles.createToken} to='/dashboard' > - Add new token + Add new token
)} diff --git a/src/components/UserNavbarItem/item.desktop.tsx b/src/components/UserNavbarItem/item.desktop.tsx index 7bb2bdf30..7bbd9594d 100644 --- a/src/components/UserNavbarItem/item.desktop.tsx +++ b/src/components/UserNavbarItem/item.desktop.tsx @@ -1,6 +1,7 @@ import React from 'react'; import clsx from 'clsx'; import Translate from '@docusaurus/Translate'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import { Button } from '@deriv-com/quill-ui'; import { LabelPairedGridLgRegularIcon, @@ -8,6 +9,7 @@ import { } from '@deriv/quill-icons'; import useLogout from '@site/src/hooks/useLogout'; import useDeviceType from '@site/src/hooks/useDeviceType'; + import { IUserNavbarItemProps } from './item.types'; import styles from './UserNavbarItem.module.scss'; @@ -17,10 +19,20 @@ interface IActionProps { } const DashboardActions: React.FC = ({ handleClick, isDesktop }) => { + const { + i18n: { currentLocale }, + } = useDocusaurusContext(); + + const onClickDashboard = () => { + const is_en = currentLocale === 'en'; + const pathInfo = `${!is_en ? `/${currentLocale}` : ''}/dashboard`; + location.assign(pathInfo); + }; + return (
diff --git a/src/features/dashboard/components/api-token-table/cell-account-type.tsx b/src/features/dashboard/components/api-token-table/cell-account-type.tsx index 5b7b7ff92..9e98a0867 100644 --- a/src/features/dashboard/components/api-token-table/cell-account-type.tsx +++ b/src/features/dashboard/components/api-token-table/cell-account-type.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { getCurrencyObject } from '@site/src/utils'; +import { translate } from '@docusaurus/Translate'; import { isNotDemoCurrency } from '@site/src/utils'; import CurrencyIcon from '@site/src/components/CurrencyIcon'; import useAuthContext from '@site/src/hooks/useAuthContext'; @@ -13,7 +13,7 @@ const AccountTypeCell = () => { {currentLoginAccount.name && currentLoginAccount.currency ? `${currentLoginAccount.name}` - : 'Accounts'} + : translate({ message: 'Accounts' })}
); }; diff --git a/src/features/dashboard/components/api-token-table/cell-delete-token.tsx b/src/features/dashboard/components/api-token-table/cell-delete-token.tsx index 15f2ef674..9a3804184 100644 --- a/src/features/dashboard/components/api-token-table/cell-delete-token.tsx +++ b/src/features/dashboard/components/api-token-table/cell-delete-token.tsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import { translate } from '@docusaurus/Translate'; import { LabelPairedTrashMdRegularIcon } from '@deriv/quill-icons'; import CustomTooltip from '@site/src/components/CustomTooltip'; import useApiToken from '@site/src/hooks/useApiToken'; @@ -38,7 +39,7 @@ const TokenActionsCell = ({ tokenId }: TTokenActionsCellProps) => { data-testid={'delete-token-button'} className='tooltip-wrapper' > - + diff --git a/src/features/dashboard/components/api-token-table/cell-last-used.tsx b/src/features/dashboard/components/api-token-table/cell-last-used.tsx index a0bcb6426..f2f13a520 100644 --- a/src/features/dashboard/components/api-token-table/cell-last-used.tsx +++ b/src/features/dashboard/components/api-token-table/cell-last-used.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { formatDate } from '@site/src/utils'; import styles from './cells.module.scss'; +import { translate } from '@docusaurus/Translate'; type TApiLastUsedCellProps = { cell: { @@ -10,7 +11,7 @@ type TApiLastUsedCellProps = { const ApiLastUsedCell: React.FC = ({ cell }) => (
-
{cell.value ? formatDate(cell.value) : 'Never'}
+
{cell.value ? formatDate(cell.value) : translate({ message: 'Never' })}
); diff --git a/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx b/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx index 7cdd49788..b6f37df00 100644 --- a/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx +++ b/src/features/dashboard/components/api-token-table/copy-token-dialog/copy-token-dialog.tsx @@ -1,8 +1,8 @@ import React, { useMemo, useCallback } from 'react'; +import Translate, { translate } from '@docusaurus/Translate'; import { Modal } from '@deriv/ui'; import { TModalActionButton } from '@deriv/ui/dist/types/src/components/core/modal/types'; import styles from './copy-token-dialog.module.scss'; -import Translate, { translate } from '@docusaurus/Translate'; type TCopyTokenDialog = { setToggleModal: React.Dispatch>; diff --git a/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx b/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx index 9d53f02ac..971f80ceb 100644 --- a/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx +++ b/src/features/dashboard/components/api-token-table/delete-token-dialog/delete-token-dialog.tsx @@ -1,13 +1,12 @@ import React, { useCallback, useContext } from 'react'; -import { TTokenType } from '@site/src/types'; +import { translate } from '@docusaurus/Translate'; import { Modal, Heading, Text } from '@deriv-com/quill-ui'; import { StandaloneTrashRegularIcon } from '@deriv/quill-icons'; +import { TTokenType } from '@site/src/types'; import useDeviceType from '@site/src/hooks/useDeviceType'; import { ApiTokenContext } from '@site/src/contexts/api-token/api-token.context'; import useDisableScroll from '../../../hooks/useDisableScroll'; import useDeleteToken from '../../../hooks/useDeleteToken'; -import { translate } from '@docusaurus/Translate'; - import './delete-token-dialog.scss'; type TDeleteTokenDialogProps = { diff --git a/src/features/dashboard/components/api-token-table/responsive-table.tsx b/src/features/dashboard/components/api-token-table/responsive-table.tsx index e6e803621..2ad109c2a 100644 --- a/src/features/dashboard/components/api-token-table/responsive-table.tsx +++ b/src/features/dashboard/components/api-token-table/responsive-table.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { translate } from '@docusaurus/Translate'; import CustomAccordion from '@site/src/components/CustomAccordion'; import { TTokenType } from '@site/src/types'; import TokenActionsCell from './cell-delete-token'; @@ -25,14 +26,20 @@ const AccordionItem: React.FC = ({ label, value }) => ( const generateContent = (token: TTokenType) => { return (
- - } /> - } /> + + } /> } + /> + } /> - } /> + } + />
); }; diff --git a/src/features/dashboard/components/app-form/app-form.tsx b/src/features/dashboard/components/app-form/app-form.tsx index d3c922463..69b5d9736 100644 --- a/src/features/dashboard/components/app-form/app-form.tsx +++ b/src/features/dashboard/components/app-form/app-form.tsx @@ -1,8 +1,10 @@ import React, { Dispatch, ReactNode, SetStateAction, useEffect, useState } from 'react'; -import { Button, Text } from '@deriv/ui'; +import clsx from 'clsx'; import { useForm } from 'react-hook-form'; +import { Button, Text } from '@deriv/ui'; +import Translate, { translate } from '@docusaurus/Translate'; import { yupResolver } from '@hookform/resolvers/yup'; -import { appRegisterSchema, appEditSchema, IRegisterAppForm } from '../../types'; +import useWS from '@site/src/hooks/useWs'; import useApiToken from '@site/src/hooks/useApiToken'; import useAuthContext from '@site/src/hooks/useAuthContext'; import CustomSelectDropdown from '@site/src/components/CustomSelectDropdown'; @@ -11,11 +13,11 @@ import TokenDropdown from '@site/src/components/CustomSelectDropdown/token-dropd import SelectedAccount from '@site/src/components/CustomSelectDropdown/account-dropdown/SelectedAccount'; import AccountDropdown from '@site/src/components/CustomSelectDropdown/account-dropdown/AccountDropdown'; import CustomCheckbox from '@site/src/components/CustomCheckbox'; -import styles from './app-form.module.scss'; -import clsx from 'clsx'; import useAppManager from '@site/src/hooks/useAppManager'; -import useWS from '@site/src/hooks/useWs'; +import { appRegisterSchema, appEditSchema, IRegisterAppForm } from '../../types'; import RestrictionsAppname from '../restrictions-appname'; +import styles from './app-form.module.scss'; + type TAppFormProps = { initialValues?: Partial; @@ -92,7 +94,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. + )} @@ -109,7 +113,11 @@ const AppForm = ({ }} size='large' > - {is_update_mode ? 'Update Application' : 'Register Application'} + {is_update_mode ? ( + Update Application + ) : ( + Register Application + )} {is_update_mode && cancelButton()} @@ -124,10 +132,12 @@ const AppForm = ({
-

App information

+

+ App information +

{!is_update_mode && ( - Select your api token ( it should have admin scope ) + Select your api token ( it should have admin scope ) )}
@@ -135,7 +145,7 @@ const AppForm = ({
- +
{errors && errors.name ? ( @@ -182,7 +194,7 @@ const AppForm = ({ ) : !is_update_mode && app_name_exists ? ( - That name is taken. Choose another. + That name is taken. Choose another. ) : ( display_restrictions && @@ -190,16 +202,22 @@ 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. +

@@ -216,14 +234,18 @@ const AppForm = ({ defaultValue={0} placeholder=' ' /> - +
- Enter 0 if you don‘t want to earn a markup. Max markup: 3% + + Enter 0 if you don‘t want to earn a markup. Max markup: 3% + {errors && errors.app_markup_percentage && ( @@ -233,11 +255,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. +
@@ -249,15 +275,19 @@ 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} @@ -275,7 +305,9 @@ const AppForm = ({ type='text' placeholder=' ' /> - + {errors && errors.verification_uri && ( {errors.verification_uri.message} @@ -285,9 +317,13 @@ const AppForm = ({
-

Scope of authorization

+

+ Scope of authorization +

- Select the scope for your app: + + Select the scope for your app: +
@@ -295,15 +331,26 @@ const AppForm = ({
@@ -314,8 +361,14 @@ const AppForm = ({ register={register('trading_information')} >
@@ -326,16 +379,27 @@ const AppForm = ({ register={register('payments')} >
@@ -343,15 +407,16 @@ const AppForm = ({
- By registering your application, you acknowledge that you‘ve read and accepted - the Deriv API{' '} + {translate({ message: `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/app-register-success-modal/app-register-success-modal.tsx b/src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx index 450bc1cd6..296c83bcb 100644 --- a/src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx +++ b/src/features/dashboard/components/app-register-success-modal/app-register-success-modal.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import useAppManager from '@site/src/hooks/useAppManager'; +import Translate, { translate } from '@docusaurus/Translate'; import { Heading, Modal, Text } from '@deriv-com/quill-ui'; import { StandaloneCircleCheckRegularIcon } from '@deriv/quill-icons'; +import useAppManager from '@site/src/hooks/useAppManager'; import useDeviceType from '@site/src/hooks/useDeviceType'; import useDisableScroll from '../../hooks/useDisableScroll'; -import Translate from '@docusaurus/Translate'; import '../dialogs/delete-app-dialog/delete-app-dialog.scss'; interface IAppRegisterSuccessModalProps { @@ -24,12 +24,12 @@ const AppRegisterSuccessModal = ({ return ( { onConfigure(); onCancel(); }} - secondaryButtonLabel='Maybe later' + secondaryButtonLabel={translate({ message: 'Maybe later' })} secondaryButtonCallback={onCancel} isMobile={deviceType !== 'desktop'} showHandleBar diff --git a/src/features/dashboard/components/app-register/app-register.tsx b/src/features/dashboard/components/app-register/app-register.tsx index 35ae4e617..48d2ddb03 100644 --- a/src/features/dashboard/components/app-register/app-register.tsx +++ b/src/features/dashboard/components/app-register/app-register.tsx @@ -1,8 +1,10 @@ import React from 'react'; +import Translate, { translate } from '@docusaurus/Translate'; import { Button, Text } from '@deriv-com/quill-ui'; import { useForm } from 'react-hook-form'; import { yupResolver } from '@hookform/resolvers/yup'; -import './app-register.scss'; +import CustomCheckbox from '@site/src/components/CustomCheckbox'; +import useDeviceType from '@site/src/hooks/useDeviceType'; import { IBaseRegisterAppForm, TAppRegisterProps, @@ -11,8 +13,7 @@ import { baseAppRegisterSchema, app_name_error_map, } from './types'; -import CustomCheckbox from '@site/src/components/CustomCheckbox'; -import useDeviceType from '@site/src/hooks/useDeviceType'; +import './app-register.scss'; const TermsAndConditions: React.FC = ({ register }) => { return ( @@ -20,14 +21,13 @@ const TermsAndConditions: React.FC = ({ register }) => @@ -74,8 +74,8 @@ const AppRegister: React.FC = ({ submit }) => {
@@ -85,7 +85,7 @@ const AppRegister: React.FC = ({ submit }) => { variant='primary' role='submit' disabled={has_error} - label='Register now' + label={translate({ message: 'Register now' })} >
diff --git a/src/features/dashboard/components/app-register/types.ts b/src/features/dashboard/components/app-register/types.ts index 954d331eb..64719725f 100644 --- a/src/features/dashboard/components/app-register/types.ts +++ b/src/features/dashboard/components/app-register/types.ts @@ -1,16 +1,19 @@ +import { translate } from '@docusaurus/Translate'; import { UseFormRegisterReturn } from 'react-hook-form'; import * as yup from 'yup'; export const app_name_error_map = { - error_code_1: 'Use only letters, numbers, spaces, and underscores.', - error_code_2: `Your app's name can contain up to 48 characters.`, - error_code_3: `Your app's name cannot contain the words "Binary", "Deriv", or any of their variations.`, + error_code_1: translate({ message: 'Use only letters, numbers, spaces, and underscores.' }), + error_code_2: translate({ message: `Your app's name can contain up to 48 characters.` }), + error_code_3: translate({ + message: `Your app's name cannot contain the words "Binary", "Deriv", or any of their variations.`, + }), }; export const base_registration_schema = { name: yup .string() - .required('Enter your app name.') + .required(translate({ message: 'Enter your app name.' })) .max(48, app_name_error_map.error_code_2) .matches(/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9_ ]*$/, { message: app_name_error_map.error_code_1, @@ -23,7 +26,9 @@ export const base_registration_schema = { excludeEmptyString: true, }, ), - tnc_approval: yup.boolean().oneOf([true], 'You must accept the terms and conditions.'), + tnc_approval: yup + .boolean() + .oneOf([true], translate({ message: 'You must accept the terms and conditions.' })), }; export type TTermsAndConditionsProps = { diff --git a/src/features/dashboard/components/apps-table/apps-table.scss b/src/features/dashboard/components/apps-table/apps-table.scss index 07cbf3f18..fbbc04d94 100644 --- a/src/features/dashboard/components/apps-table/apps-table.scss +++ b/src/features/dashboard/components/apps-table/apps-table.scss @@ -158,7 +158,7 @@ .quill { &__dropdown-button { &__content { - min-width: 200px; + min-width: 14rem; } } &__item-container { diff --git a/src/features/dashboard/components/apps-table/apps-table.tsx b/src/features/dashboard/components/apps-table/apps-table.tsx index e5afe7e61..5e47381bb 100644 --- a/src/features/dashboard/components/apps-table/apps-table.tsx +++ b/src/features/dashboard/components/apps-table/apps-table.tsx @@ -1,6 +1,7 @@ import React, { HTMLAttributes, useCallback, useEffect, useMemo, useState } from 'react'; import { Cell, Column } from 'react-table'; import clsx from 'clsx'; +import Translate, { translate } from '@docusaurus/Translate'; import { ApplicationObject } from '@deriv/api-types'; import { Button, DropdownButton, Heading, Text, TSingleSelectItem } from '@deriv-com/quill-ui'; import { @@ -23,10 +24,10 @@ import AppsTableOptionDialog, { } from './option-dialog'; import ResponsiveTable from './responsive-table'; import AppActionsCell from './app-actions.cell'; -import './apps-table.scss'; -import Translate, { translate } from '@docusaurus/Translate'; import CopyTextCell from '../common-table/cell-copy-text'; import ScopesCell from '../common-table/cell-scopes'; +import './apps-table.scss'; + export type TAppColumn = Column; @@ -65,7 +66,7 @@ const AppsTableOptions: React.FC = ({
} diff --git a/src/features/dashboard/components/apps-table/option-dialog.tsx b/src/features/dashboard/components/apps-table/option-dialog.tsx index 4bbb8d8c8..94bd6387e 100644 --- a/src/features/dashboard/components/apps-table/option-dialog.tsx +++ b/src/features/dashboard/components/apps-table/option-dialog.tsx @@ -1,25 +1,26 @@ import React from 'react'; import { Checkbox, Modal, RadioGroup } from '@deriv-com/quill-ui'; +import { translate } from '@docusaurus/Translate'; interface IAppsTableOption { [key: string]: string; } export const tableSortOptions: IAppsTableOption = { - appNameAscending: 'App name (A to Z)', - appNameDescending: 'App name (Z to A)', - appIdAscending: 'App ID (A to Z)', - appIdDescending: 'App ID (Z to A)', + appNameAscending: translate({ message: 'App name (A to Z)' }), + appNameDescending: translate({ message: 'App name (Z to A)' }), + appIdAscending: translate({ message: 'App ID (A to Z)' }), + appIdDescending: translate({ message: 'App ID (Z to A)' }), }; export const tableFilterOptions: IAppsTableOption = { - all: 'All', - no_scope: '(No scope)', - admin: 'Admin', - payments: 'Payments', - read: 'Read', - trade: 'Trade', - trading_information: 'Trading Information', + all: translate({ message: 'All' }), + no_scope: translate({ message: '(No scope)' }), + admin: translate({ message: 'Admin' }), + payments: translate({ message: 'Payments' }), + read: translate({ message: 'Read' }), + trade: translate({ message: 'Trade' }), + trading_information: translate({ message: 'Trading Information' }), }; interface IAppsTableOptionsProps { @@ -31,7 +32,7 @@ interface IAppsTableOptionsProps { const SortOptions: React.FC = ({ handleChange, selectedOption }) => { return ( <> - + {Object.keys(tableSortOptions).map((key) => ( @@ -51,7 +52,7 @@ const SortOptions: React.FC = ({ handleChange, selectedO const FilterOptions: React.FC = ({ handleChange, selectedOptions }) => { return ( <> - + {Object.keys(tableFilterOptions).map((option) => ( = ({ label, value, row_wise = const generateContent = (item: ApplicationObject, accordionActions: TAccordionActions) => { return (
- } /> } + /> + } row_wise /> = ({ cell }) => ( <> {cell.value .sort((a, b) => { return SCOPES_ORDER.indexOf(a) - SCOPES_ORDER.indexOf(b); }) - .map((scopes: string): React.ReactElement => { + .map((item: string): React.ReactElement => { return ( - {scopes.charAt(0).toUpperCase() + scopes.slice(1).replace('_', ' ')} + {Scopes[item]} ); })} diff --git a/src/features/dashboard/components/dashboard-container/dashboard-container.tsx b/src/features/dashboard/components/dashboard-container/dashboard-container.tsx index b39842d6d..2ffde7e8e 100644 --- a/src/features/dashboard/components/dashboard-container/dashboard-container.tsx +++ b/src/features/dashboard/components/dashboard-container/dashboard-container.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Heading, Text } from '@deriv-com/quill-ui'; -import './dashboard-container.scss'; +import Translate from '@docusaurus/Translate'; import useAppManager from '@site/src/hooks/useAppManager'; import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; +import './dashboard-container.scss'; const hideHeaderForTabs = [TDashboardTab.UPDATE_APP, TDashboardTab.REGISTER_TOKENS]; @@ -14,10 +15,12 @@ const DashboardContainer: React.FC<{ children: React.ReactNode }> = ({ children
{!hideHeaderForTabs.includes(currentTab) && (
- App Dashboard + App Dashboard - Start using Deriv API to bring custom integrations and powerful automation to your - apps. + + Start using Deriv API to bring custom integrations and powerful automation to your + apps. +
)} diff --git a/src/features/dashboard/components/dialogs/delete-app-dialog/delete-app-dialog.tsx b/src/features/dashboard/components/dialogs/delete-app-dialog/delete-app-dialog.tsx index 00d37317e..ad00c0b56 100644 --- a/src/features/dashboard/components/dialogs/delete-app-dialog/delete-app-dialog.tsx +++ b/src/features/dashboard/components/dialogs/delete-app-dialog/delete-app-dialog.tsx @@ -1,11 +1,11 @@ import React from 'react'; +import Translate, { translate } from '@docusaurus/Translate'; import { Modal, Heading, Text } from '@deriv-com/quill-ui'; import { StandaloneTrashRegularIcon } from '@deriv/quill-icons'; import useDeviceType from '@site/src/hooks/useDeviceType'; import { useDeleteApp } from '../../../hooks/useDeleteApp'; import useDisableScroll from '../../../hooks/useDisableScroll'; import './delete-app-dialog.scss'; -import Translate, { translate } from '@docusaurus/Translate'; type TDeleteAppDialogProps = { appId: number; diff --git a/src/features/dashboard/components/dialogs/register-app-dialog-error/register-app-dialog-error.tsx b/src/features/dashboard/components/dialogs/register-app-dialog-error/register-app-dialog-error.tsx index dc8112c82..bbeb65de5 100644 --- a/src/features/dashboard/components/dialogs/register-app-dialog-error/register-app-dialog-error.tsx +++ b/src/features/dashboard/components/dialogs/register-app-dialog-error/register-app-dialog-error.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { TModalActionButton } from '@deriv/ui/dist/types/src/components/core/modal/types'; import { Modal } from '@deriv/ui'; +import { TModalActionButton } from '@deriv/ui/dist/types/src/components/core/modal/types'; import { translate } from '@docusaurus/Translate'; export type TError = { @@ -43,7 +43,7 @@ const RegisterAppDialogError = ({ error, onClose }: TRegisterAppDialogError) =>
void; @@ -16,7 +16,9 @@ const RegisterAppDialogSuccess = ({ onClose }: IRegisterAppDialogSuccessProps) =
-

Success!

+

+ Success! +

You have successfully registered your application.

diff --git a/src/features/dashboard/components/dialogs/token-creation-dialog-success/token-creation-dialog-success.tsx b/src/features/dashboard/components/dialogs/token-creation-dialog-success/token-creation-dialog-success.tsx index 43202bd2d..81fc6374c 100644 --- a/src/features/dashboard/components/dialogs/token-creation-dialog-success/token-creation-dialog-success.tsx +++ b/src/features/dashboard/components/dialogs/token-creation-dialog-success/token-creation-dialog-success.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; +import Translate, { translate } from '@docusaurus/Translate'; import { Modal, Heading, Text } from '@deriv-com/quill-ui'; import styles from '../../api-token-table/token-cell.module.scss'; import useApiToken from '@site/src/hooks/useApiToken'; @@ -24,7 +25,7 @@ const TokenCreationDialogSuccess = ({ const { updateCurrentTab } = useAppManager(); const handleToggle = () => { setToggleModal(false); - updateCurrentTab(TDashboardTab.MANAGE_TOKENS, true); + updateCurrentTab(TDashboardTab.MANAGE_TOKENS); }; useEffect(() => { @@ -43,7 +44,7 @@ const TokenCreationDialogSuccess = ({ showHandleBar disableCloseOnOverlay isMobile={deviceType !== 'desktop'} - primaryButtonLabel='OK' + primaryButtonLabel={translate({ message: 'OK' })} primaryButtonCallback={handleToggle} showCrossIcon={false} > @@ -54,16 +55,22 @@ const TokenCreationDialogSuccess = ({
- Token created successfully! + + Token created successfully! +

- Please save this token key. For security reasons, it can't be viewed or copied - again. If you lose this key, you'll need to generate a new token. + + Please save this token key. For security reasons, it can't be viewed or copied + again. If you lose this key, you'll need to generate a new token. +

- Key + + Key + {latestToken}
diff --git a/src/features/dashboard/components/loading-table/loading-table.tsx b/src/features/dashboard/components/loading-table/loading-table.tsx index beffa2af4..eb9617815 100644 --- a/src/features/dashboard/components/loading-table/loading-table.tsx +++ b/src/features/dashboard/components/loading-table/loading-table.tsx @@ -1,5 +1,5 @@ -import { SkeletonText } from '@site/src/components/SkeletonText'; import React, { HTMLAttributes } from 'react'; +import { SkeletonText } from '@site/src/components/SkeletonText'; interface ISkeletonRow { columnCount: number; diff --git a/src/features/dashboard/components/token-name-restrictions/token-name-restrictions.tsx b/src/features/dashboard/components/token-name-restrictions/token-name-restrictions.tsx index 475c172a3..754dc18e0 100644 --- a/src/features/dashboard/components/token-name-restrictions/token-name-restrictions.tsx +++ b/src/features/dashboard/components/token-name-restrictions/token-name-restrictions.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import styles from './token-name-restrictions.module.scss'; import Translate, { translate } from '@docusaurus/Translate'; +import styles from './token-name-restrictions.module.scss'; + const TokenNameRestrictions = () => { return ( diff --git a/src/features/dashboard/components/token-register/token-register.tsx b/src/features/dashboard/components/token-register/token-register.tsx index b9353b525..5f1fe9755 100644 --- a/src/features/dashboard/components/token-register/token-register.tsx +++ b/src/features/dashboard/components/token-register/token-register.tsx @@ -9,6 +9,7 @@ import * as yup from 'yup'; import './token-register.scss'; import CreateTokenField from '../api-token-form/create-token-field'; import AccountSwitcher from '@site/src/components/AccountSwitcher'; +import Translate, { translate } from '@docusaurus/Translate'; const schema = yup .object({ @@ -19,17 +20,21 @@ const schema = yup admin: yup.boolean(), name: yup .string() - .min(2, 'Your token name must be atleast 2 characters long.') - .max(32, 'Only up to 32 characters are allowed.') + .min(2, translate({ message: 'Your token name must be atleast 2 characters long.' })) + .max(32, translate({ message: '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, }, ), @@ -48,37 +53,47 @@ type TScope = { const scopes: TScope[] = [ { name: 'read', - description: - 'This scope will allow third-party apps to view your account activity, settings, limits, balance sheets, trade purchase history, and more.', - label: 'Read', + description: translate({ + message: + 'This scope will allow third-party apps to view your account activity, settings, limits, balance sheets, trade purchase history, and more.', + }), + label: translate({ message: 'Read' }), }, { name: 'trade', - description: - 'This scope will allow third-party apps to buy and sell contracts for you, renew your expired purchases, and top up your demo accounts.', - label: 'Trade', + description: translate({ + message: + 'This scope will allow third-party apps to buy and sell contracts for you, renew your expired purchases, and top up your demo accounts.', + }), + label: translate({ message: 'Trade' }), }, { name: 'payments', - description: - 'This scope will allow third-party apps to withdraw to payment agents and make inter-account transfers for you.', - label: 'Payments', + description: translate({ + message: + 'This scope will allow third-party apps to withdraw to payment agents and make inter-account transfers for you.', + }), + label: translate({ message: 'Payments' }), }, { name: 'trading_information', - description: 'This scope will allow third-party apps to view your trading history.', - label: 'Trading information', + description: translate({ + message: 'This scope will allow third-party apps to view your trading history.', + }), + label: translate({ message: 'Trading information' }), }, { name: 'admin', - description: - 'This scope will allow third-party apps to open accounts for you, manage your settings and token usage, and more.', - label: 'Admin', + description: translate({ + message: + 'This scope will allow third-party apps to open accounts for you, manage your settings and token usage, and more.', + }), + label: translate({ message: 'Admin' }), }, ]; const TokenRegister = (props: HTMLAttributes) => { - const { createToken, isCreatingToken } = useCreateToken(); + const { createToken } = useCreateToken(); const [hiderestrictions, setHideRestrictions] = useState(false); const [formIsCleared, setFormIsCleared] = useState(false); const [is_toggle, setToggleModal] = useState(false); @@ -119,16 +134,22 @@ const TokenRegister = (props: HTMLAttributes) => {
- Create new token + + Create new token +
- Select your account type: + + Select your account type: +
- Select scopes based on the access you need: + + Select scopes based on the access you need: +
{scopes.map((item) => ( diff --git a/src/features/dashboard/components/token-register/types.ts b/src/features/dashboard/components/token-register/types.ts index b11e1494f..70f5c9476 100644 --- a/src/features/dashboard/components/token-register/types.ts +++ b/src/features/dashboard/components/token-register/types.ts @@ -1,18 +1,25 @@ +import { translate } from '@docusaurus/Translate'; import { UseFormRegisterReturn } from 'react-hook-form'; import * as yup from 'yup'; export const token_name_error_map = { - error_code_1: 'Only alphanumeric characters with spaces and underscores are allowed.', - error_code_2: `Only 2-32 characters are allowed`, - error_code_3: `No duplicate token names are allowed for the same account.`, - error_code_4: `No keywords "deriv" or "binary" or words that look similar, e.g. "_binary_" or "d3riv" are allowed.`, + error_code_1: translate({ + message: 'Only alphanumeric characters with spaces and underscores are allowed.', + }), + error_code_2: translate({ message: `Only 2-32 characters are allowed` }), + error_code_3: translate({ + message: `No duplicate token names are allowed for the same account.`, + }), + error_code_4: translate({ + message: `No keywords "deriv" or "binary" or words that look similar, e.g. "_binary_" or "d3riv" are allowed.`, + }), }; export const tokenRegisterSchema = yup.object({ - account_type: yup.string().required('Select an account type.'), + account_type: yup.string().required(translate({ message: 'Select an account type.' })), token_name: yup .string() - .required('Enter your token name.') + .required(translate({ message: 'Enter your token name.' })) .min(2, token_name_error_map.error_code_2) .max(32, token_name_error_map.error_code_2) .matches(/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9_ ]*$/, { diff --git a/src/features/dashboard/manage-apps/manage-apps.tsx b/src/features/dashboard/manage-apps/manage-apps.tsx index debb4268e..d7f042052 100644 --- a/src/features/dashboard/manage-apps/manage-apps.tsx +++ b/src/features/dashboard/manage-apps/manage-apps.tsx @@ -5,6 +5,7 @@ import TokenManagePage from '../manage-tokens/token-manage-page'; import CustomTabs from '@site/src/components/custom-tabs'; import './manage-apps.scss'; import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; +import { translate } from '@docusaurus/Translate'; const AppManagement = () => { const { getApps, apps, currentTab } = useAppManager(); @@ -15,11 +16,11 @@ const AppManagement = () => { const tabs = [ { - label: 'Applications', + label: translate({ message: 'Applications' }), content: , }, { - label: 'API tokens', + label: translate({ message: 'API tokens' }), content: , }, ]; diff --git a/src/features/dashboard/manage-dashboard/index.tsx b/src/features/dashboard/manage-dashboard/index.tsx index 70adfea1a..f78d878e5 100644 --- a/src/features/dashboard/manage-dashboard/index.tsx +++ b/src/features/dashboard/manage-dashboard/index.tsx @@ -1,7 +1,11 @@ import React, { useCallback, useEffect, useState } from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import { translate } from '@docusaurus/Translate'; +import { ApplicationObject } from '@deriv/api-types'; import DashboardContainer from '../components/dashboard-container'; import AppRegister from '../components/app-register'; import { Breadcrumbs } from '@deriv-com/quill-ui'; +import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; import useAppManager from '@site/src/hooks/useAppManager'; import useApiToken from '@site/src/hooks/useApiToken'; import Spinner from '@site/src/components/Spinner'; @@ -9,11 +13,10 @@ import useWS from '@site/src/hooks/useWs'; import RegisterAppDialogError from '../components/dialogs/register-app-dialog-error'; import AppRegisterSuccessModal from '../components/app-register-success-modal'; import AppManagement from '../manage-apps'; -import './manage-dashboard.scss'; -import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; import UpdateApp from '../update-app'; -import { ApplicationObject } from '@deriv/api-types'; import TokenRegister from '../components/token-register'; +import './manage-dashboard.scss'; + const ManageDashboard = () => { const { @@ -27,6 +30,21 @@ const ManageDashboard = () => { const { tokens } = useApiToken(); const { send: registerApp, error, clear, data, is_loading } = useWS('app_register'); const [created_app_data, setCreatedAppData] = useState({}); + const { + i18n: { currentLocale }, + } = useDocusaurusContext(); + + const locale_Links = React.useMemo(() => { + const is_en = currentLocale === 'en'; + const get_url = (path: string) => { + const pathInfo = `${!is_en ? `/${currentLocale}` : ''}/${path}`; + return pathInfo; + }; + return { + root: get_url(''), + dashboard: get_url('dashboard'), + }; + }, [currentLocale]); useEffect(() => { if (!is_loading && data?.name && !error) { @@ -91,24 +109,24 @@ const ManageDashboard = () => { }; const commonLinks = [ - { content: 'Home', href: '/', target: '_self' }, - { content: 'Dashboard', href: '/dashboard', target: '_self' }, + { content: translate({ message: 'Home' }), href: locale_Links.root, target: '_self' }, + { content: translate({ message: 'Dashboard' }), href: locale_Links.dashboard, target: '_self' }, ]; const tabSecndryLinks = { [TDashboardTab.REGISTER_APP]: { - content: 'Register application', - href: '/dashboard', + content: translate({ message: 'Register application' }), + href: locale_Links.dashboard, target: '_self', }, [TDashboardTab.UPDATE_APP]: { - content: 'Edit application', - href: '/dashboard', + content: translate({ message: 'Edit application' }), + href: locale_Links.dashboard, target: '_self', }, [TDashboardTab.REGISTER_TOKENS]: { - content: 'Create token', - href: '/dashboard', + content: translate({ message: 'Create token' }), + href: locale_Links.dashboard, target: '_self', }, }; diff --git a/src/features/dashboard/types.ts b/src/features/dashboard/types.ts index 60735ade1..e07a0edfe 100644 --- a/src/features/dashboard/types.ts +++ b/src/features/dashboard/types.ts @@ -7,7 +7,11 @@ const urlRegex = /^[a-z][a-z0-9.+-]*:\/\/[0-9a-zA-Z.-]+[%/\w .-]*$/; const base_schema = { name: yup .string() - .required('Enter your app name.') + .required( + translate({ + message: 'Enter your app name.', + }), + ) .max(48, app_name_error_map.error_code_2) .matches(/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9_ ]*$/, { message: app_name_error_map.error_code_1, @@ -58,10 +62,24 @@ const base_schema = { app_markup_percentage: yup .number() .required() - .min(0, 'Your markup value must be equal to or above 0.00') - .max(3, 'Your markup value must be no more than 3.00.') - .test('is-decimal', 'Your markup value cannot be more than 4 characters.', (value) => - value ? /^\d+(\.\d{1,2})?$/.test(value.toString()) : true, + .min( + 0, + translate({ + message: 'Your markup value must be equal to or above 0.00', + }), + ) + .max( + 3, + translate({ + message: 'Your markup value must be no more than 3.00.', + }), + ) + .test( + 'is-decimal', + translate({ + message: 'Your markup value cannot be more than 4 characters.', + }), + (value) => (value ? /^\d+(\.\d{1,2})?$/.test(value.toString()) : true), ), app_id: yup.number(), }; diff --git a/src/features/dashboard/update-app/AppUpdateForm/index.tsx b/src/features/dashboard/update-app/AppUpdateForm/index.tsx index 18aefde88..66bc58a46 100644 --- a/src/features/dashboard/update-app/AppUpdateForm/index.tsx +++ b/src/features/dashboard/update-app/AppUpdateForm/index.tsx @@ -1,14 +1,15 @@ import React, { useState } from 'react'; import { FormProvider, useForm } from 'react-hook-form'; import { yupResolver } from '@hookform/resolvers/yup'; -import { appEditSchema, IRegisterAppForm } from '../../types'; -import CustomCheckbox from '@site/src/components/CustomCheckbox'; import { Button, Heading, Text, TextField, SectionMessage, Modal } from '@deriv-com/quill-ui'; import { Restrictions } from '../../components/app-register/app-register'; -import StepperTextField from '../../components/stepper-text-field'; -import useDeviceType from '@site/src/hooks/useDeviceType'; import { StandaloneCircleExclamationRegularIcon } from '@deriv/quill-icons'; +import Translate, { translate } from '@docusaurus/Translate'; +import useDeviceType from '@site/src/hooks/useDeviceType'; +import CustomCheckbox from '@site/src/components/CustomCheckbox'; import useDisableScroll from '../../hooks/useDisableScroll'; +import StepperTextField from '../../components/stepper-text-field'; +import { appEditSchema, IRegisterAppForm } from '../../types'; import './app-update-form.scss'; type TAppFormProps = { @@ -80,15 +81,17 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm
- App’s name + + App’s name + - Enter the name of the application you want to register: + Enter the name of the application you want to register: - Markup + + Markup + - Add a markup to the price of each trade to help you earn a commission. Enter your markup - percentage below. Learn more about markup calculations in our detailed{' '} - . + + Add a markup to the price of each trade to help you earn a commission. Enter your + markup percentage below. Learn more about markup calculations in our detailed + {' '} + + . {errors.app_markup_percentage?.message} )} - OAuth settings + + OAuth settings + - Log in to your app using your Deriv account without an API token. With OAuth, - third-party applications can securely authorise access without requiring password - sharing, enhancing both security and user control. + + Log in to your app using your Deriv account without an API token. With OAuth, + third-party applications can securely authorise access without requiring password + sharing, enhancing both security and user control. + -
  • Use OAuth if your application requires other users to sign in.
  • -
  • Authorisation URL is mandatory to enable OAuth on your app.
  • +
  • + + Use OAuth if your application requires other users to sign in. + +
  • +
  • + Authorisation URL is mandatory to enable OAuth on your app. +
  • } size='md' @@ -160,17 +183,21 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm className='mblk' />
    - URL Configuration + + URL Configuration + - To set up OAuth for your app, specify the URL where users should be redirected after - authorisation. + + To set up OAuth for your app, specify the URL where users should be redirected after + authorisation. + - If your app includes verification logic, enter the email verification URL below (e.g. - for account opening, verification, and password reset): + + If your app includes verification logic, enter the email verification URL below + (e.g. for account opening, verification, and password reset): + - If provided, the verification URL will be appended with a token and sent to the - user's email. Otherwise, the authorisation URL with the token will be used. + + If provided, the verification URL will be appended with a token and sent to the + user's email. Otherwise, the authorisation URL with the token will be used. +
    - Scopes of authorisation + + Scopes of authorisation + - Select the scope for your app: + Select the scope for your app:
    @@ -217,7 +250,13 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm @@ -226,8 +265,14 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm @@ -240,8 +285,14 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm > @@ -254,8 +305,14 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm > @@ -271,15 +328,22 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm >
    @@ -311,8 +379,12 @@ const AppUpdateForm = ({ initialValues, submit, onCancel, is_loading }: TAppForm
    - Enable admin access for your app? + + Enable admin access for your app? + - For better security, enable admin access only when it's necessary. This approach - limits access to client activities, minimising risks and safeguarding both workflow - efficiency and client trust. + + For better security, enable admin access only when it's necessary. This approach + limits access to client activities, minimising risks and safeguarding both workflow + efficiency and client trust. +
    diff --git a/src/features/dashboard/update-app/index.tsx b/src/features/dashboard/update-app/index.tsx index a835e0fdc..41e7c0551 100644 --- a/src/features/dashboard/update-app/index.tsx +++ b/src/features/dashboard/update-app/index.tsx @@ -5,7 +5,7 @@ import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.contex import { IRegisterAppForm } from '../types'; import { scopesObjectToArray } from '@site/src/utils'; import useWS from '@site/src/hooks/useWs'; -import { RegisterAppDialogError } from '../components/dialogs/register-app-dialog-error'; +import RegisterAppDialogError from '../components/dialogs/register-app-dialog-error'; export default function UpdateApp() { const { current_updating_item, updateCurrentTab } = useAppManager(); diff --git a/src/styles/index.scss b/src/styles/index.scss index d7b6bc7da..657b8f344 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -302,7 +302,6 @@ div[class*='sidebarViewport'] { } &__inner { @media screen and (min-width: 1440px) { - gap: rem(14); margin: auto; } diff --git a/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx b/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx index 99cf26f3e..31d551a80 100644 --- a/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +++ b/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx @@ -14,6 +14,7 @@ import { import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import { useLocation } from '@docusaurus/router'; import classnames from 'classnames'; +import Translate from '@docusaurus/Translate'; export function useNavbarItems() { return useThemeConfig().navbar.items; @@ -61,7 +62,7 @@ const SidebarBottomAction: React.FC = ({ mobileSidebar }) => {
    {!is_logged_in ? ( ) : ( )}