diff --git a/examples/magento-graphcms/locales/de.po b/examples/magento-graphcms/locales/de.po index 06e91f942f..6c285e2804 100644 --- a/examples/magento-graphcms/locales/de.po +++ b/examples/magento-graphcms/locales/de.po @@ -301,6 +301,9 @@ msgstr "Inklusive {0}" msgid "Increase" msgstr "Erhöhen" +msgid "Invalid date" +msgstr "Ungültiges Datum" + msgid "Invalid email address" msgstr "Ungültige E-Mail-Adresse" @@ -700,6 +703,9 @@ msgstr "Die Zahlung wurde nicht abgeschlossen, bitte versuchen Sie es erneut ode msgid "The payment is refused, please try again or select a different payment method." msgstr "Die Zahlung wurde abgelehnt, bitte versuchen Sie es erneut oder wählen Sie eine andere Zahlungsmethode aus." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "Es gibt maximal '{maxLength}' Zeichen" + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "Dieser Warenkorb ist {email} zugewiesen. Bitte melden Sie sich an, um mit dem Einkauf fortzufahren." diff --git a/examples/magento-graphcms/locales/en.po b/examples/magento-graphcms/locales/en.po index da933d7ee6..e22e47cefc 100644 --- a/examples/magento-graphcms/locales/en.po +++ b/examples/magento-graphcms/locales/en.po @@ -301,6 +301,9 @@ msgstr "Including {0}" msgid "Increase" msgstr "Increase" +msgid "Invalid date" +msgstr "Invalid date" + msgid "Invalid email address" msgstr "Invalid email address" @@ -700,6 +703,9 @@ msgstr "The payment hasn't completed, please try again or select a different pay msgid "The payment is refused, please try again or select a different payment method." msgstr "The payment is refused, please try again or select a different payment method." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "There is a maximum of ‘{maxLength}’ characters" + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "This cart is assigned to {email}. Please sign in to continue shopping." diff --git a/examples/magento-graphcms/locales/es.po b/examples/magento-graphcms/locales/es.po index df90aed381..5036f58d4b 100644 --- a/examples/magento-graphcms/locales/es.po +++ b/examples/magento-graphcms/locales/es.po @@ -301,6 +301,9 @@ msgstr "Incluyendo {0}" msgid "Increase" msgstr "Aumentar" +msgid "Invalid date" +msgstr "Fecha invalida" + msgid "Invalid email address" msgstr "Dirección de correo electrónico no válida" @@ -700,6 +703,9 @@ msgstr "El pago no se ha completado, inténtelo de nuevo o seleccione un método msgid "The payment is refused, please try again or select a different payment method." msgstr "El pago se ha rechazado, inténtelo de nuevo o seleccione un método de pago diferente." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "Hay un máximo de caracteres '{maxLength}'" + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "Este carrito está asignado a {email}. Inicie sesión para continuar comprando." diff --git a/examples/magento-graphcms/locales/fr.po b/examples/magento-graphcms/locales/fr.po index 124563e7b5..b512644f01 100644 --- a/examples/magento-graphcms/locales/fr.po +++ b/examples/magento-graphcms/locales/fr.po @@ -301,6 +301,9 @@ msgstr "Incluant {0}" msgid "Increase" msgstr "Augmenter" +msgid "Invalid date" +msgstr "Date invalide" + msgid "Invalid email address" msgstr "Adresse email invalide" @@ -700,6 +703,9 @@ msgstr "Le paiement n'a pas été complété, veuillez réessayer ou sélectionn msgid "The payment is refused, please try again or select a different payment method." msgstr "Le paiement est refusé, veuillez réessayer ou sélectionner une autre méthode de paiement." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "Il y a un maximum de caractères '{maxLength}'" + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "Ce panier est assigné à {email}. Veuillez vous connecter pour continuer vos achats." diff --git a/examples/magento-graphcms/locales/it.po b/examples/magento-graphcms/locales/it.po index 5ae0d10a29..dd47d45342 100644 --- a/examples/magento-graphcms/locales/it.po +++ b/examples/magento-graphcms/locales/it.po @@ -301,6 +301,9 @@ msgstr "Incluso {0}" msgid "Increase" msgstr "Aumentare" +msgid "Invalid date" +msgstr "Data non valida" + msgid "Invalid email address" msgstr "Indirizzo email non valido" @@ -700,6 +703,9 @@ msgstr "Il pagamento non è stato completato, riprova o seleziona un metodo di p msgid "The payment is refused, please try again or select a different payment method." msgstr "Il pagamento è stato rifiutato, riprova o seleziona un metodo di pagamento differente." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "È consentito un massimo di caratteri \"{maxLength}\"." + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "Questo carrello è assegnato a {email}. Accedi per continuare gli acquisti." diff --git a/examples/magento-graphcms/locales/nl.po b/examples/magento-graphcms/locales/nl.po index f3de08058d..1dc634594b 100644 --- a/examples/magento-graphcms/locales/nl.po +++ b/examples/magento-graphcms/locales/nl.po @@ -301,6 +301,9 @@ msgstr "Inclusief {0}" msgid "Increase" msgstr "Verhogen" +msgid "Invalid date" +msgstr "Ongeldige datum" + msgid "Invalid email address" msgstr "Ongeldig e-mailadres" @@ -700,6 +703,9 @@ msgstr "De betaling is niet voltooid, probeer het opnieuw of selecteer een ander msgid "The payment is refused, please try again or select a different payment method." msgstr "De betaling is geweigerd, probeer het opnieuw of selecteer een andere betaalmethode." +msgid "There is a maximum of ‘{maxLength}’ characters" +msgstr "Er is een maximum van ‘{maxLength}’ karakters" + msgid "This cart is assigned to {email}. Please sign in to continue shopping." msgstr "Deze winkelwagen is toegewezen aan {email}. Log in om verder te winkelen." diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableAreaOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableAreaOption.tsx index 0e7a7c1e2b..1e3f0842ca 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableAreaOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableAreaOption.tsx @@ -1,6 +1,7 @@ import { TextFieldElement } from '@graphcommerce/ecommerce-ui' import { CurrencyEnum } from '@graphcommerce/graphql-mesh' import { TypeRenderer } from '@graphcommerce/next-ui' +import { i18n } from '@lingui/core' import React from 'react' import { useFormAddProductsToCart } from '../AddProductsToCart' import { ProductCustomizableFragment } from './ProductCustomizable.gql' @@ -39,7 +40,12 @@ export function CustomizableAreaOption(props: CustomizableAreaOptionProps) { label={title} required={Boolean(required)} validation={{ maxLength }} - helperText={(maxLength ?? 0) > 0 && `A maximum of ${maxLength}`} + helperText={ + (maxLength ?? 0) > 0 && + i18n._(/* i18n*/ 'There is a maximum of ‘{maxLength}’ characters', { + maxLength, + }) + } /> ) diff --git a/packages/magento-product/components/ProductCustomizable/CustomizableFieldOption.tsx b/packages/magento-product/components/ProductCustomizable/CustomizableFieldOption.tsx index 3ba2db2db1..768096d1c5 100644 --- a/packages/magento-product/components/ProductCustomizable/CustomizableFieldOption.tsx +++ b/packages/magento-product/components/ProductCustomizable/CustomizableFieldOption.tsx @@ -32,12 +32,17 @@ export function CustomizableFieldOption(props: CustomizableFieldOptionProps) { validation={{ maxLength: { value: maxLength, - message: i18n._(/* i18n*/ 'There is a maximum of ‘{maxLength}’ characters', { + message: i18n._(/* i18n*/ 'There is a maximum of ‘{maxLength}’ characters', { maxLength, }), }, }} - helperText={(maxLength ?? 0) > 0 && `A maximum of ${maxLength} characters`} + helperText={ + (maxLength ?? 0) > 0 && + i18n._(/* i18n*/ 'There is a maximum of ‘{maxLength}’ characters', { + maxLength, + }) + } /> )