From 0356463cb5447f0f1fc47cc2599d41d96b768b9b Mon Sep 17 00:00:00 2001 From: Filip Naumovski Date: Tue, 10 Oct 2023 13:12:01 +0200 Subject: [PATCH] fix: run i18next, add missing translations --- public/locales/en/account.json | 3 +-- public/locales/en/common.json | 1 - public/locales/en/user.json | 4 +++- public/locales/es/account.json | 3 +-- public/locales/es/common.json | 1 - public/locales/es/user.json | 6 ++++-- src/containers/Profiles/Form.tsx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/locales/en/account.json b/public/locales/en/account.json index a5acc260d..5d395fffa 100644 --- a/public/locales/en/account.json +++ b/public/locales/en/account.json @@ -100,8 +100,7 @@ "edit_card": "Edit card", "paypal": "PayPal", "update_payment_details": "Update payment details", - "update_payment_success": "Your payment details have been updated", - "longer_than_usual": "The payment is taking longer than usual. Please try again later." + "update_payment_success": "Your payment details have been updated" }, "periods": { "day_one": "day", diff --git a/public/locales/en/common.json b/public/locales/en/common.json index e917c625f..9d912c722 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -19,7 +19,6 @@ "live": "LIVE", "now": "Now", "optional": "(Optional)", - "play_item": "Play {{title}}", "scheduled": "Scheduled", "series": "series", "sign_in": "Sign in", diff --git a/public/locales/en/user.json b/public/locales/en/user.json index e69f3180e..ac1d07785 100644 --- a/public/locales/en/user.json +++ b/public/locales/en/user.json @@ -135,8 +135,10 @@ "no_one_watching": "There’s no one watching.", "validation": { "name": { + "invalid_characters": "Your profile name can only contain letters, numbers, and spaces.", "required": "Please enter a name for your profile.", - "too_short": "Please enter at least 2 characters." + "too_long": "Please limit your profile name to {{count}} characters or fewer.", + "too_short": "Please enter at least {{count}} characters." } }, "watch_now": "Watch now" diff --git a/public/locales/es/account.json b/public/locales/es/account.json index 1d6eb7937..6651cdbeb 100644 --- a/public/locales/es/account.json +++ b/public/locales/es/account.json @@ -106,8 +106,7 @@ "edit_card": "Editar tarjeta", "paypal": "PayPal", "update_payment_details": "Actualizar detalles de pago", - "update_payment_success": "Sus detalles de pago han sido actualizados", - "longer_than_usual": "El pago está tardando más de lo habitual. Por favor, inténtelo de nuevo más tarde." + "update_payment_success": "Sus detalles de pago han sido actualizados" }, "periods": { "day_one": "día", diff --git a/public/locales/es/common.json b/public/locales/es/common.json index 45c5af95c..8b2684f24 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -19,7 +19,6 @@ "live": "EN VIVO", "now": "Ahora", "optional": "(Opcional)", - "play_item": "Reproducir {{title}}", "scheduled": "Programada", "series": "serie", "sign_in": "Iniciar sesión", diff --git a/public/locales/es/user.json b/public/locales/es/user.json index 1ebb00dbb..d723386a8 100644 --- a/public/locales/es/user.json +++ b/public/locales/es/user.json @@ -132,8 +132,10 @@ "no_one_watching": "No hay nadie mirando.", "validation": { "name": { - "required": "Por favor", - "too_short": "Por favor" + "invalid_characters": "", + "required": "", + "too_long": "", + "too_short": "" } }, "watch_now": "" diff --git a/src/containers/Profiles/Form.tsx b/src/containers/Profiles/Form.tsx index 05b678d22..be6e82900 100644 --- a/src/containers/Profiles/Form.tsx +++ b/src/containers/Profiles/Form.tsx @@ -44,8 +44,8 @@ const Form = ({ initialValues, formHandler, selectedAvatar, showCancelButton = t name: string() .trim() .required(t('profile.validation.name.required')) - .min(3, t('profile.validation.name.too_short')) - .max(30, t('profile.validation.name.too_long')) + .min(3, t('profile.validation.name.too_short', { count: 3 })) + .max(30, t('profile.validation.name.too_long', { count: 30 })) .matches(/^[a-zA-Z0-9\s]*$/, t('profile.validation.name.invalid_characters')), });