Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Integrate language support for multiple languages in the application #1019

Merged
merged 19 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bed2a77
feat: implement feature of multisupport language
raktima-opensignlabs Jul 29, 2024
77cd52c
feat: appply multi-support language functionality on login,signup-pag…
raktima-opensignlabs Jul 30, 2024
779d5df
feat: appply multi-support language functionality on report, managesi…
raktima-opensignlabs Jul 30, 2024
c6e93cd
feat: apply multisupport language for signing flow in signyour-self, …
raktima-opensignlabs Jul 31, 2024
d546d5d
feat: apply multisupport language for all type alert, buttons and tou…
raktima-opensignlabs Aug 1, 2024
dfcb4fe
refactor-code
raktima-opensignlabs Aug 1, 2024
6d31314
fix: implement feature to detect lagunage from browser, resolve conflict
raktima-opensignlabs Aug 2, 2024
10083ac
fix: detect from browser's language and set it in dropdown by default
raktima-opensignlabs Aug 2, 2024
4c7d771
fix: apply language support in profile also and save in database, iss…
raktima-opensignlabs Aug 6, 2024
dd85ce7
fix: after create new user selected language change in en-USA
raktima-opensignlabs Aug 6, 2024
841c7df
Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign in…
raktima-opensignlabs Aug 6, 2024
8d1be55
fix: input validation warning translation issue
raktima-opensignlabs Aug 7, 2024
c759d67
refactor code
raktima-opensignlabs Aug 7, 2024
89f4626
checking error
raktima-opensignlabs Aug 7, 2024
095e616
fix: refactor code
raktima-opensignlabs Aug 7, 2024
23c2b4b
fix: remove console
raktima-opensignlabs Aug 7, 2024
eb345b5
fix: after filled any input value still show warning of empty field
raktima-opensignlabs Aug 7, 2024
74792a9
refactor code
raktima-opensignlabs Aug 7, 2024
d74dc2f
fix:improve readability by updating some French words
raktima-opensignlabs Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: appply multi-support language functionality on report, managesi…
…gn, webhook,api token
  • Loading branch information
raktima-opensignlabs committed Jul 30, 2024
commit 779d5df2644ffc8ad5cf2cd0ec33b8678e9880f8
71 changes: 68 additions & 3 deletions apps/OpenSign/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,17 @@
"Note": "Note",
"Folder": "Folder",
"Reason": "Reason"

},
},
"report-help":{
"Draft Documents": "These are documents you have started but have not finalized for sending.",
"Need your sign":"This is a list of documents that are waiting for your signature",
"In-progress documents": "This is a list of documents you've sent to other parties for signature.",
"Completed Documents":"This is a list of documents that have been signed by all parties.",
"Declined Documents": "This is a list of documents that have been declined by one of the signers.",
"Expired Documents":"This is a list of documents that have reached their expiration date.",
"Contactbook":"This is a list of contacts/signers added by you. These will appear as suggestions when you try to add signers to a new document.",
"Templates" :"This is a list of templates that are available to you for creating documents. You can click the 'use' button to create a new document using a template, modify the document & add signers in the next step."
},
"form-name":{
"Sign Yourself":"Sign Yourself",
"Request Signatures":"Request Signatures",
Expand All @@ -119,7 +128,63 @@
"no":"No",
"auto-reminder":"Auto reminder",
"remind-once":" Remind once in every (Days)",
"next":"Next"
"next":"Next",
"select-folder":"Select Folder",
"OpenSign-drive":"OpenSign™ Drive",
"select-folder-help" :"If you do not select a folder, your signed document will be saved in the Main OpenSign drive folder.",
"no-data":"No data found",
"save-here":"Save Here",
"back":"Back",
"add-folder":"Add folder",
"create-folder":"Create Folder",
"parent-folder":"Parent Folder",
"create":"Create",
"Signers":"Signers",
"signers-help":"Begin typing a contact's name to see suggested signers from your saved contacts or add new ones. Arrange the signing order by adding signers in the desired sequence. Use the '+' button to include signers and the 'x' to remove them. Each signer will receive an email prompt to sign the document in the order listed.",
"add-signer":"Add Signer",
"contact-not-found":"Contact not found",
"add-yourself":"Add Yourself",
"submit":"Submit",
"reset":"Reset",
"my-signature":"My Signature",
"signature":"Signature",
"upload-image":" Upload image",
"clear":"Clear",
"upload-signature/Image":"Please upload signature/Image",
"initials":"Initials",
"API" :"API",
"api-token":"API Token",
"regenerate-token":"Regenerate Token",
"generate-token":"Generate Token",
"view-docs":"View Docs",
"generate-token-alert" :"Are you sure you want to regenerate token it will expire old token?",
"yes":"Yes",
"copied":"Copied",
"wrong-mssg":"Something went wrong.",
"token-generated":"Token generated successfully.",
"webhook":"Webhook",
"update-webhook":"Update Webhook",
"add-webhook":"Add Webhook",
"webhook-added" :"Webhook added successfully.",
"document-signature":{
"loader":" This might take some time",
"pages":"Pages",
"document-signed":"Document signed",
"close":"Close",
"validation-alert":"Validation alert",
"validate-alert-mssg" :" The input does not meet the criteria set by the regular expression.",
"otp-verification":"OTP verification",
"enter-otp":"Enter OTP",
"verify":"Verify",
"resend":"Resend",
"verify-email":"Please verify your email !",
"send-otp":" Send OTP",
"otp-placeholder":"Enter OTP received over email",
"loading-doc":"Loading Document.."
}






Expand Down
68 changes: 66 additions & 2 deletions apps/OpenSign/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"create-account": "Créer un compte",
"login": "se connecter",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"login": "Se Connecter",

"language":"Langue",
Expand Down Expand Up @@ -96,6 +96,16 @@
"Folder":"Dossier",
"Reason": "Raison"
},
"report-help":{
"Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.",
"Need your sign": "Voici une liste de documents qui attendent votre signature",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Need your sign": "Voici une liste de documents ou votre signature est requise",

"In-progress documents": "Il s'agit d'une liste de documents que vous avez envoyés à d'autres parties pour signature.",
"Completed Documents": "Il s'agit d'une liste de documents signés par toutes les parties.",
"Declined Documents": "Il s'agit d'une liste de documents qui ont été refusés par l'un des signataires.",
"Expired Documents": "Il s'agit d'une liste de documents qui ont atteint leur date d'expiration.",
"Contactbook": "Il s'agit d'une liste de contacts/signataires que vous avez ajoutés. Ceux-ci apparaîtront sous forme de suggestions lorsque vous tenterez d'ajouter des signataires à un nouveau document.",
"Templates" : "Il s'agit d'une liste de modèles à votre disposition pour créer des documents. Vous pouvez cliquer sur le bouton 'Utiliser' pour créer un nouveau document à l'aide d'un modèle, modifier le document et ajouter des signataires à l'étape suivante."
},
"form-name":{
"Sign Yourself":"Signez-vous",
"Request Signatures":"Demander des signatures",
Expand All @@ -118,8 +128,62 @@
"no":"Non",
"auto-reminder":"Rappel automatique",
"remind-once":"Rappeler une fois tous les (jours)",
"next":"suivant"
"next":"Suivant",
"select-folder" :"Sélectionner le dossier",
"OpenSign-drive":"Lecteur OpenSign™",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"OpenSign-drive":"Liste des Documents",

"select-folder-help" :"Si vous ne sélectionnez pas de dossier, votre document signé sera enregistré dans le dossier du lecteur principal OpenSign.",
"no-data" :"Aucune donnée disponible",
"save-here":"Enregistrer ici",
"back" :"Dos",
"add-folder" :"Ajouter le dossier",
"create-folder":"Créer le dossier",
"parent-folder" :"Dossier parent",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"parent-folder" :"Dossier Parent",

"create":"Créer",
"Signers" :"Signataires",
"signers-help" :"Commencez à saisir le nom d'un contact pour voir les signataires suggérés par vos contacts enregistrés ou en ajouter de nouveaux. Organisez l'ordre de signature en ajoutant des signataires dans l'ordre souhaité. Utilisez le bouton « + » pour inclure les signataires et le « x » pour les supprimer. Chaque signataire recevra un e-mail invité à signer le document dans l'ordre indiqué.",
"add-signer":"Ajouter un signataire",
"contact-not-found" :"Contact introuvable",
"add-yourself" :"Ajoutez-vous",
"submit" :"Soumettre",
"reset" :"Réinitialiser",
"my-signature" :"Ma signature",
"signature":"Signature",
"upload-image" :"Télécharger une image",
"clear" :"clair",
"upload-signature/Image" :"Veuillez télécharger la signature/l'image",
"initials" :"Initiales",
"API" :"API",
"api-token":"Jeton API",
"regenerate-token":"Régénérer le jeton",
"generate-token" :"Générer un jeton",
"view-docs" :"Afficher les documents" ,
"generate-token-alert" :"Êtes-vous sûr de vouloir régénérer le jeton, il expirera à l'ancienne jeton?",
"yes" :"Oui",
"copied" :"Copié",
"wrong-mssg" :"Quelque chose s'est mal passé.",
"token-generated" :"Jeton généré avec succès.",
"webhook":"Webhook",
"update-webhook" :"Mettre à jour le webhook",
"add-webhook" :"Ajouter un webhook",
"webhook-added" :"Webhook ajouté avec succès.",

"document-signature":{
"loader":"Cela pourrait prendre un certain temps",
"pages":"Pages",
"document-signed":"Document signé",
"close":"Close",
"validation-alert":"Alerte de validation",
"validate-alert-mssg" :"L'entrée ne répond pas aux critères définis par l'expression régulière.",
"otp-verification":"Vérification OTP",
"enter-otp":"Entrez OTP",
"verify":"Vérifier",
"resend":"Renvoyer",
"verify-email":"Veuillez vérifier votre email!",
"send-otp":"Envoyer OTP",
"otp-placeholder":"Saisissez l'OTP reçu par e-mail",
"loading-doc":"Chargement du document.."
}


}

14 changes: 8 additions & 6 deletions apps/OpenSign/src/components/AddSigner.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React, { useState, useEffect } from "react";
import Parse from "parse";
import Loader from "../primitives/Loader";
import { useTranslation } from "react-i18next";

const AddSigner = (props) => {
const { t } = useTranslation();
const [name, setName] = useState("");
const [phone, setPhone] = useState("");
const [email, setEmail] = useState("");
Expand Down Expand Up @@ -214,14 +216,14 @@ const AddSigner = (props) => {
className="op-checkbox op-checkbox-sm"
/>
<label htmlFor="addYourself" className="ml-2 mb-0">
Add Yourself
{t("add-yourself")}
</label>
</div>
)}
<form onSubmit={handleSubmit}>
<div className="mb-3">
<label htmlFor="name" className="block text-xs font-semibold">
Name
{t("name")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
Expand All @@ -236,7 +238,7 @@ const AddSigner = (props) => {
</div>
<div className="mb-3">
<label htmlFor="email" className="block text-xs font-semibold">
Email
{t("email")}
<span className="text-[red] text-[13px]"> *</span>
</label>
<input
Expand All @@ -251,7 +253,7 @@ const AddSigner = (props) => {
</div>
<div className="mb-3">
<label htmlFor="phone" className="block text-xs font-semibold">
Phone
{t("phone")}
</label>
<input
type="text"
Expand All @@ -264,14 +266,14 @@ const AddSigner = (props) => {
</div>
<div className="mt-4 flex gap-x-2 justify-start">
<button type="submit" className="op-btn op-btn-primary">
Submit
{t("submit")}
</button>
<button
type="button"
onClick={() => handleReset()}
className="op-btn op-btn-secondary"
>
Reset
{t("reset")}
</button>
</div>
</form>
Expand Down
6 changes: 4 additions & 2 deletions apps/OpenSign/src/components/pdf/RenderAllPdfPage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Document, Page } from "react-pdf";
import { useSelector } from "react-redux";

Expand All @@ -13,6 +14,7 @@ function RenderAllPdfPage({
signerObjectId,
containerWH
}) {
const { t } = useTranslation();
const [signPageNumber, setSignPageNumber] = useState([]);
const [bookmarkColor, setBookmarkColor] = useState("");
//set all number of pages after load pdf
Expand Down Expand Up @@ -67,14 +69,14 @@ function RenderAllPdfPage({
return (
<div ref={pageContainer} className="hidden w-[20%] bg-base-100 md:block">
<div className="mx-2 pr-2 pt-2 pb-1 text-[15px] text-base-content font-semibold border-b-[1px] border-base-300">
Pages
{t("document-signature.pages")}
</div>
<div
className={`flex h-[90%] flex-col items-center m-2
autoSignScroll hide-scrollbar max-h-[100vh] `}
>
<Document
loading={"Loading Document.."}
loading={t("document-signature.loading-doc")}
onLoadSuccess={onDocumentLoad}
file={signPdfUrl}
>
Expand Down
16 changes: 9 additions & 7 deletions apps/OpenSign/src/components/pdf/VerifyEmail.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import React from "react";
import Loader from "../../primitives/Loader";
import { useTranslation } from "react-i18next";

function VerifyEmail(props) {
const { t } = useTranslation();
return (
<dialog className="op-modal op-modal-open absolute z-[1999]">
<div className="md:w-[40%] w-[80%] op-modal-box p-0 overflow-y-auto hide-scrollbar text-sm">
<h3 className="font-bold text-lg pt-[15px] px-[20px] text-base-content">
OTP verification
{t("document-signature.otp-verification")}
</h3>
{props.isVerifyModal ? (
<form
Expand All @@ -16,26 +18,26 @@ function VerifyEmail(props) {
}}
>
<div className="px-6 py-3 text-base-content">
<label className="mb-2">Enter OTP</label>
<label className="mb-2">{t("enter-otp")}</label>
<input
required
type="tel"
pattern="[0-9]{4}"
className="w-full op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content text-xs"
placeholder="Enter OTP received over email"
placeholder={t("otp-placeholder")}
value={props.otp}
onChange={(e) => props.setOtp(e.target.value)}
/>
</div>
<div className="px-6 my-3">
<button type="submit" className="op-btn op-btn-primary">
Verify
{t("document-signature.verify")}
</button>
<button
className="op-btn op-btn-secondary ml-2"
onClick={(e) => props.handleResend(e)}
>
Resend
{t("document-signature.resend")}
</button>
</div>
</form>
Expand All @@ -45,7 +47,7 @@ function VerifyEmail(props) {
</div>
) : (
<div className="px-6 py-3 text-base-content">
<p className="mb-2 text-sm">Please verify your email !</p>
<p className="mb-2 text-sm">{t("verify-email")}</p>
<div className="px-0 mt-3">
<button
className="op-btn op-btn-primary"
Expand All @@ -54,7 +56,7 @@ function VerifyEmail(props) {
props.handleVerifyBtn();
}}
>
Send OTP
{t("document-signature.send-otp")}
</button>
</div>
</div>
Expand Down
13 changes: 9 additions & 4 deletions apps/OpenSign/src/components/shared/fields/CreateFolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import React, { useEffect, useState } from "react";
import Parse from "parse";
import Alert from "../../../primitives/Alert";
import Loader from "../../../primitives/Loader";
import { useTranslation } from "react-i18next";

const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
const folderPtr = {
__type: "Pointer",
className: folderCls,
objectId: parentFolderId
};
const { t } = useTranslation();
const [name, setName] = useState("");
const [folderList, setFolderList] = useState([]);
const [isAlert, setIsAlert] = useState(false);
Expand Down Expand Up @@ -120,10 +122,13 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
<Loader />
</div>
)}
<h1 className="text-base font-semibold mt-[0.4rem]">Create Folder</h1>
<h1 className="text-base font-semibold mt-[0.4rem]">
{t("create-folder")}
</h1>
<div className="text-xs mt-2">
<label className="block">
Name<span className="text-red-500 text-[13px]">*</span>
{t("name")}
<span className="text-red-500 text-[13px]">*</span>
</label>
<input
className="op-input op-input-bordered op-input-sm focus:outline-none hover:border-base-content w-full text-xs"
Expand All @@ -133,7 +138,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
/>
</div>
<div className="text-xs mt-2">
<label className="block">Parent Folder</label>
<label className="block">{t("parent-folder")}</label>
<select
value={selectedParent}
onChange={handleOptions}
Expand All @@ -155,7 +160,7 @@ const CreateFolder = ({ parentFolderId, onSuccess, folderCls }) => {
className="op-btn op-btn-primary op-btn-sm mt-3"
>
<i className="fa-light fa-plus"></i>
<span>Create</span>
<span>{t("create")}</span>
</button>
</div>
</div>
Expand Down
Loading