Skip to content

đŸ”„ The free & Open Source DocuSign alternative

feat: apply multisupport language for all type alert, buttons and tour-messages

RaktimaNXGd546d5d0a736
diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json
index f85308bc1..0beaea5a5 100644
--- a/apps/OpenSign/public/locales/en/translation.json
+++ b/apps/OpenSign/public/locales/en/translation.json
@@ -14,7 +14,18 @@
"tagline":"Tagline ",
"has-requested-you-to-sign":"has requested you to sign",
"has-requested-you-to-review-and-sign":" has requested you to review and sign",
- "ascending":"Ascending",
+ "sort-order" :{
+ "Ascending":"Ascending",
+ "Descending":"Descending",
+ "Name":"Name",
+ "Date":"Date"
+ },
+ "context-menu": {
+ "Download": "Download",
+ "Rename": "Rename",
+ "Move": "Move",
+ "Delete": "Delete"
+ },
"action":"Action",
"add":"Add",
"add-new-folder":"ajouter un nouveau dossier",
@@ -45,6 +56,7 @@
"password-special-char":" Password should contain special character",
"agreee":"I agree to the",
"term":"Terms of Service",
+ "subscribe-to-opensign":"Subscribe to OpenSign newsletter",
"register":"Register",
"sidebar": {
"Dashboard": "Dashboard",
@@ -399,7 +411,131 @@
"decline-alert-3":"You can not sign this document as it has been declined/revoked.",
"sign here":"Sign here",
"guest-email-alert" :"verification code is sent to your email",
- "get-otp-alert" :"you will get a OTP via Email"
+ "get-otp-alert" :"you will get a OTP via Email",
+ "user-already-exist":"User already exist.",
+ "server-error":"Internal server error !",
+ "fill-required-details!":"Please fill required details!",
+ "sign-up-form":"Sign up form",
+ "sign-up":"Sign up",
+ "folder-already-exist!":"folder already exist!",
+ "please-select-position!":"please select position!",
+ "default-sign-alert":"Are you sure you want to auto sign at requested all locations?",
+ "Your-Signature":"Your Signature",
+ "auto-sign-all" :"Auto Sign All",
+ "generating-certificate":"Generating certificate",
+ "pdf-download":"PDF Download",
+ "generate-certificate-alert" :" Your completion certificate is being generated. Please wait momentarily. If the download doesn't start shortly, click the button again.",
+ "folder-already-exist" :"Folder already exist!" ,
+ "folder-created-successfully":"Folder created successfully!",
+ "fill-folder-name" :"Please fill folder name" ,
+ "already-exists-this-username" :"User already exists with this username!",
+ "verification-code-sent":"Verification mail has been sent to your E-mail!",
+ "registered-user-successfully":"Registered user successfully.",
+ "role-not-found":"Role not found.",
+ "do-not-access" :"You don't have access, please contact the admin.",
+ "add-admin":"Add admin",
+ "opensign-setup" :"Opensign Setup",
+ "join-discord" :"Join our discord server",
+ "admin-already-exist":"Admin already exist.",
+ "password-update-alert-1":"Password updated successfully.",
+ "password-update-alert-2":"Your current password is missing or incorrect.",
+ "password-update-alert-3" :"Your current password is missing or incorrect.",
+ "password-update-alert-4" :"Your password and confirmation password do not match.",
+ "current-password":" Current Password" ,
+ "new-password":"New Password",
+ "confirm-password":"Confirm Password",
+ "file-alert-1" :"The selected file size is too large. Please select a file less than",
+ "file-alert-2" :"Please select file.",
+ "file-alert-3" :"Please wait while the document is being uploaded.",
+ "enter-pdf-password" :"Enter Pdf Password",
+ "correct-password" :"Please provide correct password",
+ "decrypting-pdf" :" Decrypting pdf please wait...",
+ "invalid-otp":"Invalid Otp",
+ "user-not-found":"User not found!",
+ "enter-otp-alert" :"Please Enter OTP!",
+ "get-verification-code":"Get verification code",
+ "get-verification-code-2" :"You will get a verification code via Email",
+ "enter-verification-code":"Enter Verification Code",
+ "provide-your-details" :"Provide your details",
+ "provide-email":"Please provide email.",
+ "additional-info" :"Additional Info",
+ "signature-saved-alert":"Signature saved successfully.",
+ "fill-field" :"Please fill out this field",
+ "error-template" :"Error: Template not found!",
+ "invalid-document" :"Error: invalid document!",
+ "document-not-found" :"Document not Found!",
+ "document-signed-alert-1" :"You have successfully signed the document. You can download or print a copy of the partially signed document. A copy of the digitally signed document will be sent to the owner over email once it is signed by all signers.",
+ "encrypted-pdf-not-support" :"Currently encrypted pdf files are not supported.",
+ "document-signed-alert-4" :" Congratulations! 🎉 This document has been successfully signed by all participants!",
+ "document-signed-alert-5" :"This document has been signed by all Signers.",
+ "document-signed-alert-6" : "This document has been declined by one or more recipient(s).",
+ "document-signed-alert-7" :"This Document is no longer available.",
+ "document-signed-alert-8" :"The document has already been dispatched for signing.",
+ "yet-to-sign":"Yet to sign",
+ "validation-alert-1" :"The input does not meet the criteria set by the regular expression.",
+ "account-already-exists" :"Account already exists!",
+ "choose-password":"Choose Password",
+ "enter-password":"Enter Password",
+ "sure":"sure",
+ "subscribed-alert" :"You have already subscribed to plan!",
+ "monthly" :"Monthly",
+ "yearly-upto" :"Yearly (upto 66% off)",
+ "billed-yearly":"Billed Yearly",
+ "billed-monthly": "Billed Monthly",
+ "plansubscription-1" :"Host it yourself for free",
+ "visit-github":"Visit Github",
+ "user-already-exist-name" :"User already exists with this username!",
+ "do-not-access-contact-admin" : "You don't have access, please contact the admin.",
+ "filed-required-correctly" :"Please fill required details correctly.",
+ "admin-created":"Admin created",
+ "invalid-masterkey" :"Invalid masterkey",
+ "opensign-Setup" :"Opensign Setup",
+ "master-key":" Master key",
+ "profile-update-alert" :"Profile updated successfully.",
+ "date":"Date",
+ "tour-mssg":{
+ "home-layout-1":"You have logged in successfully! Let's take a look.",
+ "home-layout-2":"To upload documents for self-signing or to request others’ signatures, simply select the respective buttons.",
+ "home-layout-3":"You are ready to start using OpenSign! If you need support feel free to contact us.",
+ "generate-token":"Upgrade now to generate API token",
+ "opensign-drive-1":"Click on the breadcrumb links to easily navigate through the folder hierarchy and view the documents within each folder.",
+ "opensign-drive-2":"Click the add button to create a new folder or document.",
+ "opensign-drive-3":"Sort your documents by Date or Name using this menu.",
+ "opensign-drive-4":"Click on this menu to display the documents in list view.",
+ "opensign-drive-5":"The document list is displayed according to the selected sorting option. Icons next to each document indicate its current status.",
+ "opensign-drive-6":"Right-click on a document to see options such as Download, Rename, Move, and Delete. Click on the document to open it.",
+ "opensign-drive-7":"Right-click on any folder to see options. Choose ‘Rename’ to change the folder’s name or click on the folder to navigate through its contents.",
+ "pdf-request-file-1":"List of signers who still need to sign the document .",
+ "pdf-request-file-2":"Click any of the placeholders appearing on the document to sign. You will then see options to draw your signature, type it, or upload an image .",
+ "pdf-request-file-3":"Click the Back, Decline, or Finish buttons to navigate your document. Use the ellipsis menu for additional options, including the Download button .",
+ "pdf-request-file-4":"List of signers who have already signed the document .",
+ "pdf-request-file-5":"You can click 'Auto Sign All' to automatically sign at all the locations meant to be signed by you. Make sure that you review the document properly before you click this button .",
+ "placeholder-sign-1":"Select a recipient from this list to add a place-holder where he is supposed to sign.The placeholder will appear in the same colour as the recipient name once you drop it on the document.",
+ "placeholder-sign-2":"Clicking 'Add recipients' button will allow you to add more signers.",
+ "placeholder-sign-3":"Drag or click on a field to add it to the document.",
+ "placeholder-sign-4":"The PDF content area already displays the template's existing placeholders. For your convenience, these placeholders will match the color of the recipient's name, making them easily identifiable.",
+ "placeholder-sign-5":"Clicking 'Send' will save the document. In the next step you can customize the emails to be sent out to the recipients or copy the signing links and share those with the recipients yourself.",
+ "report-1":"Click the 'Add' button to create a new template. Templates are reusable documents designed to quickly generate new documents with the same structure and varying signers. For example, an HR template for onboarding could have predefined roles like ‘HR Manager’ and ‘New Employee’. Each time you use the template, you can assign the ‘New Employee’ role to different incoming staff members, while the ‘HR Manager’ role remains constant, facilitating a seamless onboarding process for each recruit. ",
+ "signyour-self-1":"Select and drag your preferred widgets onto the PDF to customize your document before signing. Choose the perfect spots for each modification to tailor the document to your needs.",
+ "signyour-self-2":"Drag and drop anywhere in this area. You can resize and move it later.",
+ "template-placeholder-1":"Clicking 'Add role' button will allow you to add various signer roles. You can attach users to each role in subsequent steps.",
+ "template-placeholder-2":"Once roles are added, select a role from list to add a place-holder where he is supposed to sign. The placeholder will appear in the same colour as the role name once you drop it on the document.",
+ "template-placeholder-3":"Drag or click on a field to add it to the document.",
+ "template-placeholder-4":"Drag the placeholder for a role anywhere on the document.Remember, it will appear in the same colour as the name of the recipient for easy reference.",
+ "template-placeholder-5":"Clicking 'Next' will store the current template. After saving, you’ll be prompted to create a new document from this template if you wish.",
+ "webhook-1":"Upgrade now to set webhook"
+
+
+ }
+
+
+
+
+
+
+
+
+
}
\ No newline at end of file
diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json
index 8405706c7..dd5c130e0 100644
--- a/apps/OpenSign/public/locales/fr/translation.json
+++ b/apps/OpenSign/public/locales/fr/translation.json
@@ -14,7 +14,18 @@
"tagline":"Slogan",
"has-requested-you-to-sign":" vous a demandé de signer",
"has-requested-you-to-review-and-sign":"vous a demandé de consulter et de signer",
- "ascending":"Ascendant",
+ "sort-order" :{
+ "Ascending":"Ascendant",
+ "Descending":"Descendant",
+ "Name":"Nom",
+ "Date":"Date"
+ },
+ "context-menu": {
+ "Download": "Télécharger",
+ "Rename": "Renommer",
+ "Move": "Se déplacer",
+ "Delete": "Supprimer"
+ },
"action":"Action",
"add":"ajouter",
"add-new-folder":"ajouter un nouveau dossier",
@@ -45,6 +56,7 @@
"password-special-char":"Le mot de passe doit contenir un caractÚre spécial",
"agreee":"je suis d'accord avec le",
"term":"Conditions d'utilisation",
+ "subscribe-to-opensign":"Abonnez-vous Ă  la newsletter OpenSign",
"register" :"Registre",
"sidebar": {
"Dashboard": "Tableau de bord",
@@ -399,8 +411,125 @@
"decline-alert-3": "Vous ne pouvez pas signer ce document car il a été refusé/révoqué.",
"sign here":"Signer ici",
"guest-email-alert" :"le code de vérification a été envoyé sur votre e-mail",
- "get-otp-alert":"vous recevrez un mot de passe Ă  usage unique par e-mail"
-
+ "get-otp-alert":"vous recevrez un mot de passe Ă  usage unique par e-mail",
+ "user-already-exist" :"L'utilisateur existe déjà.",
+ "server-error":"Erreur interne du serveur !",
+ "fill-required-details!" :"Veuillez remplir les informations requises !",
+ "sign-up-form" :"Formulaire d'inscription",
+ "sign-up":"S'inscrire",
+ "folder-already-exist!" :"le dossier existe déjà !",
+ "please-select-position!" :"Veuillez sélectionner un poste !",
+ "default-sign-alert" :"Êtes-vous sĂ»r de vouloir vous connecter automatiquement Ă  tous les emplacements demandĂ©s ? ",
+ "Your-Signature":"Votre signature",
+ "auto-sign-all" :"Tout signer automatiquement",
+ "generating-certificate":"Génération du certificat",
+ "pdf-download" :"Téléchargement PDF",
+ "generate-certificate-alert" :" Votre certificat d'achÚvement est en cours de génération. Veuillez patienter quelques instants. Si le téléchargement ne démarre pas sous peu, cliquez à nouveau sur le bouton. ",
+ "folder-already-exist":"Le dossier existe déjà !",
+ "folder-created-successfully":"Dossier créé avec succÚs !",
+ "fill-folder-name":"Veuillez indiquer le nom du dossier",
+ "already-exists-this-username":"Un utilisateur existe déjà avec ce nom d'utilisateur !",
+ "verification-code-sent" :"Un e-mail de vérification a été envoyé à votre adresse e-mail !",
+ "registered-user-successfully" :"Utilisateur enregistré avec succÚs.",
+ "role-not-found" :"RĂŽle introuvable.",
+ "do-not-access" :"Vous n'y avez pas accĂšs, veuillez contacter l'administrateur.",
+ "add-admin" :"Ajouter un administrateur",
+ "opensign-setup" :"Configuration d'Opensign",
+ "join-discord" :"Rejoignez notre serveur Discord",
+ "admin-already-exist":"L'administrateur existe déjà.",
+ "password-update-alert-1" :"Mot de passe mis Ă  jour avec succĂšs.",
+ "password-update-alert-2" :"Votre mot de passe actuel est manquant ou incorrect.",
+ "password-update-alert-3" :"Votre mot de passe actuel est manquant ou incorrect.",
+ "password-update-alert-4" :"Votre mot de passe et votre mot de passe de confirmation ne correspondent pas.",
+ "current-password":"Current Password",
+ "new-password" :"nouveau mot de passe",
+ "confirm-password":"Confirmez le mot de passe",
+ "file-alert-1":"La taille du fichier sélectionné est trop grande. Veuillez sélectionner un fichier inférieur à",
+ "file-alert-2" :"Veuillez sélectionner un fichier.",
+ "file-alert-3" :"Veuillez patienter pendant le téléchargement du document." ,
+ "enter-pdf-password" :"Entrez le mot de passe PDF" ,
+ "correct-password" :"Veuillez fournir un mot de passe correct",
+ "decrypting-pdf" :"Décryptage du pdf, veuillez patienter...",
+ "invalid-otp" :"OTP invalide",
+ "user-not-found" :"Utilisateur non trouvé!",
+ "enter-otp-alert" :"Veuillez saisir OTP !",
+ "get-verification-code" :"Obtenir le code de vérification",
+ "get-verification-code-2" :"Vous recevrez un code de vérification par e-mail",
+ "enter-verification-code" :"Entrez le code de vérification",
+ "provide-your-details" :"Fournissez vos coordonnées",
+ "provide-email" :"Veuillez fournir un e-mail.",
+ "additional-info" :"Information additionnelle",
+ "signature-saved-alert" :"Signature enregistrée avec succÚs.",
+ "fill-field":"Veuillez remplir ce champ",
+ "error-template":"Erreur : modĂšle introuvable ! ",
+ "invalid-document" :"Erreur : document invalide !",
+ "document-not-found" :"Document introuvable !",
+ "document-signed-alert-1" :"Vous avez signé le document avec succÚs. Vous pouvez télécharger ou imprimer une copie du document partiellement signé. Une copie du document signé numériquement sera envoyée au propriétaire par e-mail une fois qu'il sera signé par tous les signataires.",
+ "encrypted-pdf-not-support" :"Les fichiers PDF actuellement cryptés ne sont pas pris en charge. ",
+ "document-signed-alert-4" :"Toutes nos fĂ©licitations! 🎉 Ce document a Ă©tĂ© signĂ© avec succĂšs par tous les participants !",
+ "document-signed-alert-5" :"Ce document a été signé par tous les signataires.",
+ "document-signed-alert-6" :"Ce document a été refusé par un ou plusieurs destinataire(s).",
+ "document-signed-alert-7" : "Ce document n'est plus disponible.",
+ "document-signed-alert-8":"Le document a déjà été envoyé pour signature.",
+ "yet-to-sign" :"Reste Ă  signer",
+ "validation-alert-1" :"L'entrée ne répond pas aux critÚres définis par l'expression réguliÚre.",
+ "account-already-exists" :"Le compte existe déjà!",
+ "choose-password" :"Choisissez un mot de passe",
+ "enter-password" :"Entrer le mot de passe",
+ "sure" :"bien sûr",
+ "subscribed-alert":"Vous ĂȘtes dĂ©jĂ  abonnĂ© au forfait !",
+ "monthly" :"Mensuel",
+ "yearly-upto" :"Annuel (jusqu'à 66 % de réduction)",
+ "billed-yearly" :"Facturé annuellement",
+ "billed-monthly" :"Facturé mensuellement",
+ "plansubscription-1" :"HĂ©bergez-le vous-mĂȘme gratuitement",
+ "visit-github" :"Visitez Github",
+ "user-already-exist-name" :"Un utilisateur existe déjà avec ce nom d'utilisateur !",
+ "do-not-access-contact-admin" :"Vous n'y avez pas accĂšs, veuillez contacter l'administrateur.",
+ "filed-required-correctly" :"Veuillez remplir correctement les informations requises.",
+ "admin-created" :"Administrateur créé",
+ "invalid-masterkey":"Clé principale invalide",
+ "opensign-Setup" :"Configuration d'Opensign",
+ "master-key" :"La clef maitresse",
+ "profile-update-alert" :"Mise à jour du profil réussie.",
+ "date":"Date",
+ "tour-mssg":{
+ "home-layout-1":"Vous vous ĂȘtes connectĂ© avec succĂšs ! Jetons un coup d'oeil.",
+ "home-layout-2": "Pour télécharger des documents à auto-signature ou pour demander la signature d'autres personnes, sélectionnez simplement les boutons correspondants.",
+ "home-layout-3": "Vous ĂȘtes prĂȘt Ă  commencer Ă  utiliser OpenSign ! Si vous avez besoin d'aide, n'hĂ©sitez pas Ă  nous contacter.",
+ "generate-token": "Mettez à niveau maintenant pour générer un jeton API",
+ "opensign-drive-1": "Cliquez sur les liens du fil d'Ariane pour naviguer facilement dans la hiérarchie des dossiers et afficher les documents dans chaque dossier.",
+ "opensign-drive-2": "Cliquez sur le bouton Ajouter pour créer un nouveau dossier ou document.",
+ "opensign-drive-3": "Triez vos documents par date ou par nom Ă  l'aide de ce menu.",
+ "opensign-drive-4": "Cliquez sur ce menu pour afficher les documents sous forme de liste.",
+ "opensign-drive-5": "La liste des documents s'affiche selon l'option de tri sélectionnée. Les icÎnes à cÎté de chaque document indiquent son état actuel.",
+ "opensign-drive-6": "Faites un clic droit sur un document pour voir les options telles que Télécharger, Renommer, Déplacer et Supprimer. Cliquez sur le document pour l'ouvrir.",
+ "opensign-drive-7": "Faites un clic droit sur n'importe quel dossier pour voir les options. Choisissez 'Renommer' pour changer le nom du dossier ou cliquez sur le dossier pour naviguer dans son contenu.",
+ "pdf-request-file-1":"Liste des signataires qui doivent encore signer le document.",
+ "pdf-request-file-2": "Cliquez sur l'un des espaces réservés apparaissant sur le document pour signer. Vous verrez alors des options pour dessiner votre signature, la saisir ou télécharger une image.",
+ "pdf-request-file-3": "Cliquez sur les boutons Précédent, Refuser ou Terminer pour parcourir votre document. Utilisez le menu points de suspension pour des options supplémentaires, notamment le bouton Télécharger.",
+ "pdf-request-file-4":"Liste des signataires ayant déjà signé le document.",
+ "pdf-request-file-5":"Vous pouvez cliquer sur 'Signer automatiquement tout' pour signer automatiquement Ă  tous les emplacements que vous ĂȘtes censĂ© signer. Assurez-vous de lire correctement le document avant de cliquer sur ce bouton.",
+ "placeholder-sign-1": "SĂ©lectionnez un destinataire dans cette liste pour ajouter un espace rĂ©servĂ© Ă  l'endroit oĂč il est censĂ© signer. L'espace rĂ©servĂ© apparaĂźtra de la mĂȘme couleur que le nom du destinataire une fois que vous le dĂ©poserez sur le document.",
+ "placeholder-sign-2":"Cliquer sur le bouton 'Ajouter des destinataires' vous permettra d'ajouter plus de signataires.",
+ "placeholder-sign-3":"Faites glisser ou cliquez sur un champ pour l'ajouter au document.",
+ "placeholder-sign-4":"La zone de contenu PDF affiche déjà les espaces réservés existants du modÚle. Pour votre commodité, ces espaces réservés correspondront à la couleur du nom du destinataire, ce qui les rendra facilement identifiables.",
+ "placeholder-sign-5":"Cliquer sur 'Envoyer' enregistrera le document. À l'Ă©tape suivante, vous pourrez personnaliser les e-mails Ă  envoyer aux destinataires ou copier les liens de signature et les partager vous-mĂȘme avec les destinataires.",
+ "report-1":"Cliquez sur le bouton 'Ajouter' pour crĂ©er un nouveau modĂšle. Les modĂšles sont des documents rĂ©utilisables conçus pour gĂ©nĂ©rer rapidement de nouveaux documents avec la mĂȘme structure et diffĂ©rents signataires. Par exemple, un modĂšle RH pour l'intĂ©gration peut avoir des rĂŽles prĂ©dĂ©finis tels que 'Responsable RH' et ' Nouvel employĂ©'. Chaque fois que vous utilisez le modĂšle, vous pouvez attribuer le rĂŽle 'Nouvel employĂ©' Ă  diffĂ©rents membres du personnel entrants, tandis que le rĂŽle 'Responsable RH' reste constant, facilitant ainsi un processus d'intĂ©gration fluide pour chaque recrue",
+ "signyour-self-1": "Sélectionnez et faites glisser vos widgets préférés sur le PDF pour personnaliser votre document avant de le signer. Choisissez les endroits parfaits pour chaque modification afin d'adapter le document à vos besoins.",
+ "signyour-self-2":"Faites glisser et dĂ©poser n'importe oĂč dans cette zone. Vous pourrez la redimensionner et la dĂ©placer plus tard.",
+ "template-placeholder-1":"Cliquer sur le bouton 'Ajouter un rÎle' vous permettra d'ajouter différents rÎles de signataire. Vous pourrez attacher des utilisateurs à chaque rÎle dans les étapes suivantes.",
+ "template-placeholder-2": "Une fois les rĂŽles ajoutĂ©s, sĂ©lectionnez un rĂŽle dans la liste pour ajouter un espace rĂ©servĂ© Ă  l'endroit oĂč il est censĂ© signer. L'espace rĂ©servĂ© apparaĂźtra dans la mĂȘme couleur que le nom du rĂŽle une fois que vous l'aurez dĂ©posĂ© sur le document.",
+ "template-placeholder-3":"Faites glisser ou cliquez sur un champ pour l'ajouter au document.",
+ "template-placeholder-4":"Faites glisser l'espace rĂ©servĂ© pour un rĂŽle n'importe oĂč sur le document. N'oubliez pas qu'il apparaĂźtra dans la mĂȘme couleur que le nom du destinataire pour une rĂ©fĂ©rence facile.",
+ "template-placeholder-5":"Cliquer sur 'Suivant' stockera le modÚle actuel. AprÚs l'enregistrement, vous serez invité à créer un nouveau document à partir de ce modÚle si vous le souhaitez.",
+ "webhook-1":"Mettez à niveau maintenant pour définir le webhook"
+
+
+ }
+
+
+
diff --git a/apps/OpenSign/src/components/AddUser.js b/apps/OpenSign/src/components/AddUser.js
index 68ff280cf..b8b2bcdee 100644
--- a/apps/OpenSign/src/components/AddUser.js
+++ b/apps/OpenSign/src/components/AddUser.js
@@ -70,7 +70,7 @@ const AddUser = (props) => {
setIsLoader(true);
const res = await checkUserExist();
if (res) {
- props.setIsAlert({ type: "danger", msg: "User already exist." });
+ props.setIsAlert({ type: "danger", msg: t("user-already-exist") });
setIsLoader(false);
setTimeout(() => {
props.setIsAlert({ type: "success", msg: "" });
@@ -217,7 +217,10 @@ const AddUser = (props) => {
} catch (err) {
console.log("err", err);
setIsLoader(false);
- props.setIsAlert({ type: "danger", msg: "something went wrong." });
+ props.setIsAlert({
+ type: "danger",
+ msg: t("something-went-wrong-mssg")
+ });
} finally {
setTimeout(() => props.setIsAlert({ type: "success", msg: "" }), 1500);
}
@@ -243,7 +246,7 @@ const AddUser = (props) => {
const copytoclipboard = (text) => {
copytoData(text);
- props.setIsAlert({ type: "success", msg: "Copied" });
+ props.setIsAlert({ type: "success", msg: t("copied") });
setTimeout(() => props.setIsAlert({ type: "success", msg: "" }), 1500); // Reset copied state after 1.5 seconds
};
return (
diff --git a/apps/OpenSign/src/components/LoginFacebook.js b/apps/OpenSign/src/components/LoginFacebook.js
index 7b3e2aa92..edfe43dc7 100644
--- a/apps/OpenSign/src/components/LoginFacebook.js
+++ b/apps/OpenSign/src/components/LoginFacebook.js
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import Parse from "parse";
import Loader from "../primitives/Loader";
+import { useTranslation } from "react-i18next";
// import FacebookLogin from "react-facebook-login";
const LoginFacebook = ({
@@ -9,6 +10,7 @@ const LoginFacebook = ({
thirdpartyLoader,
setThirdpartyLoader
}) => {
+ const { t } = useTranslation();
const [isModal, setIsModal] = useState(false);
const [userDetails, setUserDetails] = useState({
Phone: "",
@@ -106,10 +108,10 @@ const LoginFacebook = ({
alert(userSignUp.message);
}
} else {
- alert("Internal server error !");
+ alert(t("server-error"));
}
} else {
- alert("Please fill required details!");
+ alert(t("fill-required-details!"));
}
};
return (
@@ -136,7 +138,7 @@ const LoginFacebook = ({
<div className="modal-dialog" role="document">
<div className="modal-content">
<div className="modal-header">
- <h5 className="modal-title">Sign up form</h5>
+ <h5 className="modal-title">{t("sign-up-form")}</h5>
<span>
<span></span>
</span>
@@ -145,7 +147,8 @@ const LoginFacebook = ({
<form>
<div className="form-group">
<label htmlFor="Phone" className="col-form-label">
- Phone <span className="text-[red] text-[13px]">*</span>
+ {t("phone")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
type="tel"
@@ -163,7 +166,8 @@ const LoginFacebook = ({
</div>
<div className="form-group">
<label htmlFor="Company" className="col-form-label">
- Company <span className="text-[red] text-[13px]">*</span>
+ {t("company")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
@@ -185,14 +189,14 @@ const LoginFacebook = ({
onClick={() => handleSubmitbtn()}
className="btn btn-info mr-[10px]"
>
- Sign up
+ {t("sign-up")}
</button>
<button
type="button"
className="btn btn-secondary w-[90px]"
onClick={() => setIsModal(false)}
>
- Cancel
+ {t("cancel")}
</button>
</div>
</form>
diff --git a/apps/OpenSign/src/components/LoginGoogle.js b/apps/OpenSign/src/components/LoginGoogle.js
index 08d027f52..5dbf2845e 100644
--- a/apps/OpenSign/src/components/LoginGoogle.js
+++ b/apps/OpenSign/src/components/LoginGoogle.js
@@ -4,7 +4,7 @@ import { jwtDecode } from "jwt-decode";
import { useScript } from "../hook/useScript";
import ModalUi from "../primitives/ModalUi";
import Loader from "../primitives/Loader";
-
+import { useTranslation } from "react-i18next";
/*
* `GoogleSignInBtn`as it's name indicates it render google sign in button
* and in this `useScript` in which we have created for generate google sign button
@@ -17,6 +17,7 @@ const GoogleSignInBtn = ({
thirdpartyLoader,
setThirdpartyLoader
}) => {
+ const { t } = useTranslation();
const [isModal, setIsModal] = useState(false);
const googleBtn = useRef();
const [userDetails, setUserDetails] = useState({
@@ -162,10 +163,10 @@ const GoogleSignInBtn = ({
payload &&
payload.message.replace(/ /g, "_") === "Internal_server_err"
) {
- alert("Internal server error !");
+ alert(t("server-error"));
}
} else {
- alert("Please fill required details!");
+ alert(t("fill-required-details!"));
}
};
const handleCloseModal = () => {
@@ -196,11 +197,11 @@ const GoogleSignInBtn = ({
</div>
)}
<div ref={googleBtn} className="text-sm"></div>
- <ModalUi showClose={false} isOpen={isModal} title="Sign up form">
+ <ModalUi showClose={false} isOpen={isModal} title={t("sign-up-form")}>
<form className="px-4 py-3 text-base-content">
<div className="mb-3">
<label htmlFor="Phone" className="block text-xs font-semibold">
- Phone <span className="text-[13px] text-[red]">*</span>
+ {t("phone")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="tel"
@@ -218,7 +219,7 @@ const GoogleSignInBtn = ({
</div>
<div className="mb-3">
<label htmlFor="Company" className="block text-xs font-semibold">
- Company <span className="text-[13px] text-[red]">*</span>
+ {t("company")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="text"
@@ -236,7 +237,7 @@ const GoogleSignInBtn = ({
</div>
<div className="mb-3">
<label htmlFor="JobTitle" className="block text-xs font-semibold">
- Job Title <span className="text-[13px] text-[red]">*</span>
+ {t("job-title")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="text"
@@ -258,14 +259,14 @@ const GoogleSignInBtn = ({
className="op-btn op-btn-primary"
onClick={() => handleSubmitbtn()}
>
- Sign up
+ {t("sign-up")}
</button>
<button
type="button"
className="op-btn op-btn-ghost"
onClick={handleCloseModal}
>
- Cancel
+ {t("cancel")}
</button>
</div>
</form>
diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js
index 68398be9c..02ef21a1d 100644
--- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js
+++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js
@@ -92,7 +92,7 @@ function DriveBody(props) {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
});
}
@@ -193,7 +193,7 @@ function DriveBody(props) {
console.log("Err ", err);
props.setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
});
};
@@ -260,7 +260,7 @@ function DriveBody(props) {
setIsOpenMoveModal(false);
} else {
- alert("folder already exist!");
+ alert(t("folder-already-exist!"));
setIsOpenMoveModal(false);
}
};
@@ -505,7 +505,9 @@ function DriveBody(props) {
className="ContextMenuItem"
>
<i className={menu.icon}></i>
- <span className="ml-[8px]">{menu.type}</span>
+ <span className="ml-[8px]">
+ {t(`context-menu${menu.type}`)}
+ </span>
</ContextMenu.Item>
);
})}
diff --git a/apps/OpenSign/src/components/pdf/DefaultSignature.js b/apps/OpenSign/src/components/pdf/DefaultSignature.js
index 4e4e0780a..3847b895b 100644
--- a/apps/OpenSign/src/components/pdf/DefaultSignature.js
+++ b/apps/OpenSign/src/components/pdf/DefaultSignature.js
@@ -1,16 +1,18 @@
import React from "react";
+import { useTranslation } from "react-i18next";
function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
+ const { t } = useTranslation();
+
const confirmToaddDefaultSign = () => {
if (xyPostion.length > 0) {
setDefaultSignAlert({
isShow: true,
- alertMessage:
- "Are you sure you want to auto sign at requested all locations?"
+ alertMessage: t("default-sign-alert")
});
} else {
setDefaultSignAlert({
isShow: true,
- alertMessage: "please select position!"
+ alertMessage: t("please-select-position!")
});
}
};
@@ -18,10 +20,10 @@ function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
return (
<div data-tut="reactourThird">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
- Signature
+ {t("signature")}
</div>
<div className="flex flex-col items-center mt-[10px] font-semibold">
- <p className="text-base-content">Your Signature</p>
+ <p className="text-base-content">{t("Your-Signature")}</p>
<div className="op-card shadow-md h-[111px] w-[90%] p-2">
<img
alt="signature"
@@ -34,7 +36,7 @@ function DefaultSignature({ defaultSignImg, xyPostion, setDefaultSignAlert }) {
className="op-btn op-btn-primary op-btn-sm mt-[10px]"
onClick={() => confirmToaddDefaultSign()}
>
- Auto Sign All
+ {t("auto-sign-all")}
</button>
</div>
</div>
diff --git a/apps/OpenSign/src/components/pdf/PdfHeader.js b/apps/OpenSign/src/components/pdf/PdfHeader.js
index b685b2cdd..1d1647ff4 100644
--- a/apps/OpenSign/src/components/pdf/PdfHeader.js
+++ b/apps/OpenSign/src/components/pdf/PdfHeader.js
@@ -164,7 +164,7 @@ function Header({
onClick={() => handleDeclinePdfAlert()}
className="text-[red] border-none font-[650] text-[14px] mr-2"
>
- Decline
+ {t("decline")}
</div>
)}
{isPlaceholder ? (
@@ -179,7 +179,7 @@ function Header({
} op-link no-underline font-[650] text-[14px]`}
data-tut="headerArea"
>
- {completeBtnTitle ? completeBtnTitle : "Send"}
+ {completeBtnTitle ? completeBtnTitle : t("send")}
</div>
) : (
<div
@@ -465,18 +465,14 @@ function Header({
isOpen={isDownloading === "certificate"}
title={
isDownloading === "certificate"
- ? "Generating certificate"
- : "PDF Download"
+ ? t("generating-certificate")
+ : t("pdf-download")
}
handleClose={() => setIsDownloading("")}
>
<div className="p-3 md:p-5 text-[13px] md:text-base text-center text-base-content">
{isDownloading === "certificate"}{" "}
- <p>
- Your completion certificate is being generated. Please wait
- momentarily. If the download doesn&apos;t start shortly, click the
- button again.
- </p>
+ <p>{t("generate-certificate-alert")}</p>
</div>
</ModalUi>
</div>
diff --git a/apps/OpenSign/src/components/shared/fields/CreateFolder.js b/apps/OpenSign/src/components/shared/fields/CreateFolder.js
index 20c253996..3f7448eab 100644
--- a/apps/OpenSign/src/components/shared/fields/CreateFolder.js
+++ b/apps/OpenSign/src/components/shared/fields/CreateFolder.js
@@ -62,7 +62,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
}
const templExist = await exsitQuery.first();
if (templExist) {
- setAlert({ type: "danger", message: "Folder already exist!" });
+ setAlert({ type: "danger", message: t("folder-already-exist") });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
@@ -87,7 +87,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
handleLoader(false);
setAlert({
type: "success",
- message: "Folder created successfully!"
+ message: t("folder-created-successfully")
});
setIsAlert(true);
setTimeout(() => {
@@ -100,7 +100,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
}
} else {
handleLoader(false);
- setAlert({ type: "info", message: "Please fill folder name" });
+ setAlert({ type: "info", message: t("fill-folder-name") });
setIsAlert(true);
setTimeout(() => {
setIsAlert(false);
diff --git a/apps/OpenSign/src/layout/HomeLayout.js b/apps/OpenSign/src/layout/HomeLayout.js
index 89f748c31..153c0dc26 100644
--- a/apps/OpenSign/src/layout/HomeLayout.js
+++ b/apps/OpenSign/src/layout/HomeLayout.js
@@ -14,8 +14,10 @@ import { useCookies } from "react-cookie";
import { fetchSubscription } from "../constant/Utils";
import Loader from "../primitives/Loader";
import { showHeader } from "../redux/reducers/showHeader";
+import { useTranslation } from "react-i18next";
const HomeLayout = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const location = useLocation();
const dispatch = useDispatch();
@@ -150,20 +152,20 @@ const HomeLayout = () => {
setTourConfigs([
{
selector: '[data-tut="reactourFirst"]',
- content: `You have logged in successfully! Let's take a look.`,
+ content: t("tour-mssg.home-layout-1"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
},
{
selector: '[data-tut="tourbutton"]',
- content: `To upload documents for self-signing or to request others’ signatures, simply select the respective buttons.`,
+ content: t("tour-mssg.home-layout-2"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
},
...resArr,
{
selector: '[data-tut="reactourLast"]',
- content: `You are ready to start using OpenSign! If you need support feel free to contact us.`,
+ content: t("tour-mssg.home-layout-3"),
position: "top"
// style: { backgroundColor: "#abd4d2" },
}
diff --git a/apps/OpenSign/src/pages/AddAdmin.js b/apps/OpenSign/src/pages/AddAdmin.js
index 7f65feadb..bba1da4b9 100644
--- a/apps/OpenSign/src/pages/AddAdmin.js
+++ b/apps/OpenSign/src/pages/AddAdmin.js
@@ -7,8 +7,10 @@ import { useDispatch } from "react-redux";
import { showTenant } from "../redux/reducers/ShowTenant";
import Loader from "../primitives/Loader";
import Title from "../components/Title";
+import { useTranslation } from "react-i18next";
const AddAdmin = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const dispatch = useDispatch();
const [showPassword, setShowPassword] = useState(false);
@@ -40,10 +42,10 @@ const AddAdmin = () => {
try {
const app = await getAppLogo();
if (app?.user === "exist") {
- setErrMsg("Admin already exist.");
+ setErrMsg(t("admin-already-exist"));
}
} catch (err) {
- setErrMsg("Something went wrong.");
+ setErrMsg(t("something-went-wrong-mssg"));
console.log("err in check user exist", err);
} finally {
setState((prev) => ({ ...prev, loading: false }));
@@ -124,7 +126,7 @@ const AddAdmin = () => {
const res = await Parse.Cloud.run("getUserDetails", params);
// console.log("Res ", res);
if (res) {
- alert("User already exists with this username!");
+ alert(t("already-exists-this-username"));
setState({ loading: false });
} else {
// console.log("state.email ", email);
@@ -132,7 +134,7 @@ const AddAdmin = () => {
await Parse.User.requestPasswordReset(email).then(
async function (res) {
if (res.data === undefined) {
- alert("Verification mail has been sent to your E-mail!");
+ alert(t("verification-code-sent"));
}
}
);
@@ -199,27 +201,27 @@ const AddAdmin = () => {
setState({
loading: false,
alertType: "success",
- alertMsg: "Registered user successfully."
+ alertMsg: t("registered-user-successfully")
});
navigate(`/${menu.pageType}/${menu.pageId}`);
} else {
setState({
loading: false,
alertType: "danger",
- alertMsg: "Role not found."
+ alertMsg: t("role-not-found")
});
}
} else {
setState({
loading: false,
alertType: "danger",
- alertMsg: "You don't have access, please contact the admin."
+ alertMsg: t("do-not-access")
});
}
}
} catch (error) {
console.log("error in fetch extuser", error);
- const msg = error.message || "Something went wrong.";
+ const msg = error.message || t("something-went-wrong-mssg");
setState({ loading: false, alertType: "danger", alertMsg: msg });
} finally {
setTimeout(() => setState({ loading: false, alertMsg: "" }), 2000);
@@ -249,7 +251,7 @@ const AddAdmin = () => {
};
return (
<div className="h-screen flex justify-center">
- <Title title={"Add admin"} />
+ <Title title={t("add-admin")} />
{state.loading ? (
<div className="text-[grey] flex justify-center items-center text-lg md:text-2xl">
<Loader />
@@ -265,7 +267,7 @@ const AddAdmin = () => {
<form onSubmit={handleSubmit}>
<div className="w-full my-4 op-card bg-base-100 shadow-md outline outline-1 outline-slate-300/50">
<h2 className="text-[30px] text-center mt-3 font-medium">
- Opensign Setup
+ {t("opensign-setup")}
</h2>
<NavLink
to="https://discord.com/invite/xe9TDuyAyj"
@@ -273,7 +275,7 @@ const AddAdmin = () => {
rel="noopener noreferrer"
className="text-center text-sm mt-1 text-[blue] cursor-pointer"
>
- Join our discord server
+ {t("join-discord")}
<i
aria-hidden="true"
className="fa-brands fa-discord ml-1"
@@ -282,7 +284,8 @@ const AddAdmin = () => {
</NavLink>
<div className="px-6 py-3 text-xs">
<label className="block ">
- Name <span className="text-[red] text-[13px]">*</span>
+ {t("name")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
@@ -293,7 +296,8 @@ const AddAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Email <span className="text-[red] text-[13px]">*</span>
+ {"email"}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
id="email"
@@ -305,7 +309,8 @@ const AddAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Phone <span className="text-[red] text-[13px]">*</span>
+ {t("phone")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
type="tel"
@@ -316,7 +321,8 @@ const AddAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Company <span className="text-[red] text-[13px]">*</span>
+ {t("company")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
type="text"
@@ -327,7 +333,7 @@ const AddAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Job Title{" "}
+ {t("job-title")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
@@ -339,7 +345,8 @@ const AddAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Password <span className="text-[red] text-[13px]">*</span>
+ {t("password")}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<div className="relative">
<input
@@ -368,24 +375,22 @@ const AddAdmin = () => {
lengthValid ? "text-green-600" : "text-red-600"
}`}
>
- {lengthValid ? "✓" : "✗"} Password should be 8
- characters long
+ {lengthValid ? "✓" : "✗"} {t("password-length")}
</p>
<p
className={`${
caseDigitValid ? "text-green-600" : "text-red-600"
}`}
>
- {caseDigitValid ? "✓" : "✗"} Password should contain
- uppercase letter, lowercase letter, digit
+ {caseDigitValid ? "✓" : "✗"} {t("password-case")}
</p>
<p
className={`${
specialCharValid ? "text-green-600" : "text-red-600"
}`}
>
- {specialCharValid ? "✓" : "✗"} Password should contain
- special character
+ {specialCharValid ? "✓" : "✗"}{" "}
+ {t("password-special-char")}
</p>
</div>
)}
@@ -402,7 +407,7 @@ const AddAdmin = () => {
className="text-xs cursor-pointer ml-1 mb-0"
htmlFor="termsandcondition"
>
- I agree to the
+ {t("agreee")}
</label>
<span
className="underline cursor-pointer ml-1"
@@ -412,7 +417,7 @@ const AddAdmin = () => {
)
}
>
- Terms of Service
+ {t("term")}
</span>
<span>.</span>
</div>
@@ -428,7 +433,7 @@ const AddAdmin = () => {
className="text-xs cursor-pointer ml-1 mb-0"
htmlFor="termsandcondition"
>
- Subscribe to OpenSign newsletter
+ {t("subscribe-to-opensign")}
</label>
</div>
</div>
@@ -438,7 +443,7 @@ const AddAdmin = () => {
className="op-btn op-btn-primary w-full"
disabled={state.loading}
>
- {state.loading ? "Loading..." : "Next"}
+ {state.loading ? t("loading") : t("next")}
</button>
</div>
</div>
diff --git a/apps/OpenSign/src/pages/ChangePassword.js b/apps/OpenSign/src/pages/ChangePassword.js
index 990fd8ed8..b78918a61 100644
--- a/apps/OpenSign/src/pages/ChangePassword.js
+++ b/apps/OpenSign/src/pages/ChangePassword.js
@@ -2,8 +2,10 @@ import React, { useState } from "react";
import Parse from "parse";
import { Navigate } from "react-router-dom";
import Title from "../components/Title";
+import { useTranslation } from "react-i18next";
function ChangePassword() {
+ const { t } = useTranslation();
const [currentpassword, setCurrentPassword] = useState("");
const [newpassword, setnewpassword] = useState("");
const [confirmpassword, setconfirmpassword] = useState("");
@@ -27,23 +29,23 @@ function ChangePassword() {
await Parse.User.become(_user.sessionToken);
localStorage.setItem("accesstoken", _user.sessionToken);
}
- alert("Password updated successfully.");
+ alert(t("password-update-alert-1"));
})
.catch((error) => {
console.log("err", error);
- alert("Something went wrong.");
+ alert(t("something-went-wrong-mssg"));
});
});
} else {
- alert("Your current password is missing or incorrect.");
+ alert(t("password-update-alert-2"));
}
})
.catch((error) => {
- alert("Your current password is missing or incorrect.");
+ alert(t("password-update-alert-3"));
console.error("Error while logging in user", error);
});
} else {
- alert("Your password and confirmation password do not match.");
+ alert(t("password-update-alert-4"));
}
} catch (error) {
console.log("err", error);
@@ -56,13 +58,13 @@ function ChangePassword() {
<div className="w-full bg-base-100 text-base-content shadow rounded-box p-2">
<Title title="Change Password" />
<div className="text-xl font-bold border-b-[1px] border-gray-300">
- Change Password
+ {t("change-password")}
</div>
<div className="m-2">
<form onSubmit={handleSubmit} className=" flex flex-col gap-y-2">
<div>
<label htmlFor="currentpassword" className="block text-xs ml-1">
- Current Password
+ {t("current-password")}
</label>
<input
type="password"
@@ -76,7 +78,7 @@ function ChangePassword() {
</div>
<div>
<label htmlFor="newpassword" className="text-xs block ml-1">
- New Password
+ {t("new-password")}
</label>
<input
type="password"
@@ -90,7 +92,7 @@ function ChangePassword() {
</div>
<div>
<label htmlFor="newpassword" className="text-xs block ml-1">
- Confirm Password
+ {t("confirm-password")}
</label>
<input
type="password"
@@ -106,7 +108,7 @@ function ChangePassword() {
type="submit"
className="op-btn op-btn-primary shadow-md mt-2"
>
- Change Password
+ {t("change-password")}
</button>
</form>
</div>
diff --git a/apps/OpenSign/src/pages/Form.js b/apps/OpenSign/src/pages/Form.js
index d06ba09a6..67b204b9b 100644
--- a/apps/OpenSign/src/pages/Form.js
+++ b/apps/OpenSign/src/pages/Form.js
@@ -111,9 +111,7 @@ const Forms = (props) => {
if (typeof files[0] !== "undefined") {
const mb = Math.round(files[0].size / Math.pow(1024, 2));
if (mb > maxFileSize) {
- alert(
- `The selected file size is too large. Please select a file less than ${maxFileSize} MB`
- );
+ alert(`${t("file-alert-1")} ${maxFileSize} MB`);
setFileUpload("");
e.target.value = "";
return;
@@ -294,7 +292,7 @@ const Forms = (props) => {
}
}
} else {
- alert("Please select file.");
+ alert(t("file-alert-2"));
return false;
}
} catch (error) {
@@ -346,9 +344,7 @@ const Forms = (props) => {
if (mb > maxFileSize) {
setTimeout(() => {
- alert(
- `The selected file size is too large. Please select a file less than ${maxFileSize} MB`
- );
+ alert(`${t("file-alert-1")}${maxFileSize} MB`);
}, 500);
return;
} else {
@@ -446,7 +442,7 @@ const Forms = (props) => {
setIsSubmit(false);
}
} else {
- alert("Please wait while the document is being uploaded.");
+ alert(t("file-alert-3"));
}
};
@@ -571,7 +567,7 @@ const Forms = (props) => {
{isAlert && (
<Alert type={isErr ? "danger" : "success"}>
{isErr
- ? "Something went wrong please try again!"
+ ? t("something-went-wrong-mssg")
: `${props.msgVar} created successfully!`}
</Alert>
)}
@@ -584,12 +580,12 @@ const Forms = (props) => {
<ModalUi
isOpen={isPassword}
handleClose={() => handeCloseModal()}
- title={"Enter Pdf Password"}
+ title={t("enter-pdf-password")}
>
<form onSubmit={handlePasswordSubmit}>
<div className="px-6 pt-3 pb-2">
<label className="mb-2 text-xs text-base-content">
- Password
+ {t("password")}
</label>
<input
type="text"
@@ -607,12 +603,12 @@ const Forms = (props) => {
: "text-transparent pointer-events-none"
} ml-2 text-[11px] `}
>
- Please provide correct password
+ {t("correct-password")}
</p>
</div>
<div className="px-6 mb-3">
<button type="submit" className="op-btn op-btn-primary">
- Submit
+ {t("submit")}
</button>
</div>
</form>
@@ -635,7 +631,7 @@ const Forms = (props) => {
{isDecrypting && (
<div className="flex items-center gap-x-2">
<span className="text-base-content text-sm">
- Decrypting pdf please wait...
+ {t("decrypting-pdf")}
</span>
</div>
)}
@@ -775,11 +771,11 @@ const Forms = (props) => {
<p className="p-[5px]">
<ol className="list-disc">
<li>
- <span className="font-bold">Yes:</span>
+ <span className="font-bold">{t("yes")}:</span>
<span>{t("send-in-order-help.p2")}</span>
</li>
<li>
- <span className="font-bold">No: </span>
+ <span className="font-bold">{t("no")}: </span>
<span>{t("send-in-order-help.p3")}</span>
</li>
</ol>
@@ -797,7 +793,7 @@ const Forms = (props) => {
checked={formData.SendinOrder === "true"}
onChange={handleStrInput}
/>
- <div className="text-center">Yes</div>
+ <div className="text-center">{t("yes")}</div>
</div>
<div className="flex items-center gap-2 ml-2 mb-1">
<input
diff --git a/apps/OpenSign/src/pages/GenerateToken.js b/apps/OpenSign/src/pages/GenerateToken.js
index 511dd892b..99e7ede48 100644
--- a/apps/OpenSign/src/pages/GenerateToken.js
+++ b/apps/OpenSign/src/pages/GenerateToken.js
@@ -10,12 +10,6 @@ import Loader from "../primitives/Loader";
import SubscribeCard from "../primitives/SubscribeCard";
import Tour from "reactour";
import { useTranslation } from "react-i18next";
-const tourSteps = [
- {
- selector: '[data-tut="apisubscribe"]',
- content: "Upgrade now to generate API token"
- }
-];
function GenerateToken() {
const { t } = useTranslation();
@@ -31,7 +25,12 @@ function GenerateToken() {
fetchToken();
// eslint-disable-next-line
}, []);
-
+ const tourSteps = [
+ {
+ selector: '[data-tut="apisubscribe"]',
+ content: t("tour-mssg.generate-token")
+ }
+ ];
const fetchToken = async () => {
try {
if (isEnableSubscription) {
diff --git a/apps/OpenSign/src/pages/GuestLogin.js b/apps/OpenSign/src/pages/GuestLogin.js
index bdcdb0375..f197f7044 100644
--- a/apps/OpenSign/src/pages/GuestLogin.js
+++ b/apps/OpenSign/src/pages/GuestLogin.js
@@ -89,7 +89,7 @@ function GuestLogin() {
setEnterOtp(true);
}
} catch (error) {
- alert("something went wrong!");
+ alert(t("something-went-wrong-mssg"));
}
};
@@ -119,10 +119,10 @@ function GuestLogin() {
};
let user = await axios.post(url, body, { headers: headers });
if (user.data.result === "Invalid Otp") {
- alert("Invalid Otp");
+ alert(t("invalid-otp"));
setLoading(false);
} else if (user.data.result === "user not found!") {
- alert("User not found!");
+ alert(t("user-not-found"));
setLoading(false);
} else {
let _user = user.data.result;
@@ -158,7 +158,7 @@ function GuestLogin() {
console.log("err ", error);
}
} else {
- alert("Please Enter OTP!");
+ alert(t("enter-otp-alert"));
}
};
const handleUserData = async (e) => {
@@ -173,7 +173,7 @@ function GuestLogin() {
await SendOtp();
} catch (err) {
setLoading(false);
- alert("something went wron, please try agian later.");
+ alert(t("something-went-wrong-mssg"));
console.log("Err in link ext contact", err);
}
};
@@ -198,7 +198,7 @@ function GuestLogin() {
<>
{!EnterOTP ? (
<div className="w-full md:w-[50%] text-base-content">
- <h1 className="text-2xl md:text-[30px]">Welcome Back!</h1>
+ <h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2 mb-1">
{t("guest-email-alert")}
</legend>
@@ -217,7 +217,7 @@ function GuestLogin() {
onClick={(e) => handleSendOTPBtn(e)}
disabled={loading}
>
- {loading ? "Loading..." : "Get verification code"}
+ {loading ? t("loading") : t("get-verification-code")}
</button>
</div>
</div>
@@ -226,12 +226,12 @@ function GuestLogin() {
className="w-full md:w-[50%] text-base-content"
onSubmit={VerifyOTP}
>
- <h1 className="text-2xl md:text-[30px]">Welcome Back!</h1>
+ <h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2">
- You will get a verification code via Email
+ {t("get-verification-code-2")}
</legend>
<div className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 op-card my-2 shadow-md">
- <p className="text-sm">Enter Verification Code</p>
+ <p className="text-sm">{t("enter-verification-code")}</p>
<input
type="number"
className="mt-2 op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
@@ -246,7 +246,7 @@ function GuestLogin() {
type="submit"
disabled={loading}
>
- {loading ? "Loading..." : "Verify"}
+ {loading ? t("loading") : t("verify")}
</button>
</div>
</form>
@@ -254,9 +254,9 @@ function GuestLogin() {
</>
) : (
<div className="w-full md:w-[50%] text-base-content">
- <h1 className="text-2xl md:text-[30px]">Welcome</h1>
+ <h1 className="text-2xl md:text-[30px]">{t("welcome")}</h1>
<legend className="text-[12px] text-[#878787] mt-2">
- Provide your details
+ {t("provide-your-details")}
</legend>
<form
className="p-[20px] pt-[15px] outline outline-1 outline-slate-300/50 my-2 op-card shadow-md"
@@ -267,7 +267,7 @@ function GuestLogin() {
htmlFor="name"
className="block text-xs text-gray-700 font-semibold"
>
- Name
+ {t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
@@ -285,7 +285,7 @@ function GuestLogin() {
htmlFor="email"
className="block text-xs text-gray-700 font-semibold"
>
- Email
+ {t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
@@ -303,7 +303,7 @@ function GuestLogin() {
htmlFor="phone"
className="block text-xs text-gray-700 font-semibold"
>
- Phone
+ {t("phone")}
</label>
<input
type="text"
@@ -320,7 +320,7 @@ function GuestLogin() {
className="op-btn op-btn-primary"
disabled={loading}
>
- {loading ? "Loading..." : "Next"}
+ {loading ? t("loading") : t("next")}
</button>
</div>
</form>
diff --git a/apps/OpenSign/src/pages/Login.js b/apps/OpenSign/src/pages/Login.js
index 4df8dd688..053fe8f03 100644
--- a/apps/OpenSign/src/pages/Login.js
+++ b/apps/OpenSign/src/pages/Login.js
@@ -247,7 +247,7 @@ function Login() {
}
} catch (err) {
console.log("err in free subscribe", err.message);
- alert("Somenthing went wrong, please try again later!");
+ alert(t("something-went-wrong-mssg"));
}
};
const thirdpartyLoginfn = async (sessionToken) => {
@@ -551,7 +551,7 @@ function Login() {
payload &&
payload.message.replace(/ /g, "_") === "Internal_server_err"
) {
- alert("Internal server error !");
+ alert(t("server-error"));
}
} else {
setState({
@@ -601,7 +601,7 @@ function Login() {
"_self"
);
} else {
- alert("Please provide email.");
+ alert(t("provide-email"));
}
}
};
@@ -772,7 +772,11 @@ function Login() {
</Alert>
)}
</div>
- <ModalUi isOpen={isModal} title="Additional Info" showClose={false}>
+ <ModalUi
+ isOpen={isModal}
+ title={t("additional-info")}
+ showClose={false}
+ >
<form className="px-4 py-3 text-base-content">
<div className="mb-3">
<label
diff --git a/apps/OpenSign/src/pages/Managesign.js b/apps/OpenSign/src/pages/Managesign.js
index f5a0a8cfe..9d8b8fead 100644
--- a/apps/OpenSign/src/pages/Managesign.js
+++ b/apps/OpenSign/src/pages/Managesign.js
@@ -189,7 +189,7 @@ const ManageSign = () => {
setIsLoader(false);
setIsAlert({
type: "success",
- message: "Signature saved successfully."
+ message: t("signature-saved-alert")
});
setTimeout(() => setIsAlert({}), 2000);
return res;
@@ -213,7 +213,7 @@ const ManageSign = () => {
setIsLoader(false);
setIsAlert({
type: "success",
- message: "Signature saved successfully."
+ message: t("signature-saved-alert")
});
setTimeout(() => setIsAlert({}), 2000);
return res;
diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.js
index b283e760e..4fed29604 100644
--- a/apps/OpenSign/src/pages/Opensigndrive.js
+++ b/apps/OpenSign/src/pages/Opensigndrive.js
@@ -80,7 +80,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourFirst"]',
content: () => (
<TourContentWithBtn
- message={`Click on the breadcrumb links to easily navigate through the folder hierarchy and view the documents within each folder.`}
+ message={t("tour-mssg.opensign-drive-1")}
isChecked={handleDontShow}
/>
),
@@ -91,7 +91,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSecond"]',
content: () => (
<TourContentWithBtn
- message={`Click the add button to create a new folder or document.`}
+ message={t("tour-mssg.opensign-drive-2")}
isChecked={handleDontShow}
/>
),
@@ -102,7 +102,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourThird"]',
content: () => (
<TourContentWithBtn
- message={`Sort your documents by Date or Name using this menu.`}
+ message={t("tour-mssg.opensign-drive-3")}
isChecked={handleDontShow}
/>
),
@@ -113,7 +113,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourForth"]',
content: () => (
<TourContentWithBtn
- message={`Click on this menu to display the documents in list view.`}
+ message={t("tour-mssg.opensign-drive-4")}
isChecked={handleDontShow}
/>
),
@@ -140,7 +140,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourFifth"]',
content: () => (
<TourContentWithBtn
- message={`The document list is displayed according to the selected sorting option. Icons next to each document indicate its current status.`}
+ message={t("tour-mssg.opensign-drive-5")}
isChecked={handleDontShow}
/>
),
@@ -151,7 +151,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSixth"]',
content: () => (
<TourContentWithBtn
- message={`Right-click on a document to see options such as Download, Rename, Move, and Delete. Click on the document to open it.`}
+ message={t("tour-mssg.opensign-drive-6")}
isChecked={handleDontShow}
/>
),
@@ -162,7 +162,7 @@ function Opensigndrive() {
selector: '[data-tut="reactourSeventh"]',
content: () => (
<TourContentWithBtn
- message={`Right-click on any folder to see options. Choose ‘Rename’ to change the folder’s name or click on the folder to navigate through its contents.`}
+ message={t("tour-mssg.opensign-drive-7")}
isChecked={handleDontShow}
/>
),
@@ -197,7 +197,7 @@ function Opensigndrive() {
} catch (e) {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
} finally {
setLoading(false);
@@ -321,11 +321,11 @@ function Opensigndrive() {
} catch (e) {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong!"
+ alertMessage: t("something-went-wrong-mssg")
});
}
} else {
- setError("Please fill out this field");
+ setError(t("fill-field"));
}
};
@@ -527,7 +527,7 @@ function Opensigndrive() {
<Title title={"OpenSignℱ Drive"} drive={true} />
<ModalUi
isOpen={isAlert.isShow}
- title={"Alert"}
+ title={t("alert")}
handleClose={() => {
setIsAlert({
isShow: false,
@@ -548,13 +548,13 @@ function Opensigndrive() {
type="button"
className="op-btn op-btn-neutral op-btn-sm"
>
- Close
+ {t("close")}
</button>
</div>
</ModalUi>
<ModalUi
isOpen={isFolder}
- title={"Add New Folder"}
+ title={t("add-new-folder")}
handleClose={oncloseFolder}
>
<div className="h-full p-[20px] pt-[10px] pb-[15px]">
@@ -568,7 +568,7 @@ function Opensigndrive() {
className="flex flex-col text-base-content"
>
<label className="py-[8px] text-[15px] font-[400] mb-0">
- Name
+ {t("name")}
<span className="text-[red]">*</span>
</label>
<input
@@ -582,14 +582,14 @@ function Opensigndrive() {
<div className="w-full h-[1px] bg-[#9f9f9f] my-[15px]"></div>
<div className="flex flex-row">
<button type="submit" className="op-btn op-btn-primary">
- Add
+ {t("add")}
</button>
<button
type="button"
className="op-btn op-btn-ghost ml-1"
onClick={oncloseFolder}
>
- Close
+ {t("close")}
</button>
</div>
</form>
@@ -657,21 +657,21 @@ function Opensigndrive() {
className="fa-light fa-plus mr-[5px]"
aria-hidden="true"
></i>
- Create folder
+ {t("create-folder")}
</span>
<span
className="dropdown-item text-[10px] md:text-[13px]"
onClick={() => navigate("/form/sHAnZphf69")}
>
<i className="fa-light fa-pen-nib mr-[5px]"></i>
- Sign Yourself
+ {t("form-name.Sign Yourself")}
</span>
<span
className="dropdown-item text-[10px] md:text-[13px]"
onClick={() => navigate("/form/8mZzFxbG1z")}
>
<i className="fa-light fa-file-signature mr-[5px]"></i>
- Request Signatures
+ {t("form-name.Request Signatures")}
</span>
</div>
</div>
@@ -721,7 +721,9 @@ function Opensigndrive() {
aria-hidden="true"
></i>
)}
- <span className="ml-[5px]">{value}</span>
+ <span className="ml-[5px]">
+ {t(`sort-order.${value}`)}
+ </span>
</span>
);
})}
@@ -746,7 +748,9 @@ function Opensigndrive() {
aria-hidden="true"
></i>
)}
- <span className="ml-[5px]">{order}</span>
+ <span className="ml-[5px]">
+ {t(`sort-order.${order}`)}
+ </span>
</span>
);
})}
@@ -783,7 +787,7 @@ function Opensigndrive() {
{pdfData && pdfData.length === 0 ? (
<div className="flex justify-center items-center w-full h-[50vh]">
<span className="text-base-content font-bold">
- No Data Found!
+ {t("no-data")}
</span>
</div>
) : (
@@ -805,7 +809,7 @@ function Opensigndrive() {
sortingData={sortingData}
/>
{loading && (
- <div className="text-center pb-[20px]">Loading...</div>
+ <div className="text-center pb-[20px]">{t("loading")}</div>
)}
</React.Suspense>
</div>
diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js
index 314e33b9f..b01db5498 100644
--- a/apps/OpenSign/src/pages/PdfRequestFiles.js
+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js
@@ -191,7 +191,7 @@ function PdfRequestFiles(props) {
const currentUser = JSON.parse(localuser);
await handleSendOTP(currentUser?.email);
setOtpLoader(false);
- alert("OTP sent on you email");
+ alert(t("otp-sent-alert"));
};
//`handleVerifyEmail` function is used to verify email with otp
const handleVerifyEmail = async (e) => {
@@ -318,12 +318,12 @@ function PdfRequestFiles(props) {
(documentData.result && documentData.result.error)
) {
console.log("err in get template details ");
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
setIsLoading({
isLoad: false
});
} else {
- setHandleError("No Data Found!");
+ setHandleError(t("no-data"));
setIsLoading({
isLoad: false
});
@@ -331,9 +331,9 @@ function PdfRequestFiles(props) {
} catch (err) {
console.log("err in get template details ", err);
if (err?.response?.data?.code === 101) {
- setHandleError("Error: Template not found!");
+ setHandleError(t("error-template"));
} else {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
}
}
};
@@ -408,8 +408,7 @@ function PdfRequestFiles(props) {
}, 5000);
setIsCompleted({
isModal: true,
- message:
- "You have successfully signed the document. You can download or print a copy of the partially signed document. A copy of the digitally signed document will be sent to the owner over email once it is signed by all signers."
+ message: t("document-signed-alert-1")
});
} else {
if (currUserId) {
@@ -561,7 +560,7 @@ function PdfRequestFiles(props) {
const currentUserEmail = currentUser.email;
const res = await contractUsers(currentUserEmail);
if (res === "Error: Something went wrong!") {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
} else if (res[0] && res?.length) {
setContractName("_Users");
currUserId = res[0].objectId;
@@ -577,7 +576,7 @@ function PdfRequestFiles(props) {
} else if (res?.length === 0) {
const res = await contactBook(currUserId);
if (res === "Error: Something went wrong!") {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
} else if (res[0] && res.length) {
setContractName("_Contactbook");
const objectId = res[0].objectId;
@@ -591,7 +590,7 @@ function PdfRequestFiles(props) {
setRequestSignTour(checkTourRequest[0]?.requestSign || false);
}
} else if (res.length === 0) {
- setHandleError("Error: User does not exist!");
+ setHandleError(t("user-not-exist"));
}
}
}
@@ -600,13 +599,13 @@ function PdfRequestFiles(props) {
documentData === "Error: Something went wrong!" ||
(documentData.result && documentData.result.error)
) {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
setIsLoading({
isLoad: false
});
console.log("err in getDocument cloud function ");
} else {
- setHandleError("No Data Found!");
+ setHandleError(t("no-data"));
setIsUiLoading({
isLoad: false
});
@@ -642,7 +641,7 @@ function PdfRequestFiles(props) {
})
.catch((err) => {
console.log("Err in contracts_Signature class", err);
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
setIsLoading({
isLoad: false
});
@@ -832,7 +831,7 @@ function PdfRequestFiles(props) {
//convert document url in array buffer format to use embed widgets in pdf using pdf-lib
const arrayBuffer = await convertPdfArrayBuffer(url);
if (arrayBuffer === "Error") {
- setHandleError("Error: invalid document!");
+ setHandleError(t("invalid-document"));
} else {
pdfArrBuffer = arrayBuffer;
}
@@ -840,9 +839,9 @@ function PdfRequestFiles(props) {
documentData === "Error: Something went wrong!" ||
(documentData.result && documentData.result.error)
) {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
} else {
- setHandleError("Document not Found!");
+ setHandleError(t("document-not-found"));
}
// Load a PDFDocument from the existing PDF bytes
@@ -875,7 +874,7 @@ function PdfRequestFiles(props) {
const res = await contractUsers(currentUserEmail);
let activeMailAdapter = "";
if (res === "Error: Something went wrong!") {
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
setIsLoading({
isLoad: false
});
@@ -1040,13 +1039,13 @@ function PdfRequestFiles(props) {
} else {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
}
} catch (err) {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
}
} catch (err) {
@@ -1054,7 +1053,7 @@ function PdfRequestFiles(props) {
if (err && err.message.includes("is encrypted.")) {
setIsAlert({
isShow: true,
- alertMessage: `Currently encrypted pdf files are not supported.`
+ alertMessage: t("encrypted-pdf-not-support")
});
} else {
console.log("err in request signing", err);
@@ -1069,7 +1068,7 @@ function PdfRequestFiles(props) {
} else {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: t("something-went-wrong-mssg")
});
}
} catch (err) {
@@ -1077,7 +1076,7 @@ function PdfRequestFiles(props) {
setIsUiLoading(false);
setIsAlert({
isShow: true,
- alertMessage: "something went wrong, please try again later."
+ alertMessage: t("something-went-wrong-mssg")
});
}
} else {
@@ -1093,7 +1092,7 @@ function PdfRequestFiles(props) {
}
} catch (e) {
console.log("error in save user's emailVerified in user class");
- setHandleError("Error: Something went wrong!");
+ setHandleError(t("something-went-wrong-mssg"));
}
}
}
@@ -1381,7 +1380,7 @@ function PdfRequestFiles(props) {
selector: '[data-tut="reactourFirst"]',
content: () => (
<TourContentWithBtn
- message={`List of signers who still need to sign the document .`}
+ message={t("tour-mssg.pdf-request-file-1")}
isChecked={handleDontShow}
/>
),
@@ -1392,7 +1391,7 @@ function PdfRequestFiles(props) {
selector: '[data-tut="pdfArea"]',
content: () => (
<TourContentWithBtn
- message={`Click any of the placeholders appearing on the document to sign. You will then see options to draw your signature, type it, or upload an image .`}
+ message={t("tour-mssg.pdf-request-file-2")}
isChecked={handleDontShow}
/>
),
@@ -1403,7 +1402,7 @@ function PdfRequestFiles(props) {
selector: '[data-tut="reactourFifth"]',
content: () => (
<TourContentWithBtn
- message={`Click the Back, Decline, or Finish buttons to navigate your document. Use the ellipsis menu for additional options, including the Download button .`}
+ message={t("tour-mssg.pdf-request-file-3")}
isChecked={handleDontShow}
/>
),
@@ -1415,7 +1414,7 @@ function PdfRequestFiles(props) {
selector: '[data-tut="reactourSecond"]',
content: () => (
<TourContentWithBtn
- message={`List of signers who have already signed the document .`}
+ message={t("tour-mssg.pdf-request-file-4")}
isChecked={handleDontShow}
/>
),
@@ -1433,7 +1432,7 @@ function PdfRequestFiles(props) {
selector: '[data-tut="reactourThird"]',
content: () => (
<TourContentWithBtn
- message={`You can click "Auto Sign All" to automatically sign at all the locations meant to be signed by you. Make sure that you review the document properly before you click this button .`}
+ message={t("tour-mssg.pdf-request-file-5")}
isChecked={handleDontShow}
/>
),
@@ -1493,7 +1492,7 @@ function PdfRequestFiles(props) {
await SendOtp();
} else {
console.log("error in public-sign to create user details");
- alert("something went wrong");
+ alert(t("something-went-wrong-mssg"));
}
} catch (e) {
console.log("e", e);
@@ -1526,7 +1525,7 @@ function PdfRequestFiles(props) {
}
} catch (error) {
console.log("error in verify otp in public-sign", error);
- alert("something went wrong!");
+ alert(t("something-went-wrong-mssg"));
}
};
@@ -1552,10 +1551,10 @@ function PdfRequestFiles(props) {
};
let user = await axios.post(url, body, { headers: headers });
if (user.data.result === "Invalid Otp") {
- alert("Invalid Otp");
+ alert(t("invalid-otp"));
setLoading(false);
} else if (user.data.result === "user not found!") {
- alert("User not found!");
+ alert(t("user-not-found"));
setLoading(false);
} else {
let _user = user.data.result;
@@ -1590,7 +1589,7 @@ function PdfRequestFiles(props) {
console.log("err ", error);
}
} else {
- alert("Please Enter OTP!");
+ alert(t("enter-otp-alert"));
}
};
const handleCloseOtp = () => {
@@ -1863,7 +1862,7 @@ function PdfRequestFiles(props) {
</ModalUi>
<ModalUi
isOpen={defaultSignAlert.isShow}
- title={"Auto sign"}
+ title={t("auto-sign-all")}
handleClose={() =>
setDefaultSignAlert({ isShow: false, alertMessage: "" })
}
@@ -1878,7 +1877,7 @@ function PdfRequestFiles(props) {
type="button"
className="op-btn op-btn-primary"
>
- Yes
+ {t("yes")}
</button>
<button
onClick={() =>
@@ -1890,7 +1889,7 @@ function PdfRequestFiles(props) {
type="button"
className="op-btn op-btn-secondary"
>
- Close
+ {t("close")}
</button>
</>
) : (
@@ -1901,7 +1900,7 @@ function PdfRequestFiles(props) {
type="button"
className="op-btn op-btn-primary"
>
- Ok
+ {t("ok")}
</button>
)}
</div>
@@ -1933,7 +1932,7 @@ function PdfRequestFiles(props) {
{/* this modal is used show this document is already sign */}
<ModalUi
isOpen={isCompleted.isModal}
- title={"Document signed"}
+ title={t("document-signed")}
handleClose={() => {
setIsCompleted((prev) => ({ ...prev, isModal: false }));
}}
@@ -1947,10 +1946,7 @@ function PdfRequestFiles(props) {
<p>{isCompleted?.message}</p>
) : (
<div className="px-[15px]">
- <span>
- Congratulations! 🎉 This document has been
- successfully signed by all participants!
- </span>
+ <span>{t("document-signed-alert-4")}</span>
</div>
)}
{!isCompleted?.message && (
@@ -1966,7 +1962,9 @@ function PdfRequestFiles(props) {
className="fa-light fa-print"
aria-hidden="true"
></i>
- <span className="hidden lg:block">Print</span>
+ <span className="hidden lg:block">
+ {t("print")}
+ </span>
</button>
<button
type="button"
@@ -1983,7 +1981,7 @@ function PdfRequestFiles(props) {
aria-hidden="true"
></i>
<span className="hidden lg:block">
- Certificate
+ {t("certificate")}
</span>
</button>
<button
@@ -2001,7 +1999,9 @@ function PdfRequestFiles(props) {
className="fa-light fa-download"
aria-hidden="true"
></i>
- <span className="hidden lg:block">Download</span>
+ <span className="hidden lg:block">
+ {t("download")}
+ </span>
</button>
</div>
)}
@@ -2016,18 +2016,14 @@ function PdfRequestFiles(props) {
isOpen={isDownloading === "certificate"}
title={
isDownloading === "certificate"
- ? "Generating certificate"
- : "PDF Download"
+ ? t("generating-certificate")
+ : t("pdf-download")
}
handleClose={() => setIsDownloading("")}
>
<div className="p-3 md:p-5 text-[13px] md:text-base text-center text-base-content">
{isDownloading === "certificate"}{" "}
- <p>
- Your completion certificate is being generated. Please
- wait momentarily. If the download doesn&apos;t start
- shortly, click the button again.
- </p>
+ <p>{t("generate-certificate-alert")}</p>
</div>
</ModalUi>
{/* this component is used for signature pad modal */}
@@ -2133,7 +2129,7 @@ function PdfRequestFiles(props) {
data-tut="reactourSecond"
className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300"
>
- <span> Signed by</span>
+ <span>{t("signed-by")}</span>
</div>
<div className="mt-[2px]">
{signedSigners.map((obj, ind) => {
@@ -2158,7 +2154,7 @@ function PdfRequestFiles(props) {
data-tut="reactourFirst"
className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300"
>
- <span>Yet to sign</span>
+ <span>{t("yet-to-sign")}</span>
</div>
<div className="mt-[5px]">
{unsignedSigners.map((obj, ind) => {
@@ -2193,23 +2189,20 @@ function PdfRequestFiles(props) {
)}
<ModalUi
isOpen={validateAlert}
- title={"Validation alert"}
+ title={t("validation-alert")}
handleClose={() => {
setValidateAlert(false);
}}
>
<div className="h-[100%] p-[20px]">
- <p>
- The input does not meet the criteria set by the regular
- expression.
- </p>
+ <p>{t("validation-alert-1")}</p>
<div className="h-[1px] bg-[#9f9f9f] w-full my-[15px]"></div>
<button
onClick={() => setValidateAlert(false)}
type="button"
className="op-btn op-btn-ghost"
>
- Close
+ {t("close")}
</button>
</div>
</ModalUi>
diff --git a/apps/OpenSign/src/pages/Pgsignup.js b/apps/OpenSign/src/pages/Pgsignup.js
index 7e5c97637..95474b18f 100644
--- a/apps/OpenSign/src/pages/Pgsignup.js
+++ b/apps/OpenSign/src/pages/Pgsignup.js
@@ -8,8 +8,10 @@ import { appInfo } from "../constant/appinfo";
import { showTenant } from "../redux/reducers/ShowTenant";
import { fetchAppInfo } from "../redux/reducers/infoReducer";
import Loader from "../primitives/Loader";
+import { useTranslation } from "react-i18next";
const PgSignUp = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const location = useLocation();
const dispatch = useDispatch();
@@ -168,11 +170,11 @@ const PgSignUp = () => {
} catch (error) {
console.log("err ", error);
if (error.message === "Account already exists for this username.") {
- alert("Account already exists!");
+ alert(t("account-already-exists"));
navigate("/", { replace: true });
} else {
setIsLoader(false);
- alert("Something went wrong, please try again later!");
+ alert(t("something-went-wrong-mssg"));
}
}
};
@@ -262,7 +264,7 @@ const PgSignUp = () => {
localStorage.setItem("defaultmenuid", menu.menuId);
localStorage.setItem("pageType", menu.pageType);
setIsLoader(false);
- alert("Registered user successfully");
+ alert(t("registered-user-successfully"));
const redirectUrl =
location?.state?.from || `/${menu.pageType}/${menu.pageId}`;
// Redirect to the appropriate URL after successful login
@@ -294,15 +296,15 @@ const PgSignUp = () => {
>
<div className="p-[16px]">
<h1 className="text-2xl md:text-3xl font-bold">
- Choose Password
+ {t("choose-password")}
</h1>
<hr className="border-[1px] border-[#cecece] mb-[5px]" />
<label htmlFor="password">
- <b className="text-[13px]">Password</b>
+ <b className="text-[13px]">{t("password")}</b>
</label>
<input
type="password"
- placeholder="Enter Password"
+ placeholder={t("enter-password")}
name="password"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
value={formData.password}
@@ -310,11 +312,11 @@ const PgSignUp = () => {
required
/>
<label htmlFor="confirmPassword">
- <b className="text-[13px]">Confirm Password</b>
+ <b className="text-[13px]">{t("confirm-password")}</b>
</label>
<input
type="password"
- placeholder="Confirm Password"
+ placeholder={t("confirm-password")}
name="confirmPassword"
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
style={{
@@ -344,24 +346,21 @@ const PgSignUp = () => {
lengthValid ? "text-green-600" : "text-red-600"
}`}
>
- {lengthValid ? "✓" : "✗"} Password should be 8 characters
- long
+ {lengthValid ? "✓" : "✗"} {t("password-length")}
</p>
<p
className={`${
caseDigitValid ? "text-green-600" : "text-red-600"
}`}
>
- {caseDigitValid ? "✓" : "✗"} Password should contain
- uppercase letter, lowercase letter, digit
+ {caseDigitValid ? "✓" : "✗"} {t("password-case")}
</p>
<p
className={`${
specialCharValid ? "text-green-600" : "text-red-600"
}`}
>
- {specialCharValid ? "✓" : "✗"} Password should contain
- special character
+ {specialCharValid ? "✓" : "✗"} {t("password-special-char")}
</p>
</div>
)}
@@ -369,7 +368,7 @@ const PgSignUp = () => {
type="submit"
className="op-btn op-btn-primary w-full mt-[8px]"
>
- Submit
+ {t("submit")}
</button>
</div>
</form>
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index a7a352a3e..e2c186950 100644
--- a/apps/OpenSign/src/pages/PlaceHolderSign.js
+++ b/apps/OpenSign/src/pages/PlaceHolderSign.js
@@ -192,7 +192,7 @@ function PlaceHolderSign() {
try {
const tenantDetails = await getTenantDetails(user?.objectId);
if (tenantDetails && tenantDetails === "user does not exist!") {
- alert("User does not exist");
+ alert(t("user-not-exist"));
} else if (tenantDetails) {
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team OpenSignℱ</p><br>`;
if (tenantDetails?.RequestBody) {
@@ -215,10 +215,10 @@ function PlaceHolderSign() {
}
}
} catch (e) {
- alert("User does not exist");
+ alert(t("user-not-exist"));
}
} else {
- alert("User does not exist");
+ alert(t("user-not-exist"));
}
};
@@ -297,32 +297,29 @@ function PlaceHolderSign() {
// If document is completed
setIsAlreadyPlace({
status: true,
- message: "This document has been signed by all Signers."
+ message: t("document-signed-alert-5")
});
} else if (declined) {
// If document has been declined
setIsAlreadyPlace({
status: true,
- message:
- "This document has been declined by one or more recipient(s)."
+ message: t("document-signed-alert-6")
});
} else if (currDate > expireUpdateDate) {
// If document has expired
setIsAlreadyPlace({
status: true,
- message: "This Document is no longer available."
+ message: t("document-signed-alert-7")
});
} else {
// If document is dispatched for signing
setIsAlreadyPlace({
status: true,
- message: "The document has already been dispatched for signing."
+ message: t("document-signed-alert-8")
});
}
}
-
setPdfDetails(documentData);
-
if (documentData[0].Signers && documentData[0].Signers.length > 0) {
const currEmail = documentData[0].ExtUserPtr.Email;
setCurrentId(currEmail);
@@ -914,20 +911,18 @@ function PlaceHolderSign() {
}
if (!signatureExist) {
isSignatureExist = false;
- const alert = {
- mssg: "sure",
+ setIsSendAlert({
+ mssg: t("sure"),
alert: true
- };
- setIsSendAlert(alert);
+ });
}
}
if (getPrefill && isLabel) {
- const alert = {
+ setIsSendAlert({
mssg: textWidget,
alert: true
- };
- setIsSendAlert(alert);
+ });
} else if (isSignatureExist) {
if (filterPrefill.length === signersdata.length) {
const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId);
@@ -940,11 +935,10 @@ function PlaceHolderSign() {
saveDocumentDetails();
}
} else {
- const alert = {
- mssg: "sure",
+ setIsSendAlert({
+ mssg: t("sure"),
alert: true
- };
- setIsSendAlert(alert);
+ });
}
}
};
@@ -1028,11 +1022,11 @@ function PlaceHolderSign() {
})
.catch((err) => {
console.log("axois err ", err);
- alert("something went wrong");
+ alert(t("something-went-wrong-mssg"));
});
} catch (e) {
console.log("error", e);
- alert("something went wrong");
+ alert(t("something-went-wrong-mssg"));
}
};
@@ -1266,7 +1260,7 @@ function PlaceHolderSign() {
selector: '[data-tut="recipientArea"]',
content: () => (
<TourContentWithBtn
- message={`Select a recipient from this list to add a place-holder where he is supposed to sign.The placeholder will appear in the same colour as the recipient name once you drop it on the document.`}
+ message={t("tour-mssg.placeholder-sign-1")}
isChecked={handleDontShow}
/>
),
@@ -1277,7 +1271,7 @@ function PlaceHolderSign() {
selector: '[data-tut="addRecipient"]',
content: () => (
<TourContentWithBtn
- message={`Clicking "Add recipients" button will allow you to add more signers.`}
+ message={t("tour-mssg.placeholder-sign-3")}
isChecked={handleDontShow}
/>
),
@@ -1288,7 +1282,7 @@ function PlaceHolderSign() {
selector: '[data-tut="addWidgets"]',
content: () => (
<TourContentWithBtn
- message={`Drag or click on a field to add it to the document.`}
+ message={t("tour-mssg.placeholder-sign-3")}
isChecked={handleDontShow}
/>
),
@@ -1299,7 +1293,7 @@ function PlaceHolderSign() {
selector: '[data-tut="pdfArea"]',
content: () => (
<TourContentWithBtn
- message={`The PDF content area already displays the template's existing placeholders. For your convenience, these placeholders will match the color of the recipient's name, making them easily identifiable.`}
+ message={t("tour-mssg.placeholder-sign-4")}
isChecked={handleDontShow}
/>
),
@@ -1311,7 +1305,7 @@ function PlaceHolderSign() {
selector: '[data-tut="headerArea"]',
content: () => (
<TourContentWithBtn
- message={`Clicking "Send" will save the document. In the next step you can customize the emails to be sent out to the recipients or copy the signing links and share those with the recipients yourself.`}
+ message={t("tour-mssg.placeholder-sign-5")}
isChecked={handleDontShow}
/>
),
diff --git a/apps/OpenSign/src/pages/PlanSubscriptions.js b/apps/OpenSign/src/pages/PlanSubscriptions.js
index eaaeaa08e..1987048f4 100644
--- a/apps/OpenSign/src/pages/PlanSubscriptions.js
+++ b/apps/OpenSign/src/pages/PlanSubscriptions.js
@@ -6,6 +6,7 @@ import Title from "../components/Title";
import Parse from "parse";
import { openInNewTab } from "../constant/Utils";
import Loader from "../primitives/Loader";
+import { useTranslation } from "react-i18next";
const listItemStyle = {
paddingLeft: "20px", // Add padding to create space for the image
backgroundImage: `url(${checkmark})`, // Set your image as the list style image
@@ -15,6 +16,7 @@ const listItemStyle = {
};
const PlanSubscriptions = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const [yearlyVisible, setYearlyVisible] = useState(true);
const [isLoader, setIsLoader] = useState(true);
@@ -76,7 +78,7 @@ const PlanSubscriptions = () => {
const res = await Parse.Cloud.run("freesubscription", params);
if (res.status === "success" && res.result === "already subscribed!") {
setIsLoader(false);
- alert("You have already subscribed to plan!");
+ alert(t("subscribed-alert"));
} else if (res.status === "success") {
setIsLoader(false);
navigate("/");
@@ -87,7 +89,7 @@ const PlanSubscriptions = () => {
} catch (err) {
setIsLoader(false);
console.log("err in free subscribe", err.message);
- alert("Somenthing went wrong, please try again later!");
+ alert(t("something-went-wrong-mssg"));
}
}
};
@@ -111,14 +113,14 @@ const PlanSubscriptions = () => {
role="tab"
className={`${!yearlyVisible ? "op-tab-active" : ""} op-tab`}
>
- Monthly
+ {t("monthly")}
</a>
<a
onClick={() => setYearlyVisible(true)}
role="tab"
className={`${yearlyVisible ? "op-tab-active" : ""} op-tab`}
>
- Yearly (upto 66% off)
+ {t("yearly-upto")}
</a>
</div>
<ul className="op-card flex flex-col md:flex-row h-full bg-base-100 justify-center shadow-lg">
@@ -170,7 +172,9 @@ const PlanSubscriptions = () => {
)}
</span>
<p className="font-semibold pt-2 text-sm">
- {yearlyVisible ? "Billed Yearly" : "Billed Monthly"}
+ {yearlyVisible
+ ? t("billed-yearly")
+ : t("billed-monthly")}
</p>
<div className="max-w-[250px] h-[40px] text-center text-sm my-2">
<div
@@ -228,7 +232,7 @@ const PlanSubscriptions = () => {
</div>
<div className="flex flex-col justify-center items-center">
<h3 className="text-[#002862] mt-1 mb-2">
- Host it yourself for free
+ {t("plansubscription-1")}
</h3>
<div
className="op-btn op-btn-primary w-[200px]"
@@ -236,7 +240,7 @@ const PlanSubscriptions = () => {
openInNewTab("https://github.com/OpenSignLabs/OpenSign")
}
>
- Visit Github
+ {t("visit-github")}
</div>
</div>
</div>
diff --git a/apps/OpenSign/src/pages/Report.js b/apps/OpenSign/src/pages/Report.js
index 7afba1711..c6a8451d0 100644
--- a/apps/OpenSign/src/pages/Report.js
+++ b/apps/OpenSign/src/pages/Report.js
@@ -8,8 +8,10 @@ import Title from "../components/Title";
import PageNotFound from "./PageNotFound";
import TourContentWithBtn from "../primitives/TourContentWithBtn";
import Loader from "../primitives/Loader";
+import { useTranslation } from "react-i18next";
const Report = () => {
+ const { t } = useTranslation();
const { id } = useParams();
const [List, setList] = useState([]);
const [isLoader, setIsLoader] = useState(true);
@@ -83,9 +85,7 @@ const Report = () => {
selector: "[data-tut=reactourFirst]",
content: () => (
<TourContentWithBtn
- message={
- "Click the 'Add' button to create a new template. Templates are reusable documents designed to quickly generate new documents with the same structure and varying signers. For example, an HR template for onboarding could have predefined roles like ‘HR Manager’ and ‘New Employee’. Each time you use the template, you can assign the ‘New Employee’ role to different incoming staff members, while the ‘HR Manager’ role remains constant, facilitating a seamless onboarding process for each recruit. "
- }
+ message={t("tour-mssg.report-1")}
isChecked={handleDontShow}
/>
),
diff --git a/apps/OpenSign/src/pages/SSOVerify.js b/apps/OpenSign/src/pages/SSOVerify.js
index b2ab6701d..469164fef 100644
--- a/apps/OpenSign/src/pages/SSOVerify.js
+++ b/apps/OpenSign/src/pages/SSOVerify.js
@@ -8,8 +8,10 @@ import { useDispatch } from "react-redux";
import { showTenant } from "../redux/reducers/ShowTenant";
import ModalUi from "../primitives/ModalUi";
import Loader from "../primitives/Loader";
+import { useTranslation } from "react-i18next";
const SSOVerify = () => {
+ const { t } = useTranslation();
const location = useLocation();
const navigate = useNavigate();
const dispatch = useDispatch();
@@ -120,16 +122,16 @@ const SSOVerify = () => {
} catch (err) {
console.log("error in usersignup", err);
localStorage.removeItem("accesstoken");
- alert("Something went wrong.");
+ alert(t("something-went-wrong-mssg"));
setIsLoader(false);
}
} else {
localStorage.removeItem("accesstoken");
- alert("Internal server error.");
+ alert(t("server-error"));
setIsLoader(false);
}
} else {
- alert("Please fill required details correctly.");
+ alert(t("filed-required-correctly"));
setIsLoader(false);
}
};
@@ -207,19 +209,15 @@ const SSOVerify = () => {
}
}
} else {
- alert(
- "Error: You don't have access, please contact the admin."
- );
- setMessage(
- "Error: You don't have access, please contact the admin."
- );
+ alert(t("do-not-access-contact-admin"));
+ setMessage(t("do-not-access-contact-admin"));
}
}
})
.catch((error) => {
console.error("Err in fetch extuser", error);
- alert("user not exist.");
- setMessage("Error: User not exist.");
+ alert(t("user-not-exist"));
+ setMessage(t("user-not-exist"));
});
} catch (err) {
console.log("err in getuserdetails", err);
@@ -265,7 +263,7 @@ const SSOVerify = () => {
>
<div className="mb-3">
<label htmlFor="Company" className="block text-xs font-semibold">
- Phone <span className="text-[13px] text-[red]">*</span>
+ {t("phone")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="tel"
@@ -287,7 +285,7 @@ const SSOVerify = () => {
</div>
<div className="mb-3">
<label htmlFor="Company" className="block text-xs font-semibold">
- Company <span className="text-[13px] text-[red]">*</span>
+ {t("company")} <span className="text-[13px] text-[red]">*</span>
</label>
<input
type="text"
@@ -306,7 +304,7 @@ const SSOVerify = () => {
</div>
<div className="mb-3">
<label htmlFor="JobTitle" className="block text-xs font-semibold">
- Job Title
+ {t("job-title")}
<span className="text-[13px] text-[red]">*</span>
</label>
<input
@@ -326,14 +324,14 @@ const SSOVerify = () => {
</div>
<div className="mt-4">
<button type="submit" className="op-btn op-btn-primary">
- Login
+ {t("login")}
</button>
<button
type="button"
className="op-btn op-btn-ghost ml-2"
onClick={handleCloseModal}
>
- Cancel
+ {t("cancel")}
</button>
</div>
</form>
diff --git a/apps/OpenSign/src/pages/Signup.js b/apps/OpenSign/src/pages/Signup.js
index 0b0a97fc2..303485c72 100644
--- a/apps/OpenSign/src/pages/Signup.js
+++ b/apps/OpenSign/src/pages/Signup.js
@@ -71,7 +71,7 @@ const Signup = () => {
}
} catch (err) {
console.log("err in free subscribe", err.message);
- alert("Somenthing went wrong, please try again later!");
+ alert(t("something-went-wrong-mssg"));
}
};
const handleSubmit = (event) => {
@@ -138,7 +138,7 @@ const Signup = () => {
const res = await Parse.Cloud.run("getUserDetails", params);
// console.log("Res ", res);
if (res) {
- alert("User already exists with this username!");
+ alert(t("user-already-exist-name"));
setState({ loading: false });
} else {
// console.log("state.email ", email);
@@ -146,9 +146,7 @@ const Signup = () => {
await Parse.User.requestPasswordReset(email).then(
async function (res1) {
if (res1.data === undefined) {
- alert(
- "Verification mail has been sent to your E-mail!"
- );
+ alert(t("verification-code-sent"));
}
}
);
@@ -235,14 +233,14 @@ const Signup = () => {
navigate(`/subscription`, { replace: true });
}
} else {
- alert("Registered user successfully");
+ alert(t("registered-user-successfully"));
navigate(`/${menu.pageType}/${menu.pageId}`);
}
} else {
setState({
loading: false,
alertType: "danger",
- alertMsg: "Role not found."
+ alertMsg: t("role-not-found")
});
setTimeout(() => {
setState({ loading: false, alertMsg: "" });
@@ -252,7 +250,7 @@ const Signup = () => {
setState({
loading: false,
alertType: "danger",
- alertMsg: "You don't have access, please contact the admin."
+ alertMsg: t("do-not-access-contact-admin")
});
setTimeout(() => {
setState({ loading: false, alertMsg: "" });
@@ -265,7 +263,7 @@ const Signup = () => {
setState({
loading: false,
alertType: "danger",
- alertMsg: "You don't have access, please contact the admin."
+ alertMsg: t("do-not-access-contact-admin")
});
setTimeout(() => {
setState({ loading: false, alertMsg: "" });
diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js
index c58708e85..e923f46bc 100644
--- a/apps/OpenSign/src/pages/SignyourselfPdf.js
+++ b/apps/OpenSign/src/pages/SignyourselfPdf.js
@@ -997,7 +997,7 @@ function SignYourSelf() {
selector: '[data-tut="addWidgets"]',
content: () => (
<TourContentWithBtn
- message={`Select and drag your preferred widgets onto the PDF to customize your document before signing. Choose the perfect spots for each modification to tailor the document to your needs.`}
+ message={t("tour-mssg.signyour-self-2")}
isChecked={handleDontShow}
/>
),
@@ -1008,7 +1008,7 @@ function SignYourSelf() {
selector: '[data-tut="reactourSecond"]',
content: () => (
<TourContentWithBtn
- message={`Drag and drop anywhere in this area. You can resize and move it later.`}
+ message={t("tour-mssg.signyour-self-2")}
isChecked={handleDontShow}
/>
),
diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js
index 85500123e..44972863d 100644
--- a/apps/OpenSign/src/pages/TemplatePlaceholder.js
+++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js
@@ -778,7 +778,7 @@ const TemplatePlaceholder = () => {
setIsLoading(loadObj);
} catch (e) {
setIsLoading(false);
- alert("Something went wrong, please try again later.");
+ alert(t("something-went-wrong-mssg"));
console.log("error", e);
}
} else {
@@ -796,7 +796,7 @@ const TemplatePlaceholder = () => {
selector: '[data-tut="reactourAddbtn"]',
content: () => (
<TourContentWithBtn
- message={`Clicking "Add role" button will allow you to add various signer roles. You can attach users to each role in subsequent steps.`}
+ message={t("tour-mssg.template-placeholder-1")}
isChecked={handleDontShow}
/>
),
@@ -808,7 +808,7 @@ const TemplatePlaceholder = () => {
selector: '[data-tut="reactourFirst"]',
content: () => (
<TourContentWithBtn
- message={`Once roles are added, select a role from list to add a place-holder where he is supposed to sign. The placeholder will appear in the same colour as the role name once you drop it on the document.`}
+ message={t("tour-mssg.template-placeholder-2")}
isChecked={handleDontShow}
/>
),
@@ -820,7 +820,7 @@ const TemplatePlaceholder = () => {
selector: '[data-tut="addWidgets"]',
content: () => (
<TourContentWithBtn
- message={`Drag or click on a field to add it to the document.`}
+ message={t("tour-mssg.template-placeholder-3")}
isChecked={handleDontShow}
/>
),
@@ -831,7 +831,7 @@ const TemplatePlaceholder = () => {
selector: '[data-tut="reactourThird"]',
content: () => (
<TourContentWithBtn
- message={`Drag the placeholder for a role anywhere on the document.Remember, it will appear in the same colour as the name of the recipient for easy reference.`}
+ message={t("tour-mssg.template-placeholder-4")}
isChecked={handleDontShow}
/>
),
@@ -842,7 +842,7 @@ const TemplatePlaceholder = () => {
selector: '[data-tut="headerArea"]',
content: () => (
<TourContentWithBtn
- message={`Clicking ‘Next’ will store the current template. After saving, you’ll be prompted to create a new document from this template if you wish.`}
+ message={t("tour-mssg.template-placeholder-5")}
isChecked={handleDontShow}
/>
),
diff --git a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js
index bd4338878..e71dcb530 100644
--- a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js
+++ b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js
@@ -4,8 +4,9 @@ import Parse from "parse";
import { NavLink, useNavigate } from "react-router-dom";
import Alert from "../primitives/Alert";
import Title from "../components/Title";
-
+import { useTranslation } from "react-i18next";
const UpdateExistUserAdmin = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const [formdata, setFormdata] = useState({ email: "", masterkey: "" });
const [loader, setLoader] = useState(true);
@@ -41,19 +42,19 @@ const UpdateExistUserAdmin = () => {
);
// console.log("updateUserAsAdmin ", updateUserAsAdmin);
if (updateUserAsAdmin === "admin_created") {
- setIsAlert({ type: "success", msg: "Admin created" });
+ setIsAlert({ type: "success", msg: t("admin-created") });
navigate("/");
}
} catch (err) {
console.log("err in updateuserasadmin", err.code);
if (err.code === 404) {
- setIsAlert((prev) => ({ ...prev, msg: "Invalid masterkey" }));
+ setIsAlert((prev) => ({ ...prev, msg: t("invalid-masterkey") }));
} else if (err.code === 101) {
- setIsAlert((prev) => ({ ...prev, msg: "User not found" }));
+ setIsAlert((prev) => ({ ...prev, msg: t("user-not-found") }));
} else if (err.code === 137) {
- setIsAlert((prev) => ({ ...prev, msg: "Admin already exist" }));
+ setIsAlert((prev) => ({ ...prev, msg: t("admin-already-exist") }));
} else {
- setErrMsg("Something went wrong.");
+ setErrMsg(t("something-went-wrong-mssg"));
}
} finally {
setIsSubmitLoading(false);
@@ -64,7 +65,7 @@ const UpdateExistUserAdmin = () => {
};
return (
<div className="h-screen flex justify-center">
- <Title title={"Add Admin"} />
+ <Title title={t("add-admin")} />
{isAlert.msg && (
<Alert type={isAlert.type}>
<div className="ml-3">{isAlert.msg}</div>
@@ -90,7 +91,7 @@ const UpdateExistUserAdmin = () => {
</div>
)}
<h2 className="text-[30px] text-center mt-3 font-medium">
- Opensign Setup
+ {t("opensign-Setup")}
</h2>
<NavLink
to="https://discord.com/invite/xe9TDuyAyj"
@@ -98,7 +99,7 @@ const UpdateExistUserAdmin = () => {
rel="noopener noreferrer"
className="text-center text-sm mt-1 text-[blue] cursor-pointer"
>
- Join our discord server
+ {t("join-discord")}
<i
aria-hidden="true"
className="fa-brands fa-discord ml-1"
@@ -107,7 +108,8 @@ const UpdateExistUserAdmin = () => {
</NavLink>
<div className="px-6 py-3 text-xs">
<label>
- Email <span className="text-[red] text-[13px]">*</span>
+ {t("email")}{" "}
+ <span className="text-[red] text-[13px]">*</span>
</label>
<input
id="email"
@@ -124,7 +126,7 @@ const UpdateExistUserAdmin = () => {
/>
<hr className="my-2 border-none" />
<label>
- Master key{" "}
+ {t("master-key")}{" "}
<span className="text-[red] text-[13px]">*</span>
</label>
<input
@@ -163,7 +165,7 @@ const UpdateExistUserAdmin = () => {
className="op-btn op-btn-primary w-full"
disabled={loader}
>
- {loader ? "Loading..." : "Next"}
+ {loader ? t("loading") : t("next")}
</button>
</div>
</div>
diff --git a/apps/OpenSign/src/pages/UserProfile.js b/apps/OpenSign/src/pages/UserProfile.js
index 8accaa439..4e69dbb56 100644
--- a/apps/OpenSign/src/pages/UserProfile.js
+++ b/apps/OpenSign/src/pages/UserProfile.js
@@ -94,7 +94,7 @@ function UserProfile() {
setIsLoader(false);
}
} catch (e) {
- alert("something went wrong!");
+ alert(t("something-went-wrong-mssg"));
}
}
};
@@ -148,14 +148,14 @@ function UserProfile() {
Name: res.name,
Phone: res?.phone || ""
});
- alert("Profile updated successfully.");
+ alert(t("profile-update-alert"));
setEditMode(false);
setIsLoader(false);
//navigate("/dashboard/35KBoSgoAK");
}
},
(error) => {
- alert("Something went wrong.");
+ alert(t("something-went-wrong-mssg"));
console.error("Error while updating tour", error);
setIsLoader(false);
}
@@ -290,7 +290,7 @@ function UserProfile() {
setOtpLoader(true);
await handleSendOTP();
setOtpLoader(false);
- alert("OTP sent on you email");
+ alert(t("otp-sent-alert"));
};
//function to handle onchange username and restrict 6-characters username for free users
const handleOnchangeUserName = (e) => {
diff --git a/apps/OpenSign/src/pages/Webhook.js b/apps/OpenSign/src/pages/Webhook.js
index b9dc45c3f..a9bff7f54 100644
--- a/apps/OpenSign/src/pages/Webhook.js
+++ b/apps/OpenSign/src/pages/Webhook.js
@@ -11,12 +11,7 @@ import Loader from "../primitives/Loader";
import SubscribeCard from "../primitives/SubscribeCard";
import Tour from "reactour";
import { useTranslation } from "react-i18next";
-const tourSteps = [
- {
- selector: '[data-tut="webhooksubscribe"]',
- content: "Upgrade now to set webhook"
- }
-];
+
function Webhook() {
const { t } = useTranslation();
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
@@ -32,7 +27,12 @@ function Webhook() {
fetchWebhook();
// eslint-disable-next-line
}, []);
-
+ const tourSteps = [
+ {
+ selector: '[data-tut="webhooksubscribe"]',
+ content: t("tour-mssg.webhook-1")
+ }
+ ];
const fetchWebhook = async () => {
const email = Parse.User.current().getEmail();
if (isEnableSubscription) {