Localize envelope sharing UI and messages
Replaced hardcoded German text in the envelope sharing UI and JavaScript alerts with localized resource strings for German, English, and French. Added new translations for labels, prompts, and error/success messages. Improved internationalization and user experience by making the sharing feature fully language-aware.
This commit is contained in:
@@ -285,4 +285,40 @@
|
||||
<data name="DocumentSignedConfirmationMessage" xml:space="preserve">
|
||||
<value>Sie haben das Dokument signiert. Im Anschluss erhalten Sie eine schriftliche Bestätigung.</value>
|
||||
</data>
|
||||
<data name="Signatures" xml:space="preserve">
|
||||
<value>Unterschriften</value>
|
||||
</data>
|
||||
<data name="EnterRecipientToShareDocument" xml:space="preserve">
|
||||
<value>Geben Sie hier den Empfänger ein, mit welchem Sie das Dokument teilen wollen</value>
|
||||
</data>
|
||||
<data name="Email" xml:space="preserve">
|
||||
<value>E-Mail</value>
|
||||
</data>
|
||||
<data name="ValidUntil" xml:space="preserve">
|
||||
<value>Gültig bis</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailTitle" xml:space="preserve">
|
||||
<value>Falsche Email</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailText" xml:space="preserve">
|
||||
<value>Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com.</value>
|
||||
</data>
|
||||
<data name="ShrEnvSentTitle" xml:space="preserve">
|
||||
<value>Gesendet</value>
|
||||
</data>
|
||||
<data name="ShrEnvErrorTitle" xml:space="preserve">
|
||||
<value>Fehler</value>
|
||||
</data>
|
||||
<data name="InvalidDateTitle" xml:space="preserve">
|
||||
<value>Falsches Datum</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidDateText" xml:space="preserve">
|
||||
<value>Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com.</value>
|
||||
</data>
|
||||
<data name="UnexpectedErrorTitle" xml:space="preserve">
|
||||
<value>Unerwarteter Fehler</value>
|
||||
</data>
|
||||
<data name="ShrEnvOperationFailedText" xml:space="preserve">
|
||||
<value>Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -285,4 +285,40 @@
|
||||
<data name="DocumentSignedConfirmationMessage" xml:space="preserve">
|
||||
<value>You have signed the document. Afterwards, you will receive a written confirmation.</value>
|
||||
</data>
|
||||
<data name="Signatures" xml:space="preserve">
|
||||
<value>Signatures</value>
|
||||
</data>
|
||||
<data name="EnterRecipientToShareDocument" xml:space="preserve">
|
||||
<value>Enter the recipient you want to share the document with</value>
|
||||
</data>
|
||||
<data name="Email" xml:space="preserve">
|
||||
<value>E-mail</value>
|
||||
</data>
|
||||
<data name="ValidUntil" xml:space="preserve">
|
||||
<value>Valid until</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailTitle" xml:space="preserve">
|
||||
<value>Invalid email</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailText" xml:space="preserve">
|
||||
<value>The email address is invalid. Please use the correct format, e.g., user@mail.com.</value>
|
||||
</data>
|
||||
<data name="ShrEnvSentTitle" xml:space="preserve">
|
||||
<value>Sent</value>
|
||||
</data>
|
||||
<data name="ShrEnvErrorTitle" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="InvalidDateTitle" xml:space="preserve">
|
||||
<value>Invalid date</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidDateText" xml:space="preserve">
|
||||
<value>The email address is invalid. Please use the correct format, e.g., user@mail.com.</value>
|
||||
</data>
|
||||
<data name="UnexpectedErrorTitle" xml:space="preserve">
|
||||
<value>Unexpected error</value>
|
||||
</data>
|
||||
<data name="ShrEnvOperationFailedText" xml:space="preserve">
|
||||
<value>The operation failed. Please contact the IT team.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -285,4 +285,40 @@
|
||||
<data name="DocumentSignedConfirmationMessage" xml:space="preserve">
|
||||
<value>Vous avez signé le document. Vous recevrez ensuite une confirmation écrite.</value>
|
||||
</data>
|
||||
<data name="Signatures" xml:space="preserve">
|
||||
<value>Signatures</value>
|
||||
</data>
|
||||
<data name="EnterRecipientToShareDocument" xml:space="preserve">
|
||||
<value>Saisissez ici le destinataire avec lequel vous souhaitez partager le document</value>
|
||||
</data>
|
||||
<data name="Email" xml:space="preserve">
|
||||
<value>E-mail</value>
|
||||
</data>
|
||||
<data name="ValidUntil" xml:space="preserve">
|
||||
<value>Valable jusqu'au</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailTitle" xml:space="preserve">
|
||||
<value>E-mail incorrect</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidEmailText" xml:space="preserve">
|
||||
<value>L'adresse e-mail est invalide. Veuillez utiliser le format correct, par ex. : user@mail.com.</value>
|
||||
</data>
|
||||
<data name="ShrEnvSentTitle" xml:space="preserve">
|
||||
<value>Envoyé</value>
|
||||
</data>
|
||||
<data name="ShrEnvErrorTitle" xml:space="preserve">
|
||||
<value>Erreur</value>
|
||||
</data>
|
||||
<data name="InvalidDateTitle" xml:space="preserve">
|
||||
<value>Date invalide</value>
|
||||
</data>
|
||||
<data name="ShrEnvInvalidDateText" xml:space="preserve">
|
||||
<value>L'adresse e-mail est invalide. Veuillez utiliser le format correct, par ex. : user@mail.com.</value>
|
||||
</data>
|
||||
<data name="UnexpectedErrorTitle" xml:space="preserve">
|
||||
<value>Erreur inattendue</value>
|
||||
</data>
|
||||
<data name="ShrEnvOperationFailedText" xml:space="preserve">
|
||||
<value>L'opération a échoué. Veuillez contacter l'équipe informatique.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="progress-container">
|
||||
<div id="signed-count-bar" class="progress"></div>
|
||||
<span class="progress-text">
|
||||
<span id="signed-count">0</span>/<span id="signature-count">@signatureCount</span> Unterschriften
|
||||
<span id="signed-count">0</span>/<span id="signature-count">@signatureCount</span> @_localizer["Signatures"]
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
@@ -104,16 +104,16 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<small class="modal-title text-body-secondary" id="shareBackdropLabel">Geben Sie hier den Empfänger ein, mit welchem Sie das Dokument teilen wollen:</small>
|
||||
<small class="modal-title text-body-secondary" id="shareBackdropLabel">@_localizer["EnterRecipientToShareDocument"]:</small>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">E-Mail</span>
|
||||
<span class="input-group-text">@_localizer["Email"]</span>
|
||||
<input type="text" class="form-control email-input" placeholder="user@mail.com" id="readonly-receiver-mail" aria-label="">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Gültig bis</span>
|
||||
<span class="input-group-text">@_localizer["ValidUntil"]</span>
|
||||
<input type="date" name="expiration" class="form-control" lang="de" id="readonly-date-valid" onkeydown="return false;" onclick="this.showPicker()"
|
||||
min="@DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")"
|
||||
max="@DateTime.Today.AddDays(90).ToString("yyyy-MM-dd")"
|
||||
@@ -142,13 +142,24 @@
|
||||
|
||||
const receiverMail_value = receiverMail.value;
|
||||
const dateValid_value = dateValid.value;
|
||||
|
||||
const shrEnvLocalizedTexts = {
|
||||
invalidEmailTitle: '@_localizer["ShrEnvInvalidEmailTitle"]',
|
||||
invalidEmailText: '@_localizer["ShrEnvInvalidEmailText"]',
|
||||
invalidDateTitle: '@_localizer["ShrEnvInvalidDateTitle"]',
|
||||
invalidDateText: '@_localizer["ShrEnvInvalidDateText"]',
|
||||
sentTitle: '@_localizer["ShrEnvSentTitle"]',
|
||||
errorTitle: '@_localizer["ShrEnvErrorTitle"]',
|
||||
unexpectedErrorTitle: '@_localizer["UnexpectedErrorTitle"]',
|
||||
operationFailedText: '@_localizer["ShrEnvOperationFailedText"]'
|
||||
};
|
||||
|
||||
//check email
|
||||
if (!receiverMail_value || receiverMail.classList.contains('is-invalid')) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Falsche Email",
|
||||
text: "Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."
|
||||
title: shrEnvLocalizedTexts.invalidEmailTitle,
|
||||
text: shrEnvLocalizedTexts.invalidEmailText
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -158,8 +169,8 @@
|
||||
if (new Date(dateValid_value) < tomorrow) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Falsches Datum",
|
||||
text: "Die Verteilung der Umschläge sollte mindestens einen Tag dauern."
|
||||
title: shrEnvLocalizedTexts.invalidDateTitle,
|
||||
text: shrEnvLocalizedTexts.invalidDateText
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -168,23 +179,23 @@
|
||||
.then(res => {
|
||||
if (res.ok) {
|
||||
Swal.fire({
|
||||
title: "Gesendet",
|
||||
title: shrEnvLocalizedTexts.sentTitle,
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
else {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: `Fehler ${res.status}`,
|
||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||
title: `${shrEnvLocalizedTexts.errorTitle} ${res.status}`,
|
||||
text: shrEnvLocalizedTexts.operationFailedText
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Unerwarteter Fehler",
|
||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||
title: shrEnvLocalizedTexts.unexpectedErrorTitle,
|
||||
text: shrEnvLocalizedTexts.operationFailedText
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user