From 3db32979dc021db91c0fbc12f84786d308bea0bb Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Fri, 8 Nov 2024 21:05:39 +0530 Subject: [PATCH] refacotr: add translation message for warning --- apps/OpenSign/public/locales/en/translation.json | 1 + apps/OpenSign/public/locales/es/translation.json | 1 + apps/OpenSign/public/locales/fr/translation.json | 1 + apps/OpenSign/src/components/pdf/WidgetNameModal.js | 4 ++-- apps/OpenSign/src/json/plansArr.js | 12 ++++++------ apps/OpenSign/src/pages/Preferences.js | 4 ++-- apps/OpenSign/src/script/locales/en/translation.json | 1 + apps/OpenSign/src/script/locales/es/translation.json | 1 + apps/OpenSign/src/script/locales/fr/translation.json | 1 + .../cloud/parsefunction/updatesignaturetype.js | 2 +- 10 files changed, 17 insertions(+), 11 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 6e3405ccc..0b9217331 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -689,6 +689,7 @@ "attach-signer-tour":"You need to attach a Signer to every role. You can do that by clicking this icon. Once you select a Signer it will be attached to all the fields associated with that role which appear in the same colour.", "allowed-signature-types": "Allowed signature types", "at-least-one-signature-type": "At least one signature type should be enabled.", + "expect-default-one-more-signature-type": "Please enable one additional signature type apart from the default.", "add-signer-note": "Note - This contact will be added to your contact list", "allowed-signature-types-help": { "p1": "This signature preference controls which signing options are available to your signers. Only the signature types you select will appear in the signature widget when a document is signed. For example, if you choose only the 'Draw' option in preferences, your signer will see only the 'Draw' option in the signature widget, while the other three options will not be available.", diff --git a/apps/OpenSign/public/locales/es/translation.json b/apps/OpenSign/public/locales/es/translation.json index cc177fd8b..8364906c7 100644 --- a/apps/OpenSign/public/locales/es/translation.json +++ b/apps/OpenSign/public/locales/es/translation.json @@ -689,6 +689,7 @@ "attach-signer-tour" :"Debe adjuntar un firmante a cada función. Puede hacerlo haciendo clic en este icono. Una vez que seleccione un Firmante, se adjuntará a todos los campos asociados con ese rol que aparecen en el mismo color.", "allowed-signature-types": "Tipos de firma permitidos", "at-least-one-signature-type": "Se debe habilitar al menos un tipo de firma.", + "expect-default-one-signature-type": "Habilite un tipo de firma adicional aparte del predeterminado.", "add-signer-note": "Nota - Este contacto se agregará a su lista de contactos", "allowed-signature-types-help": { "p1": "Esta preferencia de firma controla qué opciones de firma están disponibles para sus firmantes. Solo los tipos de firma que seleccione aparecerán en el widget de firma cuando se firme un documento. Por ejemplo, si elige sólo la opción 'Draw' en las preferencias, su firmante verá sólo la opción 'Draw' en el widget de firma, mientras que las otras tres opciones no estarán disponibles.", diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 54d00e9d7..0d7085191 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -688,6 +688,7 @@ "attach-signer-tour" :"Vous devez associer un signataire à chaque rôle. Vous pouvez le faire en cliquant sur cette icône. Une fois que vous avez sélectionné un signataire, il sera attaché à tous les champs associés à ce rôle qui apparaissent dans la même couleur.", "allowed-signature-types": "Types de signature autorisés", "at-least-one-signature-type": "Au moins un type de signature doit être activé.", + "expect-default-one-signature-type": "Veuillez activer un type de signature supplémentaire en plus de celui par défaut.", "add-signer-note": "Remarque - Ce contact sera ajouté à votre liste de contacts", "allowed-signature-types-help": { "p1": "Cette préférence de signature contrôle les options de signature disponibles pour vos signataires. Seuls les types de signature que vous sélectionnez apparaîtront dans le widget de signature lorsqu'un document est signé. Par exemple, si vous choisissez uniquement l'option 'Draw' dans les préférences, votre signataire ne verra que l'option 'Draw' dans le widget de signature, tandis que les trois autres options ne seront pas disponibles.", diff --git a/apps/OpenSign/src/components/pdf/WidgetNameModal.js b/apps/OpenSign/src/components/pdf/WidgetNameModal.js index c6000505b..f20acf7a4 100644 --- a/apps/OpenSign/src/components/pdf/WidgetNameModal.js +++ b/apps/OpenSign/src/components/pdf/WidgetNameModal.js @@ -62,9 +62,9 @@ const WidgetNameModal = (props) => { enabledSignTypes?.length === 1 && enabledSignTypes[0]?.name === "default"; if (enabledSignTypes.length === 0) { - alert("Please enable at least one signature type"); + alert(t("at-least-one-signature-type")); } else if (isDefaultSignTypeOnly) { - alert("Please enable one more signature type other than default"); + alert(t("expect-default-one-more-signature-type")); } else { const data = { ...formdata, signatureType }; props.handleData(data, props.defaultdata?.type); diff --git a/apps/OpenSign/src/json/plansArr.js b/apps/OpenSign/src/json/plansArr.js index d66116367..337338fb2 100644 --- a/apps/OpenSign/src/json/plansArr.js +++ b/apps/OpenSign/src/json/plansArr.js @@ -63,10 +63,10 @@ const plans = [ subtitle: "Exclusive Access to advanced features.", btn: { text: "Subscribe", color: "op-btn-primary" }, url: isStaging - ? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328dd84ecda20eeae13878ce581d60240f206/pro-weekly" + ? "https://billing.zohosecure.in/subscribe/9627f62a09df1c8ce500f2f4dc8328dd84ecda20eeae13878ce581d60240f206/pro-weekly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d1a09dfa8085585cdd4ec4d7f32137f3/professional-monthly", yearlyUrl: isStaging - ? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328ddc184411129224f1f29ed84f6cef3b862/pro-yearly" + ? "https://billing.zohosecure.in/subscribe/9627f62a09df1c8ce500f2f4dc8328ddc184411129224f1f29ed84f6cef3b862/pro-yearly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d8ad1135190dff951330360e47585a71/professional-yearly", target: "_self", benefits: [ @@ -114,10 +114,10 @@ const plans = [ subtitle: "Exclusive Access to advanced features.", btn: { text: "Subscribe", color: "op-btn-accent" }, url: isStaging - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly" + ? "https://billing.zohosecure.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901237d0702bfaa959406306635d80f138c/teams-monthly", yearlyUrl: isStaging - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly" + ? "https://billing.zohosecure.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af9011a864994bbeeec71fcf106188630199d/teams-yearly", target: "_self", benefits: [ @@ -239,10 +239,10 @@ export const paidUrl = (plan) => { } const url = { monthly: isStaging - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly" + ? "https://billing.zohosecure.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901237d0702bfaa959406306635d80f138c/teams-monthly", yearly: isStaging - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly" + ? "https://billing.zohosecure.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly" : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af9011a864994bbeeec71fcf106188630199d/teams-yearly" }; diff --git a/apps/OpenSign/src/pages/Preferences.js b/apps/OpenSign/src/pages/Preferences.js index 9c2438228..7968e2fe7 100644 --- a/apps/OpenSign/src/pages/Preferences.js +++ b/apps/OpenSign/src/pages/Preferences.js @@ -75,12 +75,12 @@ const Preferences = () => { if (enabledSignTypes.length === 0) { setIsAlert({ type: "danger", - msg: "Please enable at least one signature type" + msg: t("at-least-one-signature-type") }); } else if (isDefaultSignTypeOnly) { setIsAlert({ type: "danger", - msg: "Please enable one more signature type other than default" + msg: t("expect-default-one-more-signature-type") }); } else { try { diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index 30c9c49ca..ec7ba9fc3 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -689,6 +689,7 @@ "attach-signer-tour": "You need to attach a Signer to every role. You can do that by clicking this icon. Once you select a Signer it will be attached to all the fields associated with that role which appear in the same colour.", "allowed-signature-types": "Allowed signature types", "at-least-one-signature-type": "At least one signature type should be enabled.", + "expect-default-one-signature-type": "Please enable one additional signature type apart from the default.", "add-signer-note": "Note - This contact will be added to your contact list", "allowed-signature-types-help": { "p1": "This signature preference controls which signing options are available to your signers. Only the signature types you select will appear in the signature widget when a document is signed. For example, if you choose only the 'Draw' option in preferences, your signer will see only the 'Draw' option in the signature widget, while the other three options will not be available.", diff --git a/apps/OpenSign/src/script/locales/es/translation.json b/apps/OpenSign/src/script/locales/es/translation.json index ee0635040..696e49a6f 100644 --- a/apps/OpenSign/src/script/locales/es/translation.json +++ b/apps/OpenSign/src/script/locales/es/translation.json @@ -689,6 +689,7 @@ "attach-signer-tour": "Debe adjuntar un firmante a cada función. Puede hacerlo haciendo clic en este icono. Una vez que seleccione un Firmante, se adjuntará a todos los campos asociados con ese rol que aparecen en el mismo color.", "allowed-signature-types": "Tipos de firma permitidos", "at-least-one-signature-type": "Se debe habilitar al menos un tipo de firma.", + "expect-default-one-signature-type": "Habilite un tipo de firma adicional aparte del predeterminado.", "add-signer-note": "Nota - Este contacto se agregará a su lista de contactos", "allowed-signature-types-help": { "p1": "Esta preferencia de firma controla qué opciones de firma están disponibles para sus firmantes. Solo los tipos de firma que seleccione aparecerán en el widget de firma cuando se firme un documento. Por ejemplo, si elige sólo la opción 'Draw' en las preferencias, su firmante verá sólo la opción 'Draw' en el widget de firma, mientras que las otras tres opciones no estarán disponibles.", diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index 5f77219a2..de52806f3 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -688,6 +688,7 @@ "attach-signer-tour": "Vous devez associer un signataire à chaque rôle. Vous pouvez le faire en cliquant sur cette icône. Une fois que vous avez sélectionné un signataire, il sera attaché à tous les champs associés à ce rôle qui apparaissent dans la même couleur.", "allowed-signature-types": "Types de signature autorisés", "at-least-one-signature-type": "Au moins un type de signature doit être activé.", + "expect-default-one-signature-type": "Veuillez activer un type de signature supplémentaire en plus de celui par défaut.", "add-signer-note": "Remarque - Ce contact sera ajouté à votre liste de contacts", "allowed-signature-types-help": { "p1": "Cette préférence de signature contrôle les options de signature disponibles pour vos signataires. Seuls les types de signature que vous sélectionnez apparaîtront dans le widget de signature lorsqu'un document est signé. Par exemple, si vous choisissez uniquement l'option 'Draw' dans les préférences, votre signataire ne verra que l'option 'Draw' dans le widget de signature, tandis que les trois autres options ne seront pas disponibles.", diff --git a/apps/OpenSignServer/cloud/parsefunction/updatesignaturetype.js b/apps/OpenSignServer/cloud/parsefunction/updatesignaturetype.js index 0f53706aa..5d5109498 100644 --- a/apps/OpenSignServer/cloud/parsefunction/updatesignaturetype.js +++ b/apps/OpenSignServer/cloud/parsefunction/updatesignaturetype.js @@ -16,7 +16,7 @@ export default async function updateSignatureType(request) { } else if (isDefaultSignTypeOnly) { throw new Parse.Error( Parse.Error.INVALID_QUERY, - 'Please enable one more signature type other than default.' + 'At least one signature type other than the default should be enabled.' ); } else { try {