Skip to content

Commit

Permalink
[ADF-5557] add missing i18n resources for library membership directive (
Browse files Browse the repository at this point in the history
#8806)

* ADF-5557 add missing i18n resources for library membership directive

* ADF-5557 change i18n key naming in moved resources
  • Loading branch information
g-jaskowski committed Aug 11, 2023
1 parent 57ff885 commit 6cb881e
Show file tree
Hide file tree
Showing 19 changed files with 267 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ describe('LibraryMembershipDirective', () => {
const testData = [
{
fixture: 'Failed to resolve sender mail address',
expected: 'APP.MESSAGES.ERRORS.INVALID_SENDER_EMAIL'
expected: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_SENDER_EMAIL'
},
{
fixture: 'All recipients for the mail action were invalid',
expected: 'APP.MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL'
expected: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL'
}
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ export class LibraryMembershipDirective implements OnChanges {
const info = {
updatedEntry: this.targetSite,
shouldReload: false,
i18nKey: 'APP.MESSAGES.INFO.JOIN_CANCELED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.INFO.JOIN_CANCELED'
};
this.toggle.emit(info);
},
(error) => {
const errWithMessage = {
error,
i18nKey: 'APP.MESSAGES.ERRORS.JOIN_CANCEL_FAILED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.JOIN_CANCEL_FAILED'
};
this.error.emit(errWithMessage);
}
Expand All @@ -118,32 +118,32 @@ export class LibraryMembershipDirective implements OnChanges {
if (createdMembership.entry && createdMembership.entry.site && createdMembership.entry.site.role) {
const info = {
shouldReload: true,
i18nKey: 'APP.MESSAGES.INFO.JOINED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.INFO.JOINED'
};
this.toggle.emit(info);
} else {
const info = {
updatedEntry: this.targetSite,
shouldReload: false,
i18nKey: 'APP.MESSAGES.INFO.JOIN_REQUESTED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.INFO.JOIN_REQUESTED'
};
this.toggle.emit(info);
}
},
(error) => {
const errWithMessage = {
error,
i18nKey: 'APP.MESSAGES.ERRORS.JOIN_REQUEST_FAILED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.JOIN_REQUEST_FAILED'
};

const senderEmailCheck = 'Failed to resolve sender mail address';
const receiverEmailCheck = 'All recipients for the mail action were invalid';

if (error.message) {
if (error.message.includes(senderEmailCheck)) {
errWithMessage.i18nKey = 'APP.MESSAGES.ERRORS.INVALID_SENDER_EMAIL';
errWithMessage.i18nKey = 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_SENDER_EMAIL';
} else if (error.message.includes(receiverEmailCheck)) {
errWithMessage.i18nKey = 'APP.MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL';
errWithMessage.i18nKey = 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL';
}
}

Expand All @@ -158,25 +158,25 @@ export class LibraryMembershipDirective implements OnChanges {
if (createdMembership.entry && createdMembership.entry.role) {
const info = {
shouldReload: true,
i18nKey: 'APP.MESSAGES.INFO.JOINED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.INFO.JOINED'
};
this.toggle.emit(info);
}
},
(error) => {
const errWithMessage = {
error,
i18nKey: 'APP.MESSAGES.ERRORS.JOIN_REQUEST_FAILED'
i18nKey: 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.JOIN_REQUEST_FAILED'
};

const senderEmailCheck = 'Failed to resolve sender mail address';
const receiverEmailCheck = 'All recipients for the mail action were invalid';

if (error.message) {
if (error.message.includes(senderEmailCheck)) {
errWithMessage.i18nKey = 'APP.MESSAGES.ERRORS.INVALID_SENDER_EMAIL';
errWithMessage.i18nKey = 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_SENDER_EMAIL';
} else if (error.message.includes(receiverEmailCheck)) {
errWithMessage.i18nKey = 'APP.MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL';
errWithMessage.i18nKey = 'ADF_LIBRARY_MEMBERSHIP_MESSAGES.ERRORS.INVALID_RECEIVER_EMAIL';
}
}

Expand Down
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "عرض {{ count }} المزيد"
},
"swsdp": "عينة: مشروع تصميم موقع الويب"
}
"swsdp": "عينة: مشروع تصميم موقع الويب",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "عنوان البريد الإلكتروني للمستلم (المستلمين) غير صالح، اتصل بقسم تكنولوجيا المعلومات.",
"INVALID_SENDER_EMAIL": "يجب أن يكون عنوان بريدك الإلكتروني صالحًا قبل طلب الانضمام.",
"JOIN_CANCEL_FAILED": "يتعذر إلغاء طلب انضمامك",
"JOIN_REQUEST_FAILED": "يتعذر الانضمام للمكتبة"
},
"INFO": {
"JOINED": "تم الانضمام للمكتبة",
"JOIN_CANCELED": "تم إلغاء الطلب للانضمام للمكتبة",
"JOIN_REQUESTED": "تم إرسال الطلب للانضمام للمكتبة"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Zobrazit dalších {{ count }}"
},
"swsdp": "Ukázka: Projekt návrhu webové stránky"
}
"swsdp": "Ukázka: Projekt návrhu webové stránky",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "E-mailová adresa příjemců není platná. Obraťte se na oddělení IT.",
"INVALID_SENDER_EMAIL": "Žádost o připojení vyžaduje platnou e-mailovou adresu.",
"JOIN_CANCEL_FAILED": "Žádost o připojení nebylo možné zrušit",
"JOIN_REQUEST_FAILED": "Ke knihovně se nebylo možné připojit"
},
"INFO": {
"JOINED": "Připojeno ke knihovně",
"JOIN_CANCELED": "Zrušena žádost o připojení ke knihovně",
"JOIN_REQUESTED": "Odeslána žádost o připojení k této knihovně"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Vis {{ count }} mere"
},
"swsdp": "Prøve: Websted Design Projekt"
}
"swsdp": "Prøve: Websted Design Projekt",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "E-mailadressen for en eller flere modtagere er ikke gyldig. Kontakt din it-afdeling.",
"INVALID_SENDER_EMAIL": "Din e-mailadresse skal være gyldig, inden du kan anmode om at blive tilmeldt.",
"JOIN_CANCEL_FAILED": "Din anmodning om tilmelding kan ikke annulleres",
"JOIN_REQUEST_FAILED": "Du kan ikke tilmeldes biblioteket"
},
"INFO": {
"JOINED": "Du er nu tilmeldt biblioteket",
"JOIN_CANCELED": "Anmodningen om at blive tilmeldt biblioteket er blevet annulleret",
"JOIN_REQUESTED": "Anmodningen om at blive tilmeldt biblioteket er blevet sendt"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "{{ count }} mehr anzeigen"
},
"swsdp": "Beispiel: Website-Design-Projekt"
}
"swsdp": "Beispiel: Website-Design-Projekt",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Empfänger-E-Mail-Addresse(n) nicht zulässig. Wenden Sie sich an Ihr IT-Team.",
"INVALID_SENDER_EMAIL": "Ihre E-Mail-Adresse muss gültig sein, bevor Sie den Beitritt zur Bibliothek anfordern.",
"JOIN_CANCEL_FAILED": "Ihre Beitrittsanfrage kann nicht zurückgezogen werden",
"JOIN_REQUEST_FAILED": "Beitritt zur Bibliothek nicht möglich"
},
"INFO": {
"JOINED": "Beitritt zur Bibliothek abgeschlossen",
"JOIN_CANCELED": "Anfrage zum Bibliotheksbeitritt zurückgezogen",
"JOIN_REQUESTED": "Anfrage zum Bibliotheksbeitritt abgeschickt"
}
}
}
15 changes: 14 additions & 1 deletion lib/content-services/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,5 +683,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "View {{ count }} more"
},
"swsdp": "Sample: Web Site Design Project"
"swsdp": "Sample: Web Site Design Project",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Recipient(s) email address not valid, contact IT.",
"INVALID_SENDER_EMAIL": "Your email address must be valid before requesting to join.",
"JOIN_CANCEL_FAILED": "Cannot cancel your join request",
"JOIN_REQUEST_FAILED": "Cannot join the library"
},
"INFO": {
"JOINED": "Library joined",
"JOIN_CANCELED": "Canceled the request to join the library",
"JOIN_REQUESTED": "Request sent to join this library"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Ver {{ count }} más"
},
"swsdp": "Ejemplo: Proyecto de diseño de sitio web"
}
"swsdp": "Ejemplo: Proyecto de diseño de sitio web",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Dirección de correo electrónico de destinatario(s) no válida; póngase en contacto con el equipo de TI",
"INVALID_SENDER_EMAIL": "Su dirección de correo electrónico debe ser válida antes de solicitar unirse.",
"JOIN_CANCEL_FAILED": "No puede cancelarse su solicitud de unirse",
"JOIN_REQUEST_FAILED": "No puede unirse a la biblioteca"
},
"INFO": {
"JOINED": "Se ha unido a la biblioteca",
"JOIN_CANCELED": "Se ha cancelado la solicitud de unirse a esta biblioteca",
"JOIN_REQUESTED": "Se ha enviado una solicitud para unirse a esta biblioteca"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Katso {{ count }} lisää"
},
"swsdp": "Otos: Verkkosivuston suunnitteluprojekti"
}
"swsdp": "Otos: Verkkosivuston suunnitteluprojekti",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Vastaanottajien sähköpostiosoitteet eivät ole kelvollisia. Ota yhteyttä IT-tukeen.",
"INVALID_SENDER_EMAIL": "Sähköpostiosoitteesi täytyy olla kelvollinen, ennen kuin voit pyytää liittymistä.",
"JOIN_CANCEL_FAILED": "Liittymispyynnön peruuttaminen ei onnistu",
"JOIN_REQUEST_FAILED": "Kirjastoon liittyminen ei onnistu"
},
"INFO": {
"JOINED": "Kirjastoon liityttiin",
"JOIN_CANCELED": "Tämän kirjaston liittymispyyntö peruutettiin",
"JOIN_REQUESTED": "Tämän kirjaston liittymispyyntö lähetettiin"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Afficher {{ count }} de plus"
},
"swsdp": "Exemple : projet de conception de site Web"
}
"swsdp": "Exemple : projet de conception de site Web",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Adresse e-mail du ou des destinataire(s) non valide. Contactez le support technique.",
"INVALID_SENDER_EMAIL": "Pour faire une demande pour rejoindre, vous devez avoir une adresse e-mail valide.",
"JOIN_CANCEL_FAILED": "Impossible d'annuler la demande pour rejoindre",
"JOIN_REQUEST_FAILED": "Impossible de rejoindre la bibliothèque"
},
"INFO": {
"JOINED": "Vous avez rejoint la bibliothèque",
"JOIN_CANCELED": "La demande pour rejoindre la bibliothèque a été annulée",
"JOIN_REQUESTED": "Demande envoyée pour rejoindre cette bibliothèque"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Visualizza altri {{ count }}"
},
"swsdp": "Esempio: Progetto di sviluppo di sito Web"
}
"swsdp": "Esempio: Progetto di sviluppo di sito Web",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Indirizzo email del destinatario non valido. Contattare l'IT.",
"INVALID_SENDER_EMAIL": "L'indirizzo email deve essere valido prima della richiesta di accesso.",
"JOIN_CANCEL_FAILED": "Impossibile annullare la richiesta di partecipazione",
"JOIN_REQUEST_FAILED": "Impossibile partecipare alla libreria"
},
"INFO": {
"JOINED": "Partecipazione alla libreria confermata",
"JOIN_CANCELED": "Richiesta di partecipazione alla libreria annullata",
"JOIN_REQUESTED": "Richiesta di partecipazione alla libreria inviata"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "もっと {{ count }} 表示する"
},
"swsdp": "サンプル:Webサイトデザインプロジェクト"
}
"swsdp": "サンプル:Webサイトデザインプロジェクト",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "受取人の E メールアドレスが無効です。IT 担当者に連絡してください。",
"INVALID_SENDER_EMAIL": "参加リクエストを行うには、有効な E メールアドレスが必要です。",
"JOIN_CANCEL_FAILED": "参加リクエストをキャンセルできません",
"JOIN_REQUEST_FAILED": "ライブラリに参加できません"
},
"INFO": {
"JOINED": "ライブラリに参加しました",
"JOIN_CANCELED": "ライブラリへの参加リクエストをキャンセルしました",
"JOIN_REQUESTED": "このライブラリへの参加リクエストが送信されました"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Vis {{ count }} til"
},
"swsdp": "Eksempel: Prosjekt for nettsteddesign"
}
"swsdp": "Eksempel: Prosjekt for nettsteddesign",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Mottakeres e-postadresse er ikke gyldig – kontakt IT.",
"INVALID_SENDER_EMAIL": "E-postadressen din må være gyldig før du ber om tilslutning.",
"JOIN_CANCEL_FAILED": "Kan ikke avbryte forespørselen din om tilslutning",
"JOIN_REQUEST_FAILED": "Kan ikke slutte deg til biblioteket"
},
"INFO": {
"JOINED": "Bibliotek tilsluttet",
"JOIN_CANCELED": "Forespørselen om tilslutning til biblioteket er avbrutt",
"JOIN_REQUESTED": "Forespørsel sendt om tilslutning til dette biblioteket"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "{{ count }} meer weergeven"
},
"swsdp": "Voorbeeld: Websiteontwerpproject"
}
"swsdp": "Voorbeeld: Websiteontwerpproject",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Het e-mailadres van de ontvanger(s) is niet geldig, neem contact op met IT.",
"INVALID_SENDER_EMAIL": "U moet een geldig e-mailadres hebben voordat u kunt aanvragen om lid te worden.",
"JOIN_CANCEL_FAILED": "Uw aanvraag om lid te worden kan niet worden geannuleerd",
"JOIN_REQUEST_FAILED": "Lid worden van de bibliotheek niet mogelijk"
},
"INFO": {
"JOINED": "Lid geworden van bibliotheek",
"JOIN_CANCELED": "Aanvraag om lid te worden van de bibliotheek is geannuleerd",
"JOIN_REQUESTED": "Aanvraag om lid te worden van deze bibliotheek is verzonden"
}
}
}
17 changes: 15 additions & 2 deletions lib/content-services/src/lib/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,18 @@
"TAG_NODE_LIST": {
"VIEW_MORE": "Wyświetl {{ count }} więcej"
},
"swsdp": "Przykład: projekt układu witryny internetowej"
}
"swsdp": "Przykład: projekt układu witryny internetowej",
"ADF_LIBRARY_MEMBERSHIP_MESSAGES": {
"ERRORS": {
"INVALID_RECEIVER_EMAIL": "Adres e-mail jednego z odbiorców nie jest prawidłowy, skontaktuj się z działem IT.",
"INVALID_SENDER_EMAIL": "Twój adres e-mail musi być poprawny przed żądaniem dołączenia.",
"JOIN_CANCEL_FAILED": "Nie można anulować Twojego żądania dołączenia",
"JOIN_REQUEST_FAILED": "Nie można dołączyć do biblioteki"
},
"INFO": {
"JOINED": "Dołączono do biblioteki",
"JOIN_CANCELED": "Żądanie dołączenia do biblioteki zostało anulowane",
"JOIN_REQUESTED": "Żądanie dołączenia do tej biblioteki zostało wysłane"
}
}
}

0 comments on commit 6cb881e

Please sign in to comment.