From d3cf9be24d7acc20cfa09744dfd549b540ed776a Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Mon, 30 Oct 2023 15:33:36 +0100 Subject: [PATCH] Simplify template translations (#413) --- clients/banking/src/locales/de.json | 58 ++--- clients/banking/src/locales/en.json | 58 ++--- clients/banking/src/locales/es.json | 58 ++--- clients/banking/src/locales/fr.json | 58 ++--- clients/banking/src/locales/it.json | 58 ++--- clients/banking/src/locales/nl.json | 58 ++--- clients/banking/src/locales/pt.json | 58 ++--- clients/banking/src/utils/i18n.ts | 7 +- .../banking/src/utils/templateTranslations.ts | 235 +++--------------- clients/onboarding/src/utils/i18n.tsx | 7 +- .../src/utils/templateTranslations.ts | 33 +-- 11 files changed, 254 insertions(+), 434 deletions(-) diff --git a/clients/banking/src/locales/de.json b/clients/banking/src/locales/de.json index 438a07374..8fc6cecb6 100644 --- a/clients/banking/src/locales/de.json +++ b/clients/banking/src/locales/de.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Gläubiger", "transaction.debtor": "Schuldner", "transaction.executionDateTime": "Ausführungsdatum", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Gebühr für Bargeldabhebungen oder Kartentransaktionen in einer anderen Währung als Euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Gebühr für Bargeldabhebungen oder Kartentransaktionen in einer anderen Währung als Euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Gebühr für Bargeldabhebungen an einem Geldautomaten in der Eurozone", - "transaction.fees.description.checkDeposit": "Gebühr für die Einzahlung eines physischen Schecks", - "transaction.fees.description.checkIncident": "Gebühr, wenn ein physischer Scheck abgelehnt oder zurückgegeben wird", - "transaction.fees.description.circulationLetterDraftingFee": "Gebühr für die Erstellung eines Rundschreibens für eine juristische Person zur Nutzung dieses Swan-Kontos auf Reisen", - "transaction.fees.description.confirmationLetterDraftingFee": "Gebühr für die Erstellung eines Bestätigungsschreibens, das die Existenz eines Swan-Kontos bescheinigt", - "transaction.fees.description.directDebitRejection": "Gebühr, wenn eine Lastschrift aufgrund eines nicht ausreichenden Saldos abgelehnt wird", - "transaction.fees.description.improperUseOfAccount": "Gebühr für versuchte oder durchgeführte Handlungen, die gegen das Gesetz oder unsere Allgemeinen Geschäftsbedingungen verstoßen", - "transaction.fees.description.internationalCreditTransferInGroup1": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferInGroup2": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferInGroup3": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferInGroup4": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", - "transaction.fees.description.physicalCardDeliveryExpress": "Gebühr für die Zustellung physischer Karten durch einen Expressdienstleister", - "transaction.fees.description.physicalCardDeliveryFrance": "Gebühr für die Zustellung physischer Karten innerhalb Frankreichs", - "transaction.fees.description.physicalCardDeliveryIntl": "Gebühr für die Zustellung physischer Karten außerhalb Frankreichs", - "transaction.fees.description.physicalCardPrinting": "Gebühr für den Prozess des Druckens physischer Karten", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Gebühr für gerichtliche oder administrative Maßnahmen, die Swan im Zusammenhang mit Ihrem Konto verlangt", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Gebühr für einen eingehenden B2B SEPA-Lastschrifteinzug bis zu 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Gebühr für einen eingehenden B2B SEPA-Lastschrifteinzug über 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Gebühr für einen eingehenden Core SEPA-Lastschrifteinzug bis zu 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Gebühr für einen eingehenden Core SEPA-Lastschrifteinzug über 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Gebühr für die Rückgabe eines Core SEPA-Lastschrifteinzugs", - "transaction.fees.description.unauthorizedOverdraft": "Gebühr für unberechtigte Überziehungen", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Gebühr für Bargeldabhebungen oder Kartentransaktionen in einer anderen Währung als Euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Gebühr für Bargeldabhebungen oder Kartentransaktionen in einer anderen Währung als Euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Gebühr für Bargeldabhebungen an einem Geldautomaten in der Eurozone", + "transaction.fees.description.CheckDeposit": "Gebühr für die Einzahlung eines physischen Schecks", + "transaction.fees.description.CheckIncident": "Gebühr, wenn ein physischer Scheck abgelehnt oder zurückgegeben wird", + "transaction.fees.description.CirculationLetterDraftingFee": "Gebühr für die Erstellung eines Rundschreibens für eine juristische Person zur Nutzung dieses Swan-Kontos auf Reisen", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Gebühr für die Erstellung eines Bestätigungsschreibens, das die Existenz eines Swan-Kontos bescheinigt", + "transaction.fees.description.DirectDebitRejection": "Gebühr, wenn eine Lastschrift aufgrund eines nicht ausreichenden Saldos abgelehnt wird", + "transaction.fees.description.ImproperUseOfAccount": "Gebühr für versuchte oder durchgeführte Handlungen, die gegen das Gesetz oder unsere Allgemeinen Geschäftsbedingungen verstoßen", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Gebühr für den Empfang einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Gebühr für das Senden einer Gutschriftüberweisung, die nicht in Euro denominiert und in einer anderen Währung ausgeführt wird", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Gebühr für die Zustellung physischer Karten durch einen Expressdienstleister", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Gebühr für die Zustellung physischer Karten innerhalb Frankreichs", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Gebühr für die Zustellung physischer Karten außerhalb Frankreichs", + "transaction.fees.description.PhysicalCardPrinting": "Gebühr für den Prozess des Druckens physischer Karten", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Gebühr für gerichtliche oder administrative Maßnahmen, die Swan im Zusammenhang mit Ihrem Konto verlangt", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Gebühr für einen eingehenden B2B SEPA-Lastschrifteinzug bis zu 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Gebühr für einen eingehenden B2B SEPA-Lastschrifteinzug über 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Gebühr für einen eingehenden Core SEPA-Lastschrifteinzug bis zu 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Gebühr für einen eingehenden Core SEPA-Lastschrifteinzug über 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Gebühr für die Rückgabe eines Core SEPA-Lastschrifteinzugs", + "transaction.fees.description.UnauthorizedOverdraft": "Gebühr für unberechtigte Überziehungen", "transaction.feesReason": "Begründung", "transaction.id": "ID", "transaction.instantTransferUnavailable": "Sofortüberweisung nicht verfügbar", @@ -734,4 +734,4 @@ "transfer.transfer": "Überweisung", "upcomingTransansactionList.noResults": "Keine bevorstehenden Transaktionen", "upcomingTransansactionList.noResultsDescription": "Es sind keine eingehenden oder ausgehenden Transaktionen im Gange." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/en.json b/clients/banking/src/locales/en.json index 69f9d243c..4a9086323 100644 --- a/clients/banking/src/locales/en.json +++ b/clients/banking/src/locales/en.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Creditor", "transaction.debtor": "Debtor", "transaction.executionDateTime": "Execution date", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Fee for withdrawing cash or making card transactions in a currency other than euros", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Fee for withdrawing cash or making card transactions in a currency other than euros", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Fee for withdrawing cash from an ATM in the eurozone", - "transaction.fees.description.checkDeposit": "Fee for the deposit of a physical check", - "transaction.fees.description.checkIncident": "Fee if a physical check is rejected or returned", - "transaction.fees.description.circulationLetterDraftingFee": "Fee for drafting a circulation letter for a legal entity holder to use this Swan account while traveling", - "transaction.fees.description.confirmationLetterDraftingFee": "Fee for drafting a confirmation letter attesting to the existence of a Swan account", - "transaction.fees.description.directDebitRejection": "Fee when a direct debit transaction is rejected because of an insufficient balance", - "transaction.fees.description.improperUseOfAccount": "Fee for actions attempted or performed that violate the law or our Terms and Conditions", - "transaction.fees.description.internationalCreditTransferInGroup1": "Fee for receiving a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferInGroup2": "Fee for receiving a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferInGroup3": "Fee for receiving a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferInGroup4": "Fee for receiving a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Fee for sending a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Fee for sending a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Fee for sending a credit transfer not denominated and executed in euros", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Fee for sending a credit transfer not denominated and executed in euros", - "transaction.fees.description.physicalCardDeliveryExpress": "Fee for delivering physical cards with an express delivery provider", - "transaction.fees.description.physicalCardDeliveryFrance": "Fee for delivering physical cards within France", - "transaction.fees.description.physicalCardDeliveryIntl": "Fee for delivering physical cards outside of France", - "transaction.fees.description.physicalCardPrinting": "Fee for the process of printing physical cards", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Fee for judicial or administrative involvement required by Swan in connection to your account", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Fee for an incoming B2B SEPA Direct Debit up to 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Fee for an incoming B2B SEPA Direct Debit more than 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Fee for an incoming Core SEPA Direct Debit up to 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Fee for an incoming Core SEPA Direct Debit more than 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Fee for the return of a Core SEPA Direct Debit", - "transaction.fees.description.unauthorizedOverdraft": "Fee for overdrafts that are not authorized", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Fee for withdrawing cash or making card transactions in a currency other than euros", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Fee for withdrawing cash or making card transactions in a currency other than euros", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Fee for withdrawing cash from an ATM in the eurozone", + "transaction.fees.description.CheckDeposit": "Fee for the deposit of a physical check", + "transaction.fees.description.CheckIncident": "Fee if a physical check is rejected or returned", + "transaction.fees.description.CirculationLetterDraftingFee": "Fee for drafting a circulation letter for a legal entity holder to use this Swan account while traveling", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Fee for drafting a confirmation letter attesting to the existence of a Swan account", + "transaction.fees.description.DirectDebitRejection": "Fee when a direct debit transaction is rejected because of an insufficient balance", + "transaction.fees.description.ImproperUseOfAccount": "Fee for actions attempted or performed that violate the law or our Terms and Conditions", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Fee for receiving a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Fee for receiving a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Fee for receiving a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Fee for receiving a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Fee for sending a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Fee for sending a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Fee for sending a credit transfer not denominated and executed in euros", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Fee for sending a credit transfer not denominated and executed in euros", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Fee for delivering physical cards with an express delivery provider", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Fee for delivering physical cards within France", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Fee for delivering physical cards outside of France", + "transaction.fees.description.PhysicalCardPrinting": "Fee for the process of printing physical cards", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Fee for judicial or administrative involvement required by Swan in connection to your account", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Fee for an incoming B2B SEPA Direct Debit up to 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Fee for an incoming B2B SEPA Direct Debit more than 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Fee for an incoming Core SEPA Direct Debit up to 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Fee for an incoming Core SEPA Direct Debit more than 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Fee for the return of a Core SEPA Direct Debit", + "transaction.fees.description.UnauthorizedOverdraft": "Fee for overdrafts that are not authorized", "transaction.feesReason": "Reason", "transaction.id": "ID", "transaction.instantTransferUnavailable": "Instant transfer unavailable", @@ -734,4 +734,4 @@ "transfer.transfer": "Transfer", "upcomingTransansactionList.noResults": "No upcoming transactions", "upcomingTransansactionList.noResultsDescription": "There aren't any incoming or outgoing transactions underway." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/es.json b/clients/banking/src/locales/es.json index 4d10488ea..792c6cf04 100644 --- a/clients/banking/src/locales/es.json +++ b/clients/banking/src/locales/es.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Acreedor", "transaction.debtor": "Deudor", "transaction.executionDateTime": "Fecha de ejecución", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Comisión por retirar efectivo o realizar operaciones con tarjeta en una moneda distinta del euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Comisión por retirar efectivo o realizar operaciones con tarjeta en una moneda distinta del euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Comisión por retirar efectivo de un cajero automático en la eurozona", - "transaction.fees.description.checkDeposit": "Tarifa por el depósito de un cheque físico", - "transaction.fees.description.checkIncident": "Tarifa si un cheque físico es rechazado o devuelto", - "transaction.fees.description.circulationLetterDraftingFee": "Comisión por redactar una circular para que el titular de una entidad jurídica utilice esta cuenta de Swan mientras viaja", - "transaction.fees.description.confirmationLetterDraftingFee": "Comisión por la redacción de una carta de confirmación que certifica la existencia de una cuenta Swan", - "transaction.fees.description.directDebitRejection": "Cargo por rechazo de domiciliación bancaria debido a saldo insuficiente", - "transaction.fees.description.improperUseOfAccount": "Cargo por intentos o acciones que infrinjan la ley o nuestros Términos y condiciones", - "transaction.fees.description.internationalCreditTransferInGroup1": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferInGroup2": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferInGroup3": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferInGroup4": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", - "transaction.fees.description.physicalCardDeliveryExpress": "Comisión por la entrega de tarjetas físicas con un proveedor de entrega exprés", - "transaction.fees.description.physicalCardDeliveryFrance": "Comisión por la entrega de tarjetas físicas dentro de Francia", - "transaction.fees.description.physicalCardDeliveryIntl": "Comisión por la entrega de tarjetas físicas fuera de Francia", - "transaction.fees.description.physicalCardPrinting": "Comisión por el proceso de impresión de tarjetas físicas", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Cargo por intervención judicial o administrativa requerida por Swan en relación con tu cuenta", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Comisión por una domiciliación bancaria B2B SEPA entrante de hasta 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Comisión por una domiciliación bancaria B2B SEPA entrante de más de 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Comisión por una domiciliación bancaria Core SEPA entrante de hasta 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Comisión por una domiciliación bancaria Core SEPA entrante de más de 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Comisión por la devolución de una domiciliación bancaria SEPA Core", - "transaction.fees.description.unauthorizedOverdraft": "Cargo por sobregiros no autorizados", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Comisión por retirar efectivo o realizar operaciones con tarjeta en una moneda distinta del euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Comisión por retirar efectivo o realizar operaciones con tarjeta en una moneda distinta del euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Comisión por retirar efectivo de un cajero automático en la eurozona", + "transaction.fees.description.CheckDeposit": "Tarifa por el depósito de un cheque físico", + "transaction.fees.description.CheckIncident": "Tarifa si un cheque físico es rechazado o devuelto", + "transaction.fees.description.CirculationLetterDraftingFee": "Comisión por redactar una circular para que el titular de una entidad jurídica utilice esta cuenta de Swan mientras viaja", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Comisión por la redacción de una carta de confirmación que certifica la existencia de una cuenta Swan", + "transaction.fees.description.DirectDebitRejection": "Cargo por rechazo de domiciliación bancaria debido a saldo insuficiente", + "transaction.fees.description.ImproperUseOfAccount": "Cargo por intentos o acciones que infrinjan la ley o nuestros Términos y condiciones", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Comisión por recibir una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Comisión por enviar una transferencia de crédito no denominada y ejecutada en euros", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Comisión por la entrega de tarjetas físicas con un proveedor de entrega exprés", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Comisión por la entrega de tarjetas físicas dentro de Francia", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Comisión por la entrega de tarjetas físicas fuera de Francia", + "transaction.fees.description.PhysicalCardPrinting": "Comisión por el proceso de impresión de tarjetas físicas", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Cargo por intervención judicial o administrativa requerida por Swan en relación con tu cuenta", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Comisión por una domiciliación bancaria B2B SEPA entrante de hasta 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Comisión por una domiciliación bancaria B2B SEPA entrante de más de 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Comisión por una domiciliación bancaria Core SEPA entrante de hasta 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Comisión por una domiciliación bancaria Core SEPA entrante de más de 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Comisión por la devolución de una domiciliación bancaria SEPA Core", + "transaction.fees.description.UnauthorizedOverdraft": "Cargo por sobregiros no autorizados", "transaction.feesReason": "Motivo", "transaction.id": "Identificación", "transaction.instantTransferUnavailable": "Transferencia instantánea no disponible", @@ -734,4 +734,4 @@ "transfer.transfer": "Transferencia", "upcomingTransansactionList.noResults": "No hay operaciones próximas", "upcomingTransansactionList.noResultsDescription": "No hay operaciones entrantes ni salientes en curso." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/fr.json b/clients/banking/src/locales/fr.json index 602d7f40e..1f1f94074 100644 --- a/clients/banking/src/locales/fr.json +++ b/clients/banking/src/locales/fr.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Créditeur", "transaction.debtor": "Débiteur", "transaction.executionDateTime": "Date d'exécution", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Frais pour les retraits d'espèces ou les transactions par carte dans une devise autre que l'euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Frais pour les retraits d'espèces ou les transactions par carte dans une devise autre que l'euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Frais de retrait d'espèces à un distributeur automatique dans la zone euro", - "transaction.fees.description.checkDeposit": "Frais pour le dépôt d'un chèque physique", - "transaction.fees.description.checkIncident": "Frais si un chèque physique est rejeté ou retourné", - "transaction.fees.description.circulationLetterDraftingFee": "Frais de rédaction d'une lettre circulaire permettant au titulaire d'une entité légale d'utiliser ce compte Swan en déplacement", - "transaction.fees.description.confirmationLetterDraftingFee": "Frais pour la rédaction d'une lettre de confirmation attestant l'existence d'un compte Swan", - "transaction.fees.description.directDebitRejection": "Frais lorsqu'une transaction de prélèvement est refusée en raison d'un solde insuffisant", - "transaction.fees.description.improperUseOfAccount": "Frais pour les actions tentées ou effectuées en violation de la loi ou de nos conditions générales", - "transaction.fees.description.internationalCreditTransferInGroup1": "Frais pour la réception d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferInGroup2": "Frais pour la réception d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferInGroup3": "Frais pour la réception d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferInGroup4": "Frais pour la réception d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Frais d'envoi d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Frais d'envoi d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Frais d'envoi d'un virement non libellé et exécuté en euros", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Frais d'envoi d'un virement non libellé et exécuté en euros", - "transaction.fees.description.physicalCardDeliveryExpress": "Frais de livraison de cartes physiques par un fournisseur de livraison express", - "transaction.fees.description.physicalCardDeliveryFrance": "Frais de livraison de cartes physiques en France", - "transaction.fees.description.physicalCardDeliveryIntl": "Frais de livraison de cartes physiques en dehors de la France", - "transaction.fees.description.physicalCardPrinting": "Frais pour le processus d'impression de cartes physiques", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Frais d'intervention judiciaire ou administrative exigés par Swan en lien avec votre compte", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Frais pour un prélèvement SEPA B2B entrant jusqu'à 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Frais pour un prélèvement SEPA B2B entrant de plus de 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Frais pour un prélèvement SEPA Core entrant jusqu'à 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Frais pour un prélèvement SEPA Core entrant de plus de 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Frais pour le retour d'un prélèvement SEPA Core", - "transaction.fees.description.unauthorizedOverdraft": "Frais pour les découverts non autorisés", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Frais pour les retraits d'espèces ou les transactions par carte dans une devise autre que l'euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Frais pour les retraits d'espèces ou les transactions par carte dans une devise autre que l'euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Frais de retrait d'espèces à un distributeur automatique dans la zone euro", + "transaction.fees.description.CheckDeposit": "Frais pour le dépôt d'un chèque physique", + "transaction.fees.description.CheckIncident": "Frais si un chèque physique est rejeté ou retourné", + "transaction.fees.description.CirculationLetterDraftingFee": "Frais de rédaction d'une lettre circulaire permettant au titulaire d'une entité légale d'utiliser ce compte Swan en déplacement", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Frais pour la rédaction d'une lettre de confirmation attestant l'existence d'un compte Swan", + "transaction.fees.description.DirectDebitRejection": "Frais lorsqu'une transaction de prélèvement est refusée en raison d'un solde insuffisant", + "transaction.fees.description.ImproperUseOfAccount": "Frais pour les actions tentées ou effectuées en violation de la loi ou de nos conditions générales", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Frais pour la réception d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Frais pour la réception d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Frais pour la réception d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Frais pour la réception d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Frais d'envoi d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Frais d'envoi d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Frais d'envoi d'un virement non libellé et exécuté en euros", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Frais d'envoi d'un virement non libellé et exécuté en euros", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Frais de livraison de cartes physiques par un fournisseur de livraison express", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Frais de livraison de cartes physiques en France", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Frais de livraison de cartes physiques en dehors de la France", + "transaction.fees.description.PhysicalCardPrinting": "Frais pour le processus d'impression de cartes physiques", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Frais d'intervention judiciaire ou administrative exigés par Swan en lien avec votre compte", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Frais pour un prélèvement SEPA B2B entrant jusqu'à 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Frais pour un prélèvement SEPA B2B entrant de plus de 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Frais pour un prélèvement SEPA Core entrant jusqu'à 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Frais pour un prélèvement SEPA Core entrant de plus de 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Frais pour le retour d'un prélèvement SEPA Core", + "transaction.fees.description.UnauthorizedOverdraft": "Frais pour les découverts non autorisés", "transaction.feesReason": "Raison", "transaction.id": "ID", "transaction.instantTransferUnavailable": "Virement instantané non disponible", @@ -734,4 +734,4 @@ "transfer.transfer": "Virement", "upcomingTransansactionList.noResults": "Aucune transaction à venir", "upcomingTransansactionList.noResultsDescription": "Il n’y a pas de transactions entrantes ou sortantes en cours." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/it.json b/clients/banking/src/locales/it.json index 3673096f4..c0a4d5004 100644 --- a/clients/banking/src/locales/it.json +++ b/clients/banking/src/locales/it.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Creditore", "transaction.debtor": "Debitore", "transaction.executionDateTime": "Data esecuzione", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Commissione per il prelievo di contanti o l'effettuazione di transazioni con carta in una valuta diversa dall'euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Commissione per il prelievo di contanti o l'effettuazione di transazioni con carta in una valuta diversa dall'euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Commissione per il prelievo di contanti da sportello bancomat nell'area euro", - "transaction.fees.description.checkDeposit": "Commissione per il deposito di un assegno fisico", - "transaction.fees.description.checkIncident": "Commissione se un assegno fisico viene respinto o restituito", - "transaction.fees.description.circulationLetterDraftingFee": "Costo per la redazione di una lettera di circolarizzazione per l'utilizzo di questo conto Swan da parte del titolare di una persona giuridica durante il viaggio", - "transaction.fees.description.confirmationLetterDraftingFee": "Commissione per la redazione di una lettera di conferma attestante l'esistenza di un conto Swan", - "transaction.fees.description.directDebitRejection": "Commissione quando una transazione con addebito diretto viene rifiutata a causa di un saldo insufficiente", - "transaction.fees.description.improperUseOfAccount": "Commissione per azioni tentate o eseguite che violano la legge o i nostri Termini e condizioni", - "transaction.fees.description.internationalCreditTransferInGroup1": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferInGroup2": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferInGroup3": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferInGroup4": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", - "transaction.fees.description.physicalCardDeliveryExpress": "Commissione per la consegna di carte fisiche con un fornitore di consegna espresso", - "transaction.fees.description.physicalCardDeliveryFrance": "Commissione per la consegna di carte fisiche in Francia", - "transaction.fees.description.physicalCardDeliveryIntl": "Commissione per la consegna di carte fisiche al di fuori della Francia", - "transaction.fees.description.physicalCardPrinting": "Commissione per il processo di stampa di carte fisiche", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Commissione per l'intervento giudiziario o amministrativo richiesto da Swan in relazione al suo conto", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Commissione per un addebito diretto B2B SEPA in entrata fino a 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Commissione per un addebito diretto B2B SEPA in entrata superiore a 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Commissione per un addebito diretto Core SEPA in entrata fino a 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Commissione per un addebito diretto Core SEPA in entrata superiore a 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Commissione per il ritorno di un addebito diretto SEPA Core", - "transaction.fees.description.unauthorizedOverdraft": "Commissione per gli scoperti non autorizzati", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Commissione per il prelievo di contanti o l'effettuazione di transazioni con carta in una valuta diversa dall'euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Commissione per il prelievo di contanti o l'effettuazione di transazioni con carta in una valuta diversa dall'euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Commissione per il prelievo di contanti da sportello bancomat nell'area euro", + "transaction.fees.description.CheckDeposit": "Commissione per il deposito di un assegno fisico", + "transaction.fees.description.CheckIncident": "Commissione se un assegno fisico viene respinto o restituito", + "transaction.fees.description.CirculationLetterDraftingFee": "Costo per la redazione di una lettera di circolarizzazione per l'utilizzo di questo conto Swan da parte del titolare di una persona giuridica durante il viaggio", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Commissione per la redazione di una lettera di conferma attestante l'esistenza di un conto Swan", + "transaction.fees.description.DirectDebitRejection": "Commissione quando una transazione con addebito diretto viene rifiutata a causa di un saldo insufficiente", + "transaction.fees.description.ImproperUseOfAccount": "Commissione per azioni tentate o eseguite che violano la legge o i nostri Termini e condizioni", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Commissione per la ricezione di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Commissione per l'invio di un bonifico non denominato ed eseguito in euro", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Commissione per la consegna di carte fisiche con un fornitore di consegna espresso", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Commissione per la consegna di carte fisiche in Francia", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Commissione per la consegna di carte fisiche al di fuori della Francia", + "transaction.fees.description.PhysicalCardPrinting": "Commissione per il processo di stampa di carte fisiche", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Commissione per l'intervento giudiziario o amministrativo richiesto da Swan in relazione al suo conto", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Commissione per un addebito diretto B2B SEPA in entrata fino a 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Commissione per un addebito diretto B2B SEPA in entrata superiore a 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Commissione per un addebito diretto Core SEPA in entrata fino a 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Commissione per un addebito diretto Core SEPA in entrata superiore a 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Commissione per il ritorno di un addebito diretto SEPA Core", + "transaction.fees.description.UnauthorizedOverdraft": "Commissione per gli scoperti non autorizzati", "transaction.feesReason": "Motivo", "transaction.id": "ID", "transaction.instantTransferUnavailable": "Bonifico immediato non disponibile", @@ -734,4 +734,4 @@ "transfer.transfer": "Bonifico", "upcomingTransansactionList.noResults": "Nessuna transazione in corso", "upcomingTransansactionList.noResultsDescription": "Non ci sono transazioni in entrata o in uscita." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/nl.json b/clients/banking/src/locales/nl.json index d8f458aa2..549967891 100644 --- a/clients/banking/src/locales/nl.json +++ b/clients/banking/src/locales/nl.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Crediteur", "transaction.debtor": "Debiteur", "transaction.executionDateTime": "Uitvoeringsdatum", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Vergoeding voor het opnemen van contant geld of het uitvoeren van kaarttransacties in een andere valuta dan de euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Vergoeding voor het opnemen van contant geld of het uitvoeren van kaarttransacties in een andere valuta dan de euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Vergoeding voor het opnemen van contant geld bij een geldautomaat in de eurozone", - "transaction.fees.description.checkDeposit": "Vergoeding voor het storten van een fysieke cheque", - "transaction.fees.description.checkIncident": "Vergoeding bij afwijzing of terugsturen van een fysieke cheque", - "transaction.fees.description.circulationLetterDraftingFee": "Vergoeding voor het opstellen van een oplage voor een houder van een rechtspersoon om de Swan-rekening te gebruiken tijdens reizen", - "transaction.fees.description.confirmationLetterDraftingFee": "Vergoeding voor het opstellen van een bevestigingsbrief waarin het bestaan van een Swan-rekening wordt bevestigd", - "transaction.fees.description.directDebitRejection": "Vergoeding wanneer een automatische incassotransactie wordt afgewezen vanwege onvoldoende saldo", - "transaction.fees.description.improperUseOfAccount": "Vergoeding voor acties die zijn ondernomen of uitgevoerd en die in strijd zijn met de wet of onze algemene voorwaarden", - "transaction.fees.description.internationalCreditTransferInGroup1": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferInGroup2": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferInGroup3": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferInGroup4": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", - "transaction.fees.description.physicalCardDeliveryExpress": "Vergoeding voor de levering van fysieke kaarten met een express bezorgdienst", - "transaction.fees.description.physicalCardDeliveryFrance": "Vergoeding voor de levering van fysieke kaarten binnen Frankrijk", - "transaction.fees.description.physicalCardDeliveryIntl": "Vergoeding voor de levering van fysieke kaarten buiten Frankrijk", - "transaction.fees.description.physicalCardPrinting": "Vergoeding voor het proces van het afdrukken van fysieke kaarten", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Vergoeding voor gerechtelijke of administratieve tussenkomst die Swan vereist in verband met je rekening", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Vergoeding voor een inkomende B2B SEPA Automatische Incasso tot 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Vergoeding voor een inkomende B2B SEPA Automatische Incasso meer dan 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Vergoeding voor een inkomende Core SEPA Automatische Incasso tot 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Vergoeding voor een inkomende Core SEPA Automatische Incasso meer dan 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Vergoeding voor de retour van een Core SEPA Automatische Incasso", - "transaction.fees.description.unauthorizedOverdraft": "Vergoeding voor rekening-courantkredieten die niet zijn goedgekeurd", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Vergoeding voor het opnemen van contant geld of het uitvoeren van kaarttransacties in een andere valuta dan de euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Vergoeding voor het opnemen van contant geld of het uitvoeren van kaarttransacties in een andere valuta dan de euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Vergoeding voor het opnemen van contant geld bij een geldautomaat in de eurozone", + "transaction.fees.description.CheckDeposit": "Vergoeding voor het storten van een fysieke cheque", + "transaction.fees.description.CheckIncident": "Vergoeding bij afwijzing of terugsturen van een fysieke cheque", + "transaction.fees.description.CirculationLetterDraftingFee": "Vergoeding voor het opstellen van een oplage voor een houder van een rechtspersoon om de Swan-rekening te gebruiken tijdens reizen", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Vergoeding voor het opstellen van een bevestigingsbrief waarin het bestaan van een Swan-rekening wordt bevestigd", + "transaction.fees.description.DirectDebitRejection": "Vergoeding wanneer een automatische incassotransactie wordt afgewezen vanwege onvoldoende saldo", + "transaction.fees.description.ImproperUseOfAccount": "Vergoeding voor acties die zijn ondernomen of uitgevoerd en die in strijd zijn met de wet of onze algemene voorwaarden", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Vergoeding voor het ontvangen van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Vergoeding voor het verzenden van een overschrijving in een andere valuta dan de euro", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Vergoeding voor de levering van fysieke kaarten met een express bezorgdienst", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Vergoeding voor de levering van fysieke kaarten binnen Frankrijk", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Vergoeding voor de levering van fysieke kaarten buiten Frankrijk", + "transaction.fees.description.PhysicalCardPrinting": "Vergoeding voor het proces van het afdrukken van fysieke kaarten", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Vergoeding voor gerechtelijke of administratieve tussenkomst die Swan vereist in verband met je rekening", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Vergoeding voor een inkomende B2B SEPA Automatische Incasso tot 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Vergoeding voor een inkomende B2B SEPA Automatische Incasso meer dan 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Vergoeding voor een inkomende Core SEPA Automatische Incasso tot 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Vergoeding voor een inkomende Core SEPA Automatische Incasso meer dan 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Vergoeding voor de retour van een Core SEPA Automatische Incasso", + "transaction.fees.description.UnauthorizedOverdraft": "Vergoeding voor rekening-courantkredieten die niet zijn goedgekeurd", "transaction.feesReason": "Reden", "transaction.id": "ID", "transaction.instantTransferUnavailable": "Onmiddellijke overdracht niet beschikbaar", @@ -734,4 +734,4 @@ "transfer.transfer": "Overschrijving", "upcomingTransansactionList.noResults": "Geen aanstaande transacties", "upcomingTransansactionList.noResultsDescription": "Er zijn geen inkomende of uitgaande transacties in behandeling." -} \ No newline at end of file +} diff --git a/clients/banking/src/locales/pt.json b/clients/banking/src/locales/pt.json index 46386f184..a607482e4 100644 --- a/clients/banking/src/locales/pt.json +++ b/clients/banking/src/locales/pt.json @@ -555,34 +555,34 @@ "transaction.creditorName": "Credor", "transaction.debtor": "Devedor", "transaction.executionDateTime": "Data de execução", - "transaction.fees.description.cardPaymentsOutsideSEPA": "Taxa para levantar dinheiro ou efetuar transações com cartão numa moeda diferente do euro", - "transaction.fees.description.cashWithdrawalsOutsideSEPA": "Taxa para levantar dinheiro ou efetuar transações com cartão numa moeda diferente do euro", - "transaction.fees.description.cashWithdrawalsWithinSEPA": "Taxa para levantar dinheiro de uma caixa multibanco na zona do euro", - "transaction.fees.description.checkDeposit": "Taxa pelo depósito de um cheque físico", - "transaction.fees.description.checkIncident": "Taxa se um cheque físico for rejeitado ou devolvido", - "transaction.fees.description.circulationLetterDraftingFee": "Taxa para redigir uma carta de circulação para que o titular de uma entidade jurídica possa utilizar esta conta Swan enquanto viaja", - "transaction.fees.description.confirmationLetterDraftingFee": "Taxa pela elaboração de uma carta de confirmação que atesta a existência de uma conta Swan", - "transaction.fees.description.directDebitRejection": "Taxa quando uma transação de débito direto é rejeitada devido a saldo insuficiente", - "transaction.fees.description.improperUseOfAccount": "Taxa por ações tentadas ou realizadas que violem a lei ou os nossos Termos e Condições", - "transaction.fees.description.internationalCreditTransferInGroup1": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferInGroup2": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferInGroup3": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferInGroup4": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferOutGroup1": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferOutGroup2": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferOutGroup3": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.internationalCreditTransferOutGroup4": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", - "transaction.fees.description.physicalCardDeliveryExpress": "Taxa pela entrega de cartões físicos com um fornecedor de entrega expressa", - "transaction.fees.description.physicalCardDeliveryFrance": "Taxa pela entrega de cartões físicos dentro da França", - "transaction.fees.description.physicalCardDeliveryIntl": "Taxa pela entrega de cartões físicos fora da França", - "transaction.fees.description.physicalCardPrinting": "Taxa pelo processo de impressão de cartões físicos", - "transaction.fees.description.processingJudicialOrAdministrativeSeizure": "Taxa pelo envolvimento judicial ou administrativo exigido pela Swan em relação à sua conta", - "transaction.fees.description.sepaDirectDebitInB2bLevel1": "Taxa para um débito direto B2B SEPA recebido até 200€", - "transaction.fees.description.sepaDirectDebitInB2bLevel2": "Taxa para um débito direto B2B SEPA recebido superior a 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel1": "Taxa para um débito direto Core SEPA recebido até 200€", - "transaction.fees.description.sepaDirectDebitInCoreLevel2": "Taxa para um débito direto Core SEPA recebido superior a 200€", - "transaction.fees.description.sepaDirectDebitInCoreReturn": "Taxa pela devolução de um débito direto SEPA Core", - "transaction.fees.description.unauthorizedOverdraft": "Taxa para descobertos bancários não autorizados", + "transaction.fees.description.CardPaymentsOutsideSEPA": "Taxa para levantar dinheiro ou efetuar transações com cartão numa moeda diferente do euro", + "transaction.fees.description.CashWithdrawalsOutsideSEPA": "Taxa para levantar dinheiro ou efetuar transações com cartão numa moeda diferente do euro", + "transaction.fees.description.CashWithdrawalsWithinSEPA": "Taxa para levantar dinheiro de uma caixa multibanco na zona do euro", + "transaction.fees.description.CheckDeposit": "Taxa pelo depósito de um cheque físico", + "transaction.fees.description.CheckIncident": "Taxa se um cheque físico for rejeitado ou devolvido", + "transaction.fees.description.CirculationLetterDraftingFee": "Taxa para redigir uma carta de circulação para que o titular de uma entidade jurídica possa utilizar esta conta Swan enquanto viaja", + "transaction.fees.description.ConfirmationLetterDraftingFee": "Taxa pela elaboração de uma carta de confirmação que atesta a existência de uma conta Swan", + "transaction.fees.description.DirectDebitRejection": "Taxa quando uma transação de débito direto é rejeitada devido a saldo insuficiente", + "transaction.fees.description.ImproperUseOfAccount": "Taxa por ações tentadas ou realizadas que violem a lei ou os nossos Termos e Condições", + "transaction.fees.description.InternationalCreditTransferInGroup1": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferInGroup2": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferInGroup3": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferInGroup4": "Taxa de receção de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferOutGroup1": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferOutGroup2": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferOutGroup3": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.InternationalCreditTransferOutGroup4": "Taxa de envio de uma transferência de crédito não denominada e executada em euros", + "transaction.fees.description.PhysicalCardDeliveryExpress": "Taxa pela entrega de cartões físicos com um fornecedor de entrega expressa", + "transaction.fees.description.PhysicalCardDeliveryFrance": "Taxa pela entrega de cartões físicos dentro da França", + "transaction.fees.description.PhysicalCardDeliveryIntl": "Taxa pela entrega de cartões físicos fora da França", + "transaction.fees.description.PhysicalCardPrinting": "Taxa pelo processo de impressão de cartões físicos", + "transaction.fees.description.ProcessingJudicialOrAdministrativeSeizure": "Taxa pelo envolvimento judicial ou administrativo exigido pela Swan em relação à sua conta", + "transaction.fees.description.SepaDirectDebitInB2bLevel1": "Taxa para um débito direto B2B SEPA recebido até 200€", + "transaction.fees.description.SepaDirectDebitInB2bLevel2": "Taxa para um débito direto B2B SEPA recebido superior a 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel1": "Taxa para um débito direto Core SEPA recebido até 200€", + "transaction.fees.description.SepaDirectDebitInCoreLevel2": "Taxa para um débito direto Core SEPA recebido superior a 200€", + "transaction.fees.description.SepaDirectDebitInCoreReturn": "Taxa pela devolução de um débito direto SEPA Core", + "transaction.fees.description.UnauthorizedOverdraft": "Taxa para descobertos bancários não autorizados", "transaction.feesReason": "Motivo", "transaction.id": "Documento de Identificação", "transaction.instantTransferUnavailable": "Transferência instantânea indisponível", @@ -734,4 +734,4 @@ "transfer.transfer": "Transferência", "upcomingTransansactionList.noResults": "Nenhuma transação futura", "upcomingTransansactionList.noResultsDescription": "Não há nenhuma transação de entrada ou saída em curso." -} \ No newline at end of file +} diff --git a/clients/banking/src/utils/i18n.ts b/clients/banking/src/utils/i18n.ts index 8721262b4..04bf5362a 100644 --- a/clients/banking/src/utils/i18n.ts +++ b/clients/banking/src/utils/i18n.ts @@ -1,4 +1,5 @@ import { createIntl, createIntlCache } from "@formatjs/intl"; +import { Dict } from "@swan-io/boxed"; import { memoize } from "@swan-io/lake/src/utils/function"; import { getRifmProps } from "@swan-io/lake/src/utils/rifm"; import { DateFormat } from "@swan-io/shared-business/src/components/DatePicker"; @@ -36,9 +37,13 @@ dayjs.extend(localizedFormat); const supportedLanguages = ["en", "es", "de", "fr", "it", "nl", "pt"] as const; type SupportedLanguage = (typeof supportedLanguages)[number]; -export type TranslationKey = keyof typeof translationEN; +const translationKeys = Dict.keys(translationEN); +export type TranslationKey = (typeof translationKeys)[number]; export type TranslationParams = Record; +export const isTranslationKey = (value: unknown): value is TranslationKey => + typeof value === "string" && translationKeys.includes(value as TranslationKey); + type DateTimeFormat = "LTS" | "LT" | "L" | "LL" | "LLL" | "LLLL" | "l" | "ll" | "lll" | "llll"; type Locale = { diff --git a/clients/banking/src/utils/templateTranslations.ts b/clients/banking/src/utils/templateTranslations.ts index 1aba58165..7292479d0 100644 --- a/clients/banking/src/utils/templateTranslations.ts +++ b/clients/banking/src/utils/templateTranslations.ts @@ -1,221 +1,50 @@ -import { match } from "ts-pattern"; +import { P, match } from "ts-pattern"; import { UploadedFile } from "../components/SupportingDocumentsForm"; import { FeesTypeEnum, RejectedReasonCode, SupportingDocumentPurposeEnum, } from "../graphql/partner"; -import { t } from "./i18n"; +import { isTranslationKey, t } from "./i18n"; -export const getSupportingDocumentPurposeLabel = (category: SupportingDocumentPurposeEnum) => - match(category) - .with("AssociationRegistration", () => t("supportingDocuments.AssociationRegistration.title")) - .with("Banking", () => t("supportingDocuments.Banking.title")) - .with("CompanyRegistration", () => t("supportingDocuments.CompanyRegistration.title")) - .with("Other", () => t("supportingDocuments.Other.title")) - .with("PowerOfAttorney", () => t("supportingDocuments.PowerOfAttorney.title")) - .with("ProofOfCompanyAddress", () => t("supportingDocuments.ProofOfCompanyAddress.title")) - .with("ProofOfCompanyIncome", () => t("supportingDocuments.ProofOfCompanyIncome.title")) - .with("ProofOfIdentity", () => t("supportingDocuments.ProofOfIdentity.title")) - .with("ProofOfIndividualAddress", () => t("supportingDocuments.ProofOfIndividualAddress.title")) - .with("ProofOfIndividualIncome", () => t("supportingDocuments.ProofOfIndividualIncome.title")) - .with("ProofOfOriginOfFunds", () => t("supportingDocuments.ProofOfOriginOfFunds.title")) - .with("SignedStatus", () => t("supportingDocuments.SignedStatus.title")) - .with("SwornStatement", () => t("supportingDocuments.SwornStatement.title")) - .with("UBODeclaration", () => t("supportingDocuments.UBODeclaration.title")) - .exhaustive(); +export const getSupportingDocumentPurposeLabel = (purpose: SupportingDocumentPurposeEnum) => { + try { + return match(`supportingDocuments.${purpose}.title`) + .with(P.when(isTranslationKey), key => t(key)) + .exhaustive(); + } catch { + return purpose; + } +}; export const getSupportingDocumentPurposeDescriptionLabel = ( - category: SupportingDocumentPurposeEnum, -) => - match(category) - .with("AssociationRegistration", () => - t("supportingDocuments.AssociationRegistration.description"), - ) - .with("Banking", () => t("supportingDocuments.Banking.description")) - .with("CompanyRegistration", () => t("supportingDocuments.CompanyRegistration.description")) - .with("Other", () => t("supportingDocuments.Other.description")) - .with("PowerOfAttorney", () => t("supportingDocuments.PowerOfAttorney.description")) - .with("ProofOfCompanyAddress", () => t("supportingDocuments.ProofOfCompanyAddress.description")) - .with("ProofOfCompanyIncome", () => t("supportingDocuments.ProofOfCompanyIncome.description")) - .with("ProofOfIdentity", () => t("supportingDocuments.ProofOfIdentity.description")) - .with("ProofOfIndividualAddress", () => - t("supportingDocuments.ProofOfIndividualAddress.description"), - ) - .with("ProofOfIndividualIncome", () => - t("supportingDocuments.ProofOfIndividualIncome.description"), - ) - .with("ProofOfOriginOfFunds", () => t("supportingDocuments.ProofOfOriginOfFunds.description")) - .with("SignedStatus", () => t("supportingDocuments.SignedStatus.description")) - .with("UBODeclaration", () => t("supportingDocuments.UBODeclaration.description")) - // For sworn statement, we don't want to display a tooltip with a description because the target is a button - .with("SwornStatement", () => undefined) - .exhaustive(); + purpose: SupportingDocumentPurposeEnum, +) => { + // For sworn statement, we don't want to display a tooltip with a description because the target is a button + if (purpose === "SwornStatement") { + return undefined; + } + + try { + return match(`supportingDocuments.${purpose}.description`) + .with(P.when(isTranslationKey), key => t(key)) + .exhaustive(); + } catch { + return purpose; + } +}; export const getSupportingDocumentStatusLabel = (status: UploadedFile["status"]) => - match(status) - .with("pending", () => t("supportingDocuments.alert.pending")) - .with("refused", () => t("supportingDocuments.alert.refused")) - .with("verified", () => t("supportingDocuments.alert.verified")) + match(`supportingDocuments.alert.${status}`) + .with(P.when(isTranslationKey), key => t(key)) .exhaustive(); export const getTransactionRejectedReasonLabel = (reason: RejectedReasonCode) => - match(reason) - .with("AccountClosed", () => t("transactionRejectedReason.AccountClosed")) - .with("AccountHolderDeceased", () => t("transactionRejectedReason.AccountHolderDeceased")) - .with("AccountMembershipRefused", () => t("transactionRejectedReason.AccountMembershipRefused")) - .with("AccountSuspended", () => t("transactionRejectedReason.AccountSuspended")) - .with("AccountUnknown", () => t("transactionRejectedReason.AccountUnknown")) - .with("BankRefused", () => t("transactionRejectedReason.BankRefused")) - .with("BeneficiaryBankNotReachable", () => - t("transactionRejectedReason.BeneficiaryBankNotReachable"), - ) - .with("CardExpired", () => t("transactionRejectedReason.CardExpired")) - .with("CardNotActivated", () => t("transactionRejectedReason.CardNotActivated")) - .with("CardPermanentlyBlocked", () => t("transactionRejectedReason.CardPermanentlyBlocked")) - .with("CardSuspended", () => t("transactionRejectedReason.CardSuspended")) - .with("CreditorBankOffline", () => t("transactionRejectedReason.CreditorBankOffline")) - .with("CreditorBankTechnicalErrorOccurred", () => - t("transactionRejectedReason.CreditorBankTechnicalErrorOccurred"), - ) - .with("CreditorBankTimeout", () => t("transactionRejectedReason.CreditorBankTimeout")) - .with("DebtorAccountClosed", () => t("transactionRejectedReason.DebtorAccountClosed")) - .with("DebtorAccountConsumer", () => t("transactionRejectedReason.DebtorAccountConsumer")) - .with("DebtorAccountUnknown", () => t("transactionRejectedReason.DebtorAccountUnknown")) - .with("DebtorBankOffline", () => t("transactionRejectedReason.DebtorBankOffline")) - .with("DebtorBankTechnicalErrorOccurred", () => - t("transactionRejectedReason.DebtorBankTechnicalErrorOccurred"), - ) - .with("DebtorBankTimeout", () => t("transactionRejectedReason.DebtorBankTimeout")) - .with("DebtorDeceased", () => t("transactionRejectedReason.DebtorDeceased")) - .with("FraudSuspected", () => t("transactionRejectedReason.FraudSuspected")) - .with("IbanInvalid", () => t("transactionRejectedReason.IbanInvalid")) - .with("IbanSuspended", () => t("transactionRejectedReason.IbanSuspended")) - .with("InsufficientFunds", () => t("transactionRejectedReason.InsufficientFunds")) - .with("InvalidExpirationDate", () => t("transactionRejectedReason.InvalidExpirationDate")) - .with("InvalidPin", () => t("transactionRejectedReason.InvalidPin")) - .with("InvalidPinAttemptsExceeded", () => - t("transactionRejectedReason.InvalidPinAttemptsExceeded"), - ) - .with("InvalidSecurityNumber", () => t("transactionRejectedReason.InvalidSecurityNumber")) - .with("MandateInvalid", () => t("transactionRejectedReason.MandateInvalid")) - .with("MerchantShouldResubmitAuthorization", () => - t("transactionRejectedReason.MerchantShouldResubmitAuthorization"), - ) - .with("NoMandate", () => t("transactionRejectedReason.NoMandate")) - .with("PartnerRefused", () => t("transactionRejectedReason.PartnerRefused")) - .with("PartnerTechnicalErrorOccurred", () => - t("transactionRejectedReason.PartnerTechnicalErrorOccurred"), - ) - .with("PeriodAmountLimitExceeded", () => - t("transactionRejectedReason.PeriodAmountLimitExceeded"), - ) - .with("PeriodNbTransactionLimitExceeded", () => - t("transactionRejectedReason.PeriodNbTransactionLimitExceeded"), - ) - .with("PinRequiredForFurtherTransaction", () => - t("transactionRejectedReason.PinRequiredForFurtherTransaction"), - ) - .with("ReasonNotSpecifiedByBank", () => t("transactionRejectedReason.ReasonNotSpecifiedByBank")) - .with("ReasonNotSpecifiedByDebtor", () => - t("transactionRejectedReason.ReasonNotSpecifiedByDebtor"), - ) - .with("RegulatoryReason", () => t("transactionRejectedReason.RegulatoryReason")) - .with("RetryWithChipAndPin", () => t("transactionRejectedReason.RetryWithChipAndPin")) - .with("SwanOffline", () => t("transactionRejectedReason.SwanOffline")) - .with("SwanRefused", () => t("transactionRejectedReason.SwanRefused")) - .with("SwanTechnicalErrorOccurred", () => - t("transactionRejectedReason.SwanTechnicalErrorOccurred"), - ) - .with("SwanTimeout", () => t("transactionRejectedReason.SwanTimeout")) - .with("TermsAndConditionsLimitExceeded", () => - t("transactionRejectedReason.TermsAndConditionsLimitExceeded"), - ) - .with("TransactionAmountLimitExceeded", () => - t("transactionRejectedReason.TransactionAmountLimitExceeded"), - ) - .with("TransactionDuplicated", () => t("transactionRejectedReason.TransactionDuplicated")) - .with("TransactionOnAccountTypeNotAllowed", () => - t("transactionRejectedReason.TransactionOnAccountTypeNotAllowed"), - ) - .with("TransactionTypeNotAllowed", () => - t("transactionRejectedReason.TransactionTypeNotAllowed"), - ) - .with("InvalidTransferDate", () => t("transactionRejectedReason.InvalidTransferDate")) + match(`transactionRejectedReason.${reason}`) + .with(P.when(isTranslationKey), key => t(key)) .otherwise(() => undefined); export const getFeesDescription = (fees: Exclude) => - match(fees) - .with("CardPaymentsOutsideSEPA", () => - t("transaction.fees.description.cardPaymentsOutsideSEPA"), - ) - .with("CashWithdrawalsOutsideSEPA", () => - t("transaction.fees.description.cashWithdrawalsOutsideSEPA"), - ) - .with("CashWithdrawalsWithinSEPA", () => - t("transaction.fees.description.cashWithdrawalsWithinSEPA"), - ) - .with("CirculationLetterDraftingFee", () => - t("transaction.fees.description.circulationLetterDraftingFee"), - ) - .with("DirectDebitRejection", () => t("transaction.fees.description.directDebitRejection")) - .with("ImproperUseOfAccount", () => t("transaction.fees.description.improperUseOfAccount")) - .with("ProcessingJudicialOrAdministrativeSeizure", () => - t("transaction.fees.description.processingJudicialOrAdministrativeSeizure"), - ) - .with("UnauthorizedOverdraft", () => t("transaction.fees.description.unauthorizedOverdraft")) - .with("ConfirmationLetterDraftingFee", () => - t("transaction.fees.description.confirmationLetterDraftingFee"), - ) - .with("CheckIncident", () => t("transaction.fees.description.checkIncident")) - .with("CheckDeposit", () => t("transaction.fees.description.checkDeposit")) - .with("PhysicalCardPrinting", () => t("transaction.fees.description.physicalCardPrinting")) - .with("PhysicalCardDeliveryFrance", () => - t("transaction.fees.description.physicalCardDeliveryFrance"), - ) - .with("PhysicalCardDeliveryIntl", () => - t("transaction.fees.description.physicalCardDeliveryIntl"), - ) - .with("PhysicalCardDeliveryExpress", () => - t("transaction.fees.description.physicalCardDeliveryExpress"), - ) - .with("InternationalCreditTransferInGroup1", () => - t("transaction.fees.description.internationalCreditTransferInGroup1"), - ) - .with("InternationalCreditTransferInGroup2", () => - t("transaction.fees.description.internationalCreditTransferInGroup2"), - ) - .with("InternationalCreditTransferInGroup3", () => - t("transaction.fees.description.internationalCreditTransferInGroup3"), - ) - .with("InternationalCreditTransferInGroup4", () => - t("transaction.fees.description.internationalCreditTransferInGroup4"), - ) - .with("InternationalCreditTransferOutGroup1", () => - t("transaction.fees.description.internationalCreditTransferOutGroup1"), - ) - .with("InternationalCreditTransferOutGroup2", () => - t("transaction.fees.description.internationalCreditTransferOutGroup2"), - ) - .with("InternationalCreditTransferOutGroup3", () => - t("transaction.fees.description.internationalCreditTransferOutGroup3"), - ) - .with("InternationalCreditTransferOutGroup4", () => - t("transaction.fees.description.internationalCreditTransferOutGroup4"), - ) - .with("SepaDirectDebitInB2bLevel1", () => - t("transaction.fees.description.sepaDirectDebitInB2bLevel1"), - ) - .with("SepaDirectDebitInB2bLevel2", () => - t("transaction.fees.description.sepaDirectDebitInB2bLevel2"), - ) - .with("SepaDirectDebitInCoreLevel1", () => - t("transaction.fees.description.sepaDirectDebitInCoreLevel1"), - ) - .with("SepaDirectDebitInCoreLevel2", () => - t("transaction.fees.description.sepaDirectDebitInCoreLevel2"), - ) - .with("SepaDirectDebitInCoreReturn", () => - t("transaction.fees.description.sepaDirectDebitInCoreReturn"), - ) + match(`transaction.fees.description.${fees}`) + .with(P.when(isTranslationKey), key => t(key)) .otherwise(() => undefined); diff --git a/clients/onboarding/src/utils/i18n.tsx b/clients/onboarding/src/utils/i18n.tsx index 1d72703ff..161cf0761 100644 --- a/clients/onboarding/src/utils/i18n.tsx +++ b/clients/onboarding/src/utils/i18n.tsx @@ -1,4 +1,5 @@ import { createIntl, createIntlCache } from "@formatjs/intl"; +import { Dict } from "@swan-io/boxed"; import { CountryCCA3 } from "@swan-io/shared-business/src/constants/countries"; import { LANGUAGE_FALLBACK, @@ -36,9 +37,13 @@ dayjs.extend(localizedFormat); const supportedLanguages = ["en", "es", "de", "fr", "it", "nl", "pt", "fi"] as const; type SupportedLanguage = (typeof supportedLanguages)[number]; -export type TranslationKey = keyof typeof translationEN; +const translationKeys = Dict.keys(translationEN); +export type TranslationKey = (typeof translationKeys)[number]; export type TranslationParams = Record; +export const isTranslationKey = (value: unknown): value is TranslationKey => + typeof value === "string" && translationKeys.includes(value as TranslationKey); + type Locale = { language: SupportedLanguage; translations: Record; diff --git a/clients/onboarding/src/utils/templateTranslations.ts b/clients/onboarding/src/utils/templateTranslations.ts index 407dc6925..f05763407 100644 --- a/clients/onboarding/src/utils/templateTranslations.ts +++ b/clients/onboarding/src/utils/templateTranslations.ts @@ -3,38 +3,19 @@ import { translateError } from "@swan-io/shared-business/src/utils/i18n"; import { match, P } from "ts-pattern"; import type { CombinedError } from "urql"; import { CompanyType } from "../graphql/unauthenticated"; -import { t } from "./i18n"; +import { isTranslationKey, t } from "./i18n"; -export const getErrorFieldLabel = (field: string) => { - return match(field) - .with("email", () => t("step.finalizeError.email")) - .with("address", () => t("step.finalizeError.address")) - .with("city", () => t("step.finalizeError.city")) - .with("country", () => t("step.finalizeError.country")) - .with("postalCode", () => t("step.finalizeError.postalCode")) - .with("employmentStatus", () => t("step.finalizeError.employmentStatus")) - .with("monthlyIncome", () => t("step.finalizeError.monthlyIncome")) - .with("registrationNumber", () => t("step.finalizeError.registrationNumber")) - .with("vatNumber", () => t("step.finalizeError.vatNumber")) - .with("taxIdentificationNumber", () => t("step.finalizeError.taxIdentificationNumber")) - .with("businessActivity", () => t("step.finalizeError.businessActivity")) - .with("businessActivityDescription", () => t("step.finalizeError.businessActivityDescription")) - .with("monthlyPaymentVolume", () => t("step.finalizeError.monthlyPaymentVolume")) +export const getErrorFieldLabel = (field: string) => + match(`step.finalizeError.${field}`) + .with(P.when(isTranslationKey), key => t(key)) .otherwise(() => field); -}; type UpdateOnboardingError = | Error | CombinedError - | { - __typename: "ForbiddenRejection"; - } - | { - __typename: "InternalErrorRejection"; - } - | { - __typename: "ValidationRejection"; - }; + | { __typename: "ForbiddenRejection" } + | { __typename: "InternalErrorRejection" } + | { __typename: "ValidationRejection" }; export const getUpdateOnboardingError = ( error: UpdateOnboardingError,