From 3051bd723a1a45cd9d68d053df7acfe1fd327de5 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 11:37:53 +0100 Subject: [PATCH 01/14] feat: wrap app in aria-live div for accessibility --- src/Page.tsx | 280 ++++++++++++++++++++++++++------------------------- 1 file changed, 141 insertions(+), 139 deletions(-) diff --git a/src/Page.tsx b/src/Page.tsx index 6705cf223..9d5cb261b 100644 --- a/src/Page.tsx +++ b/src/Page.tsx @@ -57,152 +57,154 @@ function Page() { return ( - - - - - - - - - - +
+ + + + + + + + + + - + - ( - - )} - /> + ( + + )} + /> - + - - ( - - )} - /> - ( - - )} - /> + + ( + + )} + /> + ( + + )} + /> - - - - - - + + + + + + - - - - ( - - )} - /> - ( - - )} - /> - ( - - )} - /> - ( - - )} - /> + + + + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> - - - - - - {/* TODO Temporary route */} - - - } - /> - - + + + + + + {/* TODO Temporary route */} + + + } + /> + + +
); } From e507b6f1e102e82f97bd27c5aa948026d1f11861 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 14:53:30 +0100 Subject: [PATCH 02/14] feat(signup): step0 validation focus --- .../GettingStarted/NewSignupForm/Step0/useNextStep.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/GettingStarted/NewSignupForm/Step0/useNextStep.tsx b/src/pages/GettingStarted/NewSignupForm/Step0/useNextStep.tsx index 267b69aa3..a9a3d2840 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step0/useNextStep.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step0/useNextStep.tsx @@ -42,7 +42,13 @@ const useNextStep = () => { ) ); } else { - if (Object.keys(errors).length) return; + if (Object.keys(errors).length) { + const inputElement = document.querySelector( + `input[name="${Object.keys(errors)[0]}"]` + ) as HTMLInputElement; + inputElement?.focus(); + return; + } setFieldValue("step", 1); } }); From b89132027d387eba52f91ec357552c599a6b86da Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 16:22:49 +0100 Subject: [PATCH 03/14] chore: update des sys --- package.json | 2 +- src/locales/en/translation.json | 2 ++ src/locales/es/translation.json | 2 ++ src/locales/it/translation.json | 2 ++ yarn.lock | 8 ++++---- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 43c6573ee..c73e61772 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "private": true, "dependencies": { - "@appquality/appquality-design-system": "^1.0.62", + "@appquality/appquality-design-system": "^1.0.65", "@appquality/craft-blocks": "^0.1.27", "@datadog/browser-logs": "^3.4.1", "@reduxjs/toolkit": "^1.8.2", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 9fb0687ea..08619088a 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -211,6 +211,7 @@ "Courses": "Courses", "Create an account": "Create an account", "Create your account": "Create your account", + "Current Page": "", "Current password": "Current password", "DATE_OF_BIRTH": { "BitrhdayPicker": "Date of birth", @@ -309,6 +310,7 @@ "Invalid tax profile.": "Invalid tax profile.", "Keep": "Keep", "Language": "Language", + "Language switcher menu": "", "Last Name": "Last Name", "Leaderboard": "Ranking", "Learn More": "Learn More", diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index 791f622a6..369b77870 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -211,6 +211,7 @@ "Courses": "Cursos", "Create an account": "Crear una cuenta", "Create your account": "Crea una cuenta", + "Current Page": "", "Current password": "Password actual", "DATE_OF_BIRTH": { "BitrhdayPicker": "Fecha de nacimiento", @@ -309,6 +310,7 @@ "Invalid tax profile.": "Perfil fiscal inválido", "Keep": "Mantener", "Language": "Idioma", + "Language switcher menu": "", "Last Name": "Apellido", "Leaderboard": "Clasificación", "Learn More": "Saber Más", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 62759a09e..ca831abf0 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -211,6 +211,7 @@ "Courses": "Corsi", "Create an account": "Crea un account", "Create your account": "Crea un nuovo account", + "Current Page": "", "Current password": "Password attuale", "DATE_OF_BIRTH": { "BitrhdayPicker": "Data di nascita", @@ -309,6 +310,7 @@ "Invalid tax profile.": "Profilo fiscale invalido", "Keep": "Mantieni", "Language": "Lingua", + "Language switcher menu": "", "Last Name": "Cognome", "Leaderboard": "Classifica", "Learn More": "Scopri di più", diff --git a/yarn.lock b/yarn.lock index c0a3e71ec..5abac4838 100644 --- a/yarn.lock +++ b/yarn.lock @@ -47,10 +47,10 @@ ajv-draft-04 "^1.0.0" call-me-maybe "^1.0.1" -"@appquality/appquality-design-system@^1.0.62": - version "1.0.63" - resolved "https://registry.yarnpkg.com/@appquality/appquality-design-system/-/appquality-design-system-1.0.63.tgz#659d96f976e7a947b0b7ba8c23b4ebed058af39e" - integrity sha512-O7O0rbuAjwcWrhSIQBco8whBEodqXiGN9C5FjwxwD03nNO11Oq6nNHAQaIwTW4Rav64B43PFYvVlXPsBZpNIMQ== +"@appquality/appquality-design-system@^1.0.65": + version "1.0.66" + resolved "https://registry.yarnpkg.com/@appquality/appquality-design-system/-/appquality-design-system-1.0.66.tgz#1a42092b7f50dd4b19ec05029358e287c558cffb" + integrity sha512-X9dW5Ipd7QDHmLdwONia4LaBr3Wo5lzJHD+kNBCzGtEAA1lLRe3siomIWZGAEA/FGCAPp0tngy/PK5ZnknYsOw== dependencies: "@appquality/mobiscroll" "^5.10.1" formik "^2.2.9" From 7e9b58bef74a00ee76f6a3e3cdc64658e964ef4f Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 16:24:37 +0100 Subject: [PATCH 04/14] feat(a11y): language switcher menu --- src/features/LangMenu.tsx | 90 ++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 26 deletions(-) diff --git a/src/features/LangMenu.tsx b/src/features/LangMenu.tsx index 5043bfebd..5064a1083 100644 --- a/src/features/LangMenu.tsx +++ b/src/features/LangMenu.tsx @@ -3,7 +3,7 @@ import styled from "styled-components"; import { BaseProps } from "@appquality/appquality-design-system/dist/shared/_types"; -const StyledMenu = styled.div` +const StyledMenu = styled.nav` color: ${(props) => props.theme.palette.primary}; min-height: 24px; text-align: right; @@ -17,6 +17,16 @@ const StyledMenu = styled.div` pointer-events: none; } } + li { + display: inline-block; + margin: 0; + padding: 0; + &:not(:last-child) a { + margin-right: 0.4em; + padding-right: 0.4em; + border-right: 1px solid ${(props) => props.theme.palette.primary}; + } + } `; interface LangMenuProps extends BaseProps { @@ -31,32 +41,60 @@ export const LangMenu = ({ esLink, className, }: LangMenuProps) => { - const { i18n } = useTranslation(); + const { i18n, t } = useTranslation(); return ( - - - Italiano - {" "} - |{" "} - - English - {" "} - |{" "} - - Español - + + + {t("Language switcher menu")} + + ); }; From 75ac710e5134944a1beea12e19eeecf80a469c47 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 16:25:48 +0100 Subject: [PATCH 05/14] feat(signup): a11y step 0 --- .../NewSignupForm/Step0/EmailInput.tsx | 4 +- .../NewSignupForm/Step0/PasswordInput.tsx | 10 +++- .../Step0/PasswordRequirements.tsx | 54 ++++++++++--------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/src/pages/GettingStarted/NewSignupForm/Step0/EmailInput.tsx b/src/pages/GettingStarted/NewSignupForm/Step0/EmailInput.tsx index d381584ab..05586ce0a 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step0/EmailInput.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step0/EmailInput.tsx @@ -27,6 +27,8 @@ const EmailInput = ({ className }: { className?: string }) => { ...field, "data-qa": "email-input", "aria-required": true, + "aria-invalid": meta.touched && typeof meta.error == "string", + "aria-errormessage": `${field.name}-error`, }} isInvalid={meta.touched && typeof meta.error == "string"} value={field.value} @@ -34,7 +36,7 @@ const EmailInput = ({ className }: { className?: string }) => { type="text" placeholder="mail@example.com" /> - + )} diff --git a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordInput.tsx b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordInput.tsx index 5de086da8..fb1e50f19 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordInput.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordInput.tsx @@ -23,14 +23,20 @@ const PasswordInput = ({ className }: { className?: string }) => { } />{" "} - + )} diff --git a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx index dbfcf4cfe..dc965b4bf 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx @@ -19,14 +19,14 @@ const PasswordRequirement = ({ "data-qa"?: string; }) => { return ( -
+
  • {check() ? ( ) : ( )} {children} -
  • + ); }; @@ -39,30 +39,32 @@ const PasswordRequirements = () => { {t("PASSWORD_VALIDATOR:::Password requirements:")} - values.password.length >= 6} - > - {t("PASSWORD_VALIDATOR:::minimum of 6 characters")} - - values.password.match(/[A-Z]/) !== null} - > - {t("PASSWORD_VALIDATOR:::contain an uppercase letter")} - - values.password.match(/[a-z]/) !== null} - > - {t("PASSWORD_VALIDATOR:::contain a lowercase letter")} - - values.password.match(/[0-9]/) !== null} - > - {t("PASSWORD_VALIDATOR:::contain a number")} - +
      + values.password.length >= 6} + > + {t("PASSWORD_VALIDATOR:::minimum of 6 characters")} + + values.password.match(/[A-Z]/) !== null} + > + {t("PASSWORD_VALIDATOR:::contain an uppercase letter")} + + values.password.match(/[a-z]/) !== null} + > + {t("PASSWORD_VALIDATOR:::contain a lowercase letter")} + + values.password.match(/[0-9]/) !== null} + > + {t("PASSWORD_VALIDATOR:::contain a number")} + +
    ); }; From 02c5d4a9b7cb94f0280764c3d47be85ff2c3cab8 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 16:28:58 +0100 Subject: [PATCH 06/14] chore: update des sys --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c73e61772..ffa0e39e9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "private": true, "dependencies": { - "@appquality/appquality-design-system": "^1.0.65", + "@appquality/appquality-design-system": "^1.0.67", "@appquality/craft-blocks": "^0.1.27", "@datadog/browser-logs": "^3.4.1", "@reduxjs/toolkit": "^1.8.2", diff --git a/yarn.lock b/yarn.lock index 5abac4838..a8c5f0586 100644 --- a/yarn.lock +++ b/yarn.lock @@ -47,7 +47,7 @@ ajv-draft-04 "^1.0.0" call-me-maybe "^1.0.1" -"@appquality/appquality-design-system@^1.0.65": +"@appquality/appquality-design-system@^1.0.67": version "1.0.66" resolved "https://registry.yarnpkg.com/@appquality/appquality-design-system/-/appquality-design-system-1.0.66.tgz#1a42092b7f50dd4b19ec05029358e287c558cffb" integrity sha512-X9dW5Ipd7QDHmLdwONia4LaBr3Wo5lzJHD+kNBCzGtEAA1lLRe3siomIWZGAEA/FGCAPp0tngy/PK5ZnknYsOw== From fdb4235bcfeb3a2595daf093d9609e0b618260dd Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 17:15:09 +0100 Subject: [PATCH 07/14] chore: update des-sys --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a8c5f0586..e8d126e06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -48,9 +48,9 @@ call-me-maybe "^1.0.1" "@appquality/appquality-design-system@^1.0.67": - version "1.0.66" - resolved "https://registry.yarnpkg.com/@appquality/appquality-design-system/-/appquality-design-system-1.0.66.tgz#1a42092b7f50dd4b19ec05029358e287c558cffb" - integrity sha512-X9dW5Ipd7QDHmLdwONia4LaBr3Wo5lzJHD+kNBCzGtEAA1lLRe3siomIWZGAEA/FGCAPp0tngy/PK5ZnknYsOw== + version "1.0.67" + resolved "https://registry.yarnpkg.com/@appquality/appquality-design-system/-/appquality-design-system-1.0.67.tgz#e822454a7c7345f3a699087c80b1ae9567bf7c89" + integrity sha512-uIEJrX+PgVc4yF/4ciFYuqnP9v78PtYRpSfHx42/iEmI9qx2bFXuxuAgU8003+DBdmb33A7LLe0k0axoLUNLuA== dependencies: "@appquality/mobiscroll" "^5.10.1" formik "^2.2.9" From 352cb91efe9397dfd47e3bae97fb8ef84ea7a76f Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 17:29:35 +0100 Subject: [PATCH 08/14] Add translation support to SiteWideMessages component --- src/features/SiteWideMessages.tsx | 10 +++++++++- src/locales/en/translation.json | 5 +++++ src/locales/es/translation.json | 5 +++++ src/locales/it/translation.json | 5 +++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/features/SiteWideMessages.tsx b/src/features/SiteWideMessages.tsx index 15be42947..6a213f6bd 100644 --- a/src/features/SiteWideMessages.tsx +++ b/src/features/SiteWideMessages.tsx @@ -2,6 +2,7 @@ import { Toastr, BSGrid } from "@appquality/appquality-design-system"; import { TransitionGroup, CSSTransition } from "react-transition-group"; import siteWideMessageStore from "../redux/siteWideMessages"; import styled from "styled-components"; +import { useTranslation } from "react-i18next"; const TIMEOUT = 200; const ToastrContainer = styled.div` @@ -38,7 +39,7 @@ const ToastrContainer = styled.div` const SiteWideMessages = () => { const { messages, remove } = siteWideMessageStore(); - + const { t } = useTranslation(); return ( @@ -47,6 +48,13 @@ const SiteWideMessages = () => { remove({ uuid: m.uuid })} > diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 08619088a..9aedfc971 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -195,6 +195,7 @@ "City of birth": "City of birth", "Close": "Close", "Close Date": "Close Date", + "Close dialog": "", "Closed": "Closed", "Coming soon": "Coming soon", "Complete the Basic Course": "Start with the Basic Course", @@ -245,6 +246,7 @@ "Email {{email}} already registered": "Email {{email}} already registered", "Employment": "Employment", "End Date": "End Date", + "Error": "", "Experience Points": "Experience Points", "Extra Award": "Extra Award", "FAQ": "FAQ", @@ -302,6 +304,7 @@ "If you have problems filling in your fiscal informations please": "If you have problems filling in your fiscal informations please", "Improve your chances of being selected in test campaigns by completing your profile.": "Improve your chances of being selected in campaigns by completing your profile.", "Inbox": "Inbox", + "Info": "", "Informations": "Informations", "Insert Name and surname separated by space": "Insert name and surname separated by space", "Institute": "Institute", @@ -475,6 +478,7 @@ "Street": "Street", "Street N°": "Street N°", "Submitted bugs": "Submitted bugs", + "Success": "", "Surname": "Surname", "Take me to the dashboard": "Let the adventure begin", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Everything starts from here: only after completing the Basic TRYBER Course you will be eligible for the campaigns. And that is not all, you'll earn 200 experience points, get an overview of the world of TRYBER, be part of qualified members and receive a certification that you can share on LinkedIn. ", @@ -533,6 +537,7 @@ "View payments page": "View wallet page", "WELCOME_SIGNUP_MESSAGE": "Welcome aboard!
    We have sent you a welcome email to the address you used in the sign up process.Now it’s time to explore the TRYBER universe: choose among our University courses, apply for test campaigns and join our community!", "Wallet": "Wallet", + "Warning": "", "We couldn't find a city with that name, please search again": "We couldn't find a city with that name, please search again", "We couldn't update your profile. Try again.": "We couldn't update your profile. Try again.", "We couldn't validate your tax id.": "We couldn't validate your tax id.", diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index 369b77870..cf70cdef6 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -195,6 +195,7 @@ "City of birth": "Ciudad de nacimiento", "Close": "Cerrar", "Close Date": "Fecha de Cierre", + "Close dialog": "", "Closed": "Cerrado", "Coming soon": "Próximamente", "Complete the Basic Course": "Empieza por el Curso Básico", @@ -245,6 +246,7 @@ "Email {{email}} already registered": "Email {{email}} già presente", "Employment": "Empleo", "End Date": "Fecha Final", + "Error": "", "Experience Points": "Puntos de Experiencia", "Extra Award": "Recompensa Extra", "FAQ": "Preguntas Frecuentes", @@ -302,6 +304,7 @@ "If you have problems filling in your fiscal informations please": "Si tiene problemas para completar su información fiscal, por favor", "Improve your chances of being selected in test campaigns by completing your profile.": "Mejora tus posibilidades de ser seleccionado en campañas completando tu perfil.", "Inbox": "Inbox", + "Info": "", "Informations": "Informaciones", "Insert Name and surname separated by space": "Insertar nombre y apellido separados por espacio", "Institute": "Instituto", @@ -475,6 +478,7 @@ "Street": "Calle", "Street N°": "Número de casa", "Submitted bugs": "Bugs enviados", + "Success": "", "Surname": "Apellido(s)", "Take me to the dashboard": "Que empiece la aventura", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Todo comienza aquí: solo cuando hayas completado el Curso Básico TRYBER te invitaremos a partecipar en las campañas. Además, ganarás 200 puntos de experiencia, conocerás el mundo de TRYBER, te convertirás en un miembro cualificado y recibirás una certificación que podrás compartir en LinkedIn.", @@ -533,6 +537,7 @@ "View payments page": "Ver página de monedero", "WELCOME_SIGNUP_MESSAGE": "¡Te damos la bienvenida a bordo!
    Te hemos enviado un correo de bienvenida a la dirección que indicaste durante la registración. Descubre el universo TRYBER: elige entre los cursos de Tryber University, apúntate a las campañas de test y toma parte en la comunidad.", "Wallet": "Monedero", + "Warning": "", "We couldn't find a city with that name, please search again": "No pudimos encontrar una ciudad con ese nombre, por favor busca de nuevo", "We couldn't update your profile. Try again.": "No pudimos actualizar tu perfil. Inténtalo de nuevo.", "We couldn't validate your tax id.": "No pudimos validar su identificación fiscal.", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index ca831abf0..c28dc6d12 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -195,6 +195,7 @@ "City of birth": "Città di nascita", "Close": "Chiudi", "Close Date": "Chiusa", + "Close dialog": "", "Closed": "Chiuse", "Coming soon": "Coming soon", "Complete the Basic Course": "Inizia dal Corso Base", @@ -245,6 +246,7 @@ "Email {{email}} already registered": "Email {{email}} già presente", "Employment": "Occupazione", "End Date": "Fine", + "Error": "", "Experience Points": "Punti esperienza", "Extra Award": "Premio extra", "FAQ": "Domande frequenti", @@ -302,6 +304,7 @@ "If you have problems filling in your fiscal informations please": "Se hai problemi nel compilare le tue informazioni fiscali per favore", "Improve your chances of being selected in test campaigns by completing your profile.": "Aumenta le possibilità di venire selezionato in Campagne completando il tuo profilo", "Inbox": "Archivio messaggi", + "Info": "", "Informations": "Informazioni", "Insert Name and surname separated by space": "Inserisci nome e cognome separati da spazi", "Institute": "Istituto", @@ -475,6 +478,7 @@ "Street": "Via", "Street N°": "Numero civico", "Submitted bugs": "Bug caricati", + "Success": "", "Surname": "Cognome", "Take me to the dashboard": "Comincia l'avventura", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Tutto parte da qui: solo quando avrai completato il Corso Base TRYBER ti inviteremo a partecipare alle campagne. In più guadagnerai 200 punti esperienza, avrai una panoramica del mondo di TRYBER, farai parte dei membri qualificati e riceverai una certificazione che potrai condividere su LinkedIn.", @@ -533,6 +537,7 @@ "View payments page": "Vedi la pagina del portafoglio", "WELCOME_SIGNUP_MESSAGE": "È bello averti tra noi
    Ti abbiamo inviato una email di benvenuto all’indirizzo che hai indicato durante la registrazione. Scopri l’universo di TRYBER: scegli tra i corsi della nostra University, candidati a campagne di test e prendi parte alla community.", "Wallet": "Portafoglio", + "Warning": "", "We couldn't find a city with that name, please search again": "Non è stato possibile trovare una città con quel nome, per favore riprova", "We couldn't update your profile. Try again.": "Non è stato possibile aggiornare il tuo profilo. Riprova", "We couldn't validate your tax id.": "Non siamo riusciti a validare il tuo identificativo fiscale.", From d5d22b8c8a376cb091e0f630f42732d3e728d218 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 17:29:49 +0100 Subject: [PATCH 09/14] Add aria-hidden attribute to password requirement icons --- .../NewSignupForm/Step0/PasswordRequirements.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx index dc965b4bf..a7070fc9d 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step0/PasswordRequirements.tsx @@ -21,9 +21,13 @@ const PasswordRequirement = ({ return (
  • {check() ? ( - +
  • From fcea6d24f655437c67102e2f6e39c419983f79ab Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Wed, 17 Jan 2024 17:54:42 +0100 Subject: [PATCH 10/14] feat(signup): focus on invalid fields on step1 --- .../NewSignupForm/Step1/index.tsx | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx b/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx index 6c96a5a92..71653f0cc 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx @@ -16,6 +16,7 @@ import { import CountrySelect from "src/features/CountrySelect"; import styled from "styled-components"; import BirthdayInput from "./BirthdayInput"; +import { useEffect } from "react"; const ButtonWrapper = styled.div` gap: 1rem; @@ -27,7 +28,7 @@ const ButtonWrapper = styled.div` `; const Step1 = () => { const { t } = useTranslation(); - const { setFieldValue, submitForm, isSubmitting } = + const { setFieldValue, submitForm, isSubmitting, errors } = useFormikContext(); const onBackClick = () => { setFieldValue("step", 0); @@ -35,6 +36,15 @@ const Step1 = () => { const onSubmitClick = () => { submitForm(); }; + useEffect(() => { + const errorsKeys = Object.keys(errors); + if (errorsKeys.length > 0 && isSubmitting) { + const inputElement = document.querySelector( + `input[name="${errorsKeys[0]}"]` + ) as HTMLInputElement; + inputElement?.focus(); + } + }, [errors, isSubmitting]); return (
    @@ -65,10 +75,12 @@ const Step1 = () => { required: true, "aria-required": true, "data-qa": "input-name", + "aria-invalid": meta.touched && typeof meta.error == "string", + "aria-errormessage": `${field.name}-error`, }} /> </div> - <ErrorMessage name={field.name} /> + <ErrorMessage id={`${field.name}-error`} name={field.name} /> </FormGroup> )} </FormikField> @@ -95,10 +107,12 @@ const Step1 = () => { required: true, "aria-required": true, "data-qa": "input-surname", + "aria-invalid": meta.touched && typeof meta.error == "string", + "aria-errormessage": `${field.name}-error`, }} /> </div> - <ErrorMessage name={field.name} /> + <ErrorMessage id={`${field.name}-error`} name={field.name} /> </FormGroup> )} </FormikField> @@ -127,7 +141,7 @@ const Step1 = () => { </span> } /> - <ErrorMessage name={name} /> + <ErrorMessage id={`${name}-error`} name={name} /> </div> ); }} From 364f2833e33bfa34f4a4c4022a637f5da107ab1c Mon Sep 17 00:00:00 2001 From: Iacopo Leardini <iacopo.lea@gmail.com> Date: Thu, 18 Jan 2024 11:45:03 +0100 Subject: [PATCH 11/14] fix(login): error style --- src/features/LoginForm/LoginFields.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/LoginForm/LoginFields.tsx b/src/features/LoginForm/LoginFields.tsx index bfc852b88..6b9f65e5a 100644 --- a/src/features/LoginForm/LoginFields.tsx +++ b/src/features/LoginForm/LoginFields.tsx @@ -83,7 +83,7 @@ const LoginFields = ({ cta, error }: LoginFieldsProps) => { <Text className="aq-text-center aq-mb-3 aq-text-primary"> {t("or log in with email and password")} </Text> - <div role="alert" aria-live="polite"> + <div role="alert" aria-live="polite" className="aq-mb-3 aq-text-left"> {error && <ErrorMessageWrapper>{error}</ErrorMessageWrapper>} </div> <FormikField name="email"> From 8a208c98c76af1a1c3cd0228c8eb10e673e6317d Mon Sep 17 00:00:00 2001 From: Iacopo Leardini <iacopo.lea@gmail.com> Date: Thu, 18 Jan 2024 12:00:14 +0100 Subject: [PATCH 12/14] Add aria-invalid and aria-errormessage attributes to BirthdayInput component --- .../GettingStarted/NewSignupForm/Step1/BirthdayInput.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/GettingStarted/NewSignupForm/Step1/BirthdayInput.tsx b/src/pages/GettingStarted/NewSignupForm/Step1/BirthdayInput.tsx index ee53b3163..ba57c07fb 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step1/BirthdayInput.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step1/BirthdayInput.tsx @@ -65,10 +65,12 @@ const BirthdayInput = () => { inputProps={{ required: true, "aria-required": true, + "aria-invalid": meta.touched && typeof meta.error == "string", + "aria-errormessage": `${field.name}-error`, onBlur: () => form.setFieldTouched(field.name), }} /> - <ErrorMessage name={field.name} /> + <ErrorMessage id={`${field.name}-error`} name={field.name} /> </FormGroup> )} </FormikField> From 7a9fba0913a02ffe8d2aa7e07894648c6e9bfe6b Mon Sep 17 00:00:00 2001 From: Iacopo Leardini <iacopo.lea@gmail.com> Date: Thu, 18 Jan 2024 15:53:02 +0100 Subject: [PATCH 13/14] Update language switcher text in getting-started.spec.ts --- tests/e2e/getting-started/getting-started.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/getting-started/getting-started.spec.ts b/tests/e2e/getting-started/getting-started.spec.ts index c0eb01f73..a5311ff6c 100644 --- a/tests/e2e/getting-started/getting-started.spec.ts +++ b/tests/e2e/getting-started/getting-started.spec.ts @@ -46,19 +46,19 @@ test.describe("The getting started page", () => { const languageSwitcher = page.getByTestId("language-switcher"); await expect( languageSwitcher.getByTestId("language-switcher-it") - ).toHaveText("Italiano"); + ).toContainText("Italiano"); await expect( languageSwitcher.getByTestId("language-switcher-it") ).toHaveAttribute("href", "/it/getting-started/"); await expect( languageSwitcher.getByTestId("language-switcher-en") - ).toHaveText("English"); + ).toContainText("English"); await expect( languageSwitcher.getByTestId("language-switcher-en") ).toHaveAttribute("href", "/getting-started/"); await expect( languageSwitcher.getByTestId("language-switcher-es") - ).toHaveText("Español"); + ).toContainText("Español"); await expect( languageSwitcher.getByTestId("language-switcher-es") ).toHaveAttribute("href", "/es/getting-started/"); From a590ac0de12c3de4be41ac7abd0f9ae6e6d713b7 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini <iacopo.lea@gmail.com> Date: Fri, 19 Jan 2024 12:07:08 +0100 Subject: [PATCH 14/14] feat(signup): Update links and translations --- src/features/SiteWideMessages.tsx | 10 ++--- src/locales/en/links.json | 3 ++ src/locales/en/translation.json | 38 ++++++++----------- src/locales/es/links.json | 3 ++ src/locales/es/translation.json | 35 ++++++----------- src/locales/it/links.json | 3 ++ src/locales/it/translation.json | 32 ++++++---------- .../NewSignupForm/Step1/index.tsx | 12 ++++-- src/pages/GettingStarted/index.tsx | 15 ++++++-- .../getting-started/getting-started.spec.ts | 12 +++--- tests/e2e/getting-started/signup-mail.spec.ts | 6 ++- 11 files changed, 86 insertions(+), 83 deletions(-) diff --git a/src/features/SiteWideMessages.tsx b/src/features/SiteWideMessages.tsx index 6a213f6bd..cbc6f0397 100644 --- a/src/features/SiteWideMessages.tsx +++ b/src/features/SiteWideMessages.tsx @@ -49,11 +49,11 @@ const SiteWideMessages = () => { <Toastr type={m.type} a11y={{ - successLabel: t("Success"), - infoLabel: t("Info"), - warningLabel: t("Warning"), - dangerLabel: t("Error"), - closeLabel: t("Close dialog"), + successLabel: t("TOASTR_LABEL:::Success"), + infoLabel: t("TOASTR_LABEL:::Info"), + warningLabel: t("TOASTR_LABEL:::Warning"), + dangerLabel: t("TOASTR_LABEL:::Error"), + closeLabel: t("TOASTR_LABEL:::Close dialog"), }} className="aq-mb-3 fade" onClose={m.expire ? undefined : () => remove({ uuid: m.uuid })} diff --git a/src/locales/en/links.json b/src/locales/en/links.json index 0f4393a75..0827bad83 100644 --- a/src/locales/en/links.json +++ b/src/locales/en/links.json @@ -1,8 +1,11 @@ { + "/ethical-code/": "/ethical-code/", "/payment_conditions": "https://app.tryber.me/payment-conditions/", + "/terms-and-conditions/": "/terms-and-conditions/", "Bug details help article": "https://app.tryber.me/bug-reporting-rules/", "Fiscal type help article": "https://app.tryber.me/it/per-saperne-di-piu-pagamenti-privacy/", "Ranking help article": "https://app.tryber.me/tryber-new-ranking-rules-2022-edition/", "Wallet help article": "https://app.tryber.me/wallet-how-does-it-work/", + "https://www.iubenda.com/privacy-policy/7934311": "https://www.iubenda.com/privacy-policy/7934311", "tax id help article": "https://app.tryber.me/whats-tax-id-number/" } diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 9aedfc971..be6e0f2c0 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -1,7 +1,6 @@ { "...wait": "Loading", "/discover-experience-points/": "/discover-experience-points/", - "/ethical-code/": "", "/faq/": "/faq/", "/my-account/": "/my-account/", "/terms-and-conditions/": "/terms-and-conditions/", @@ -195,7 +194,6 @@ "City of birth": "City of birth", "Close": "Close", "Close Date": "Close Date", - "Close dialog": "", "Closed": "Closed", "Coming soon": "Coming soon", "Complete the Basic Course": "Start with the Basic Course", @@ -205,14 +203,14 @@ "Confirm email": "Confirm email", "Confirm password": "Confirm password", "Connect AppQuality to one of your accounts, this will make it easier for you to access your dashboard": "Connect Tryber to one of your accounts, this will make it easier for you to access your dashboard", - "Continue with Facebook": "", - "Continue with LinkedIn": "", + "Continue with Facebook": "Continue with Facebook", + "Continue with LinkedIn": "Continue with LinkedIn", "Continue with email": "Continue with email", "Countries covered": "Countries covered", "Courses": "Courses", "Create an account": "Create an account", "Create your account": "Create your account", - "Current Page": "", + "Current Page": "Current Page", "Current password": "Current password", "DATE_OF_BIRTH": { "BitrhdayPicker": "Date of birth", @@ -246,7 +244,6 @@ "Email {{email}} already registered": "Email {{email}} already registered", "Employment": "Employment", "End Date": "End Date", - "Error": "", "Experience Points": "Experience Points", "Extra Award": "Extra Award", "FAQ": "FAQ", @@ -304,7 +301,6 @@ "If you have problems filling in your fiscal informations please": "If you have problems filling in your fiscal informations please", "Improve your chances of being selected in test campaigns by completing your profile.": "Improve your chances of being selected in campaigns by completing your profile.", "Inbox": "Inbox", - "Info": "", "Informations": "Informations", "Insert Name and surname separated by space": "Insert name and surname separated by space", "Institute": "Institute", @@ -313,7 +309,7 @@ "Invalid tax profile.": "Invalid tax profile.", "Keep": "Keep", "Language": "Language", - "Language switcher menu": "", + "Language switcher menu": "Language switcher menu", "Last Name": "Last Name", "Leaderboard": "Ranking", "Learn More": "Learn More", @@ -325,7 +321,7 @@ "Hide password": "Hide password", "Show password": "Show password" }, - "MAIL_SIGNUP_TERMS_DISCLAIMER": "", + "MAIL_SIGNUP_TERMS_DISCLAIMER": "By signing up, you also accept the the <terms_link>Terms</terms_link>, <privacy_link>Privacy Policy</privacy_link> and <ethical_link>Ethical Code</ethical_link> of tryber.me", "MODAL_PAYMENT_STEP_TITLE": { "Confirm": "Confirm", "Get email": "Get email", @@ -465,7 +461,7 @@ "Should be exactly 16 characters": "Should be exactly 16 characters", "Signup for Tryber": "Signup for Tryber", "Signup now": "Signup now", - "Signup success": "", + "Signup success": "You’re a Tryber now", "Something went wrong": "Something went wrong", "Spoken languages": "Spoken languages", "Start Date": "Start Date", @@ -478,8 +474,14 @@ "Street": "Street", "Street N°": "Street N°", "Submitted bugs": "Submitted bugs", - "Success": "", "Surname": "Surname", + "TOASTR_LABEL": { + "Close dialog": "Close", + "Error": "Error", + "Info": "Info", + "Success": "Success", + "Warning": "Warning" + }, "Take me to the dashboard": "Let the adventure begin", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Everything starts from here: only after completing the Basic TRYBER Course you will be eligible for the campaigns. And that is not all, you'll earn 200 experience points, get an overview of the world of TRYBER, be part of qualified members and receive a certification that you can share on LinkedIn. ", "Tax identification number": { @@ -537,7 +539,6 @@ "View payments page": "View wallet page", "WELCOME_SIGNUP_MESSAGE": "<strong>Welcome aboard!</strong><br />We have sent you a welcome email to the address you used in the sign up process.Now it’s time to explore the TRYBER universe: choose among our University courses, apply for test campaigns and join our community!", "Wallet": "Wallet", - "Warning": "", "We couldn't find a city with that name, please search again": "We couldn't find a city with that name, please search again", "We couldn't update your profile. Try again.": "We couldn't update your profile. Try again.", "We couldn't validate your tax id.": "We couldn't validate your tax id.", @@ -565,7 +566,7 @@ "You need to select a street": "You need to select a street", "You need to select a street code": "You need to select a street code", "You need to select a zip code": "You need to select a zip code", - "You need to set your two-factor authentication for this. Redirecting to the login page": "", + "You need to set your two-factor authentication for this. Redirecting to the login page": "You need to set your two-factor authentication for this. Redirecting to the login page", "You're a Tryber now": "You're a Tryber now", "Your Performance": "Your Performance", "Your current password is not correct": "Your current password is not correct", @@ -776,7 +777,7 @@ "not in ranking": { "__RANKING_POSITION_NOLeVEL_MAX: 30": "No level" }, - "or log in with email and password": "", + "or log in with email and password": "or log in with email and password", "or you can": "or you can", "redirecting": "redirecting", "social": "social", @@ -794,10 +795,6 @@ }, "All your certifications were successfully removed": "All your certifications were successfully removed", "There was an error removing your certifications": "There was an error removing your certifications", - "API_ERROR_MESSAGE::Click on \"Sign up\" and try again.": "", - "API_ERROR_MESSAGE::Something went wrong": "", - "Click on \"Sign up\" and try again.": "", - "Invalid date": "", "Sign up": "Sign up", "available tags <termsLink>, <privacyLink> and <ethicalCodeLink>": { "DISCLAIMER_SIGNUP_PAGE": "By signing up, you accept the <termsLink>Terms</termsLink>, <privacyLink>Privacy Policy</privacyLink> and <ethicalCodeLink>Ethical Code</ethicalCodeLink> and you agree to receive email for the TRYBER community." @@ -805,16 +802,11 @@ "name": "Name", "Welcome aboard!": "Welcome aboard!", "Welcome signup message": "We have sent you a welcome email to the address you used in the sign up process. Now it’s time to explore the TRYBER universe: choose among our University courses, apply for test campaigns and join our community!", - "Ethical Code": "", - "Log in": "", - "Privacy Policy": "", - "Terms and Conditions": "", "Login": "Already a Tryber? Log in", "New to TRYBER? <1>Sign up</1>": "New to TRYBER? <1>Sign up</1>", "or login with": "or login with", "login with your credentials": "login with your credentials", "or <1>create an account</1>": "or <1>create an account</1>", - "login-page-title": "", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_INVALID MAX: 20": "VAT registred or more than € 5,000 gross / year with occasional services", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_NON_ITALIAN MAX: 20": "other (not Italian)", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_WITHHOLDING MAX: 20": "less than € 5,000 gross / year with occasional services", diff --git a/src/locales/es/links.json b/src/locales/es/links.json index 563a62762..6670f12f6 100644 --- a/src/locales/es/links.json +++ b/src/locales/es/links.json @@ -1,8 +1,11 @@ { + "/ethical-code/": "/ethical-code/", "/payment_conditions": "https://app.tryber.me/es/condiciones-de-pago/", + "/terms-and-conditions/": "/terms-and-conditions/", "Bug details help article": "https://app.tryber.me/es/reglas-para-reportar-un-bug/", "Fiscal type help article": "https://www.app.tryber.me/it/per-saperne-di-piu-pagamenti-privacy/", "Ranking help article": "https://app.tryber.me/es/nuevas-reglas-de-clasificacion-de-tryber-edicion-2022/", "Wallet help article": "https://app.tryber.me/es/monedero-como-funciona/", + "https://www.iubenda.com/privacy-policy/7934311": "https://www.iubenda.com/privacy-policy/7934311", "tax id help article": "https://app.tryber.me/es/que-es-el-tax-id/" } diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json index cf70cdef6..1f948b588 100644 --- a/src/locales/es/translation.json +++ b/src/locales/es/translation.json @@ -1,7 +1,6 @@ { "...wait": "Cargando...", "/discover-experience-points/": "/es/puntos-de-experiencia-que-son/", - "/ethical-code/": "", "/faq/": "/es/faq-es/", "/my-account/": "/perfil/", "/terms-and-conditions/": "/terms-and-conditions/", @@ -195,7 +194,6 @@ "City of birth": "Ciudad de nacimiento", "Close": "Cerrar", "Close Date": "Fecha de Cierre", - "Close dialog": "", "Closed": "Cerrado", "Coming soon": "Próximamente", "Complete the Basic Course": "Empieza por el Curso Básico", @@ -212,7 +210,7 @@ "Courses": "Cursos", "Create an account": "Crear una cuenta", "Create your account": "Crea una cuenta", - "Current Page": "", + "Current Page": "Página Actual", "Current password": "Password actual", "DATE_OF_BIRTH": { "BitrhdayPicker": "Fecha de nacimiento", @@ -246,7 +244,6 @@ "Email {{email}} already registered": "Email {{email}} già presente", "Employment": "Empleo", "End Date": "Fecha Final", - "Error": "", "Experience Points": "Puntos de Experiencia", "Extra Award": "Recompensa Extra", "FAQ": "Preguntas Frecuentes", @@ -304,7 +301,6 @@ "If you have problems filling in your fiscal informations please": "Si tiene problemas para completar su información fiscal, por favor", "Improve your chances of being selected in test campaigns by completing your profile.": "Mejora tus posibilidades de ser seleccionado en campañas completando tu perfil.", "Inbox": "Inbox", - "Info": "", "Informations": "Informaciones", "Insert Name and surname separated by space": "Insertar nombre y apellido separados por espacio", "Institute": "Instituto", @@ -313,7 +309,7 @@ "Invalid tax profile.": "Perfil fiscal inválido", "Keep": "Mantener", "Language": "Idioma", - "Language switcher menu": "", + "Language switcher menu": "Menú de Cambio de Idioma", "Last Name": "Apellido", "Leaderboard": "Clasificación", "Learn More": "Saber Más", @@ -325,7 +321,7 @@ "Hide password": "Contraseña oculta", "Show password": "Mostrar contraseña" }, - "MAIL_SIGNUP_TERMS_DISCLAIMER": "", + "MAIL_SIGNUP_TERMS_DISCLAIMER": "Al inscribirte, aceptas los <terms_link>Términos de uso</terms_link>, la <privacy_link>Política de privacidad</privacy_link> y el <ethical_link>Código ético</ethical_link>", "MODAL_PAYMENT_STEP_TITLE": { "Confirm": "Confirmación", "Get email": "Recibe correo", @@ -465,7 +461,7 @@ "Should be exactly 16 characters": "Debe tener exactamente 16 caracteres", "Signup for Tryber": "Regístrate en TRYBER", "Signup now": "Regístrese ahora", - "Signup success": "", + "Signup success": "Ora fai parte di TRYBER", "Something went wrong": "Parece que algo salió mal", "Spoken languages": "Idiomas hablados", "Start Date": "Fecha de Inicio", @@ -478,8 +474,14 @@ "Street": "Calle", "Street N°": "Número de casa", "Submitted bugs": "Bugs enviados", - "Success": "", "Surname": "Apellido(s)", + "TOASTR_LABEL": { + "Close dialog": "Cerrar diálogo", + "Error": "Error", + "Info": "Información", + "Success": "Éxito", + "Warning": "Advertencia" + }, "Take me to the dashboard": "Que empiece la aventura", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Todo comienza aquí: solo cuando hayas completado el Curso Básico TRYBER te invitaremos a partecipar en las campañas. Además, ganarás 200 puntos de experiencia, conocerás el mundo de TRYBER, te convertirás en un miembro cualificado y recibirás una certificación que podrás compartir en LinkedIn.", "Tax identification number": { @@ -537,7 +539,6 @@ "View payments page": "Ver página de monedero", "WELCOME_SIGNUP_MESSAGE": "<strong>¡Te damos la bienvenida a bordo!</strong><br />Te hemos enviado un correo de bienvenida a la dirección que indicaste durante la registración. Descubre el universo TRYBER: elige entre los cursos de Tryber University, apúntate a las campañas de test y toma parte en la comunidad.", "Wallet": "Monedero", - "Warning": "", "We couldn't find a city with that name, please search again": "No pudimos encontrar una ciudad con ese nombre, por favor busca de nuevo", "We couldn't update your profile. Try again.": "No pudimos actualizar tu perfil. Inténtalo de nuevo.", "We couldn't validate your tax id.": "No pudimos validar su identificación fiscal.", @@ -565,7 +566,7 @@ "You need to select a street": "Necesitas seleccionar una calle", "You need to select a street code": "Necesitas seleccionar un código de calle", "You need to select a zip code": "Es necesario seleccionar un código postal", - "You need to set your two-factor authentication for this. Redirecting to the login page": "", + "You need to set your two-factor authentication for this. Redirecting to the login page": "Necesitas configurar tu autenticación de dos factores para esto. Redirigiendo a la página de inicio de sesión", "You're a Tryber now": "Ya eres parte de TRYBER", "Your Performance": "Tu Performance", "Your current password is not correct": "Tu password actual no es correcta", @@ -794,10 +795,6 @@ }, "All your certifications were successfully removed": "Todas tus certificaciones fueron eliminadas con éxito", "There was an error removing your certifications": "Hubo un error al eliminar tsu certificaciones", - "API_ERROR_MESSAGE::Click on \"Sign up\" and try again.": "", - "API_ERROR_MESSAGE::Something went wrong": "", - "Click on \"Sign up\" and try again.": "", - "Invalid date": "", "Sign up": "Regístrate ahora", "available tags <termsLink>, <privacyLink> and <ethicalCodeLink>": { "DISCLAIMER_SIGNUP_PAGE": "Al inscribirte, aceptas los <termsLink>Términos de uso</termsLink>, <privacyLink>la Política de privacidad</privacyLink> y el <ethicalCodeLink>Código ético</ethicalCodeLink> y recibir correos para la comunidad de TRYBER." @@ -805,20 +802,12 @@ "Back": "Atrás", "Country": "País de residencia", "name": "Nombre", - "Date of birth": "Fecha de nacimiento", - "Date of birth (dd/mm/yyyy)": "", "Welcome aboard!": "¡Te damos la bienvenida a bordo!", "Welcome signup message": "Te hemos enviado un correo de bienvenida a la dirección que indicaste durante la registración. Descubre el universo TRYBER: elige entre los cursos de Tryber University, apúntate a las campañas de test y toma parte en la comunidad.", - "Ethical Code": "", - "Log in": "", - "Privacy Policy": "", - "Terms and Conditions": "", "Login": "¿Ya eres un Tryber? Iniciar sesión", - "New to TRYBER? <1>Sign up</1>": "", "or login with": "o inicie sesión con", "login with your credentials": "Inicia sesión con tus credenciales", "or <1>create an account</1>": "o <1>crear una cuenta</1>", - "login-page-title": "", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_INVALID MAX: 20": "IVA registrado o más de 5.000 brutos € / año con servicios ocasionales", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_NON_ITALIAN MAX: 20": "otro (no italiano)", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_WITHHOLDING MAX: 20": "menos de 5.000 brutos € / año con servicios ocasionales", diff --git a/src/locales/it/links.json b/src/locales/it/links.json index 333631ee0..bc09f0438 100644 --- a/src/locales/it/links.json +++ b/src/locales/it/links.json @@ -1,8 +1,11 @@ { + "/ethical-code/": "/ethical-code/", "/payment_conditions": "https://app.tryber.me/it/condizioni-di-pagamento/", + "/terms-and-conditions/": "/it/termini-e-condizioni/", "Bug details help article": "https://app.tryber.me/it/regole-di-scrittura-dei-bug/", "Fiscal type help article": "https://app.tryber.me/it/per-saperne-di-piu-pagamenti-privacy/", "Ranking help article": "https://app.tryber.me/it/regolamento-della-nuova-classifica-di-tryber-edizione-2022/", "Wallet help article": "https://app.tryber.me/it/portafoglio-come-funziona/", + "https://www.iubenda.com/privacy-policy/7934311": "https://www.iubenda.com/privacy-policy/7934311", "tax id help article": "https://app.tryber.me/it/cosa-e-il-codice-fiscale/" } diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index c28dc6d12..bbc19847f 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -1,7 +1,6 @@ { "...wait": "Un momento...", "/discover-experience-points/": "/it/come-funzionano-i-punti-esperienza/", - "/ethical-code/": "", "/faq/": "/it/domande-frequenti/", "/my-account/": "/it/il-mio-account/", "/terms-and-conditions/": "/it/termini-e-condizioni/", @@ -195,7 +194,6 @@ "City of birth": "Città di nascita", "Close": "Chiudi", "Close Date": "Chiusa", - "Close dialog": "", "Closed": "Chiuse", "Coming soon": "Coming soon", "Complete the Basic Course": "Inizia dal Corso Base", @@ -212,7 +210,7 @@ "Courses": "Corsi", "Create an account": "Crea un account", "Create your account": "Crea un nuovo account", - "Current Page": "", + "Current Page": "Pagina Corrente", "Current password": "Password attuale", "DATE_OF_BIRTH": { "BitrhdayPicker": "Data di nascita", @@ -246,7 +244,6 @@ "Email {{email}} already registered": "Email {{email}} già presente", "Employment": "Occupazione", "End Date": "Fine", - "Error": "", "Experience Points": "Punti esperienza", "Extra Award": "Premio extra", "FAQ": "Domande frequenti", @@ -304,7 +301,6 @@ "If you have problems filling in your fiscal informations please": "Se hai problemi nel compilare le tue informazioni fiscali per favore", "Improve your chances of being selected in test campaigns by completing your profile.": "Aumenta le possibilità di venire selezionato in Campagne completando il tuo profilo", "Inbox": "Archivio messaggi", - "Info": "", "Informations": "Informazioni", "Insert Name and surname separated by space": "Inserisci nome e cognome separati da spazi", "Institute": "Istituto", @@ -313,7 +309,7 @@ "Invalid tax profile.": "Profilo fiscale invalido", "Keep": "Mantieni", "Language": "Lingua", - "Language switcher menu": "", + "Language switcher menu": "Menu Cambio Lingua", "Last Name": "Cognome", "Leaderboard": "Classifica", "Learn More": "Scopri di più", @@ -325,7 +321,7 @@ "Hide password": "Nascondi password", "Show password": "Mostra password" }, - "MAIL_SIGNUP_TERMS_DISCLAIMER": "", + "MAIL_SIGNUP_TERMS_DISCLAIMER": "Quando ti iscrivi, accetti inoltre i <terms_link>Termini di utilizzo</terms_link>, la <privacy_link>Privacy Policy</privacy_link> e il <ethical_link>Codice Etico</ethical_link> di Tryber. ", "MODAL_PAYMENT_STEP_TITLE": { "Confirm": "Conferma", "Get email": "Ricevi email", @@ -465,7 +461,7 @@ "Should be exactly 16 characters": "Deve contenere esattamente 16 caratteri", "Signup for Tryber": "Iscriviti a TRYBER", "Signup now": "Iscriviti ora", - "Signup success": "", + "Signup success": "Ya eres parte de TRYBER", "Something went wrong": "È successo qualcosa", "Spoken languages": "Lingue parlate", "Start Date": "Inizio", @@ -478,8 +474,14 @@ "Street": "Via", "Street N°": "Numero civico", "Submitted bugs": "Bug caricati", - "Success": "", "Surname": "Cognome", + "TOASTR_LABEL": { + "Close dialog": "Chiudi finestra di dialogo", + "Error": "Errore", + "Info": "Informazione", + "Success": "Successo", + "Warning": "Avviso" + }, "Take me to the dashboard": "Comincia l'avventura", "Take part in the Basic Course and earn 200 experience points, they will be essential to increase the chances to be selected for the campaigns. You'll become an AppQuality world expert and you will receive the Linkedin Certification to show that you are a qualified member of the Community.": "Tutto parte da qui: solo quando avrai completato il Corso Base TRYBER ti inviteremo a partecipare alle campagne. In più guadagnerai 200 punti esperienza, avrai una panoramica del mondo di TRYBER, farai parte dei membri qualificati e riceverai una certificazione che potrai condividere su LinkedIn.", "Tax identification number": { @@ -537,7 +539,6 @@ "View payments page": "Vedi la pagina del portafoglio", "WELCOME_SIGNUP_MESSAGE": "<strong>È bello averti tra noi</strong><br />Ti abbiamo inviato una email di benvenuto all’indirizzo che hai indicato durante la registrazione. Scopri l’universo di TRYBER: scegli tra i corsi della nostra University, candidati a campagne di test e prendi parte alla community.", "Wallet": "Portafoglio", - "Warning": "", "We couldn't find a city with that name, please search again": "Non è stato possibile trovare una città con quel nome, per favore riprova", "We couldn't update your profile. Try again.": "Non è stato possibile aggiornare il tuo profilo. Riprova", "We couldn't validate your tax id.": "Non siamo riusciti a validare il tuo identificativo fiscale.", @@ -565,7 +566,7 @@ "You need to select a street": "Devi selezionare una strada", "You need to select a street code": "Devi selezionare un codice stradale", "You need to select a zip code": "Devi selezionare un CAP", - "You need to set your two-factor authentication for this. Redirecting to the login page": "", + "You need to set your two-factor authentication for this. Redirecting to the login page": "È necessario impostare l'autenticazione a due fattori per questo. Reindirizzamento alla pagina di accesso", "You're a Tryber now": "Ora fai parte di TRYBER", "Your Performance": "Le tue Statistiche", "Your current password is not correct": "La tua password attuale non è corretta", @@ -794,10 +795,6 @@ }, "All your certifications were successfully removed": "Tutte le tue certificazioni sono state rimosse con successo", "There was an error removing your certifications": "Si è presentato un errore nella rimozione delle tue certificazioni", - "API_ERROR_MESSAGE::Click on \"Sign up\" and try again.": "", - "API_ERROR_MESSAGE::Something went wrong": "", - "Click on \"Sign up\" and try again.": "", - "Invalid date": "", "Sign up": "Iscriviti ora", "available tags <termsLink>, <privacyLink> and <ethicalCodeLink>": { "DISCLAIMER_SIGNUP_PAGE": "Quando ti iscrivi, accetti i <termsLink>Termini di utilizzo</termsLink>, la <privacyLink>Privacy Policy</privacyLink> e il <ethicalCodeLink>Codice Etico</ethicalCodeLink> e di ricevere email per la community di TRYBER." @@ -807,15 +804,10 @@ "name": "Nome", "Welcome aboard!": "È bello averti tra noi", "Welcome signup message": "Ti abbiamo inviato una email di benvenuto all’indirizzo che hai indicato durante la registrazione. Scopri l’universo di TRYBER: scegli tra i corsi della nostra University, candidati a campagne di test e prendi parte alla community.", - "Ethical Code": "", - "Log in": "", - "Privacy Policy": "", - "Terms and Conditions": "", "Login": "Già dei nostri? Accedi", "or login with": "o accedi con", "login with your credentials": "accedi con le tue credenziali", "or <1>create an account</1>": "o <1>crea un account</1>", - "login-page-title": "", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_INVALID MAX: 20": "partita IVA o più di € 5,000 lordi / anno con prestazioni occasionali", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_NON_ITALIAN MAX: 20": "estero", "__WALLET_MODAL-REQUEST_FISCAL-TYPE_WITHHOLDING MAX: 20": "meno di € 5.000 lordi / anno con prestazioni occasionali", diff --git a/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx b/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx index 71653f0cc..6be3d80ca 100644 --- a/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx +++ b/src/pages/GettingStarted/NewSignupForm/Step1/index.tsx @@ -153,21 +153,27 @@ const Step1 = () => { terms_link: ( <a data-qa="terms-and-conditions" - href={t("/terms-and-conditions/")} + href={t("/terms-and-conditions/", { + ns: "links", + })} target="_blank" /> ), privacy_link: ( <a data-qa="privacy-policy" - href={t("https://www.iubenda.com/privacy-policy/7934311")} + href={t("https://www.iubenda.com/privacy-policy/7934311", { + ns: "links", + })} target="_blank" /> ), ethical_link: ( <a data-qa="ethical-code" - href={t("/ethical-code/")} + href={t("/ethical-code/", { + ns: "links", + })} target="_blank" /> ), diff --git a/src/pages/GettingStarted/index.tsx b/src/pages/GettingStarted/index.tsx index daac3ca03..a0fb7780d 100644 --- a/src/pages/GettingStarted/index.tsx +++ b/src/pages/GettingStarted/index.tsx @@ -103,21 +103,30 @@ export default function GettingStarted() { terms_link: ( <a data-qa="terms-and-conditions" - href={t("/terms-and-conditions/")} + href={t("/terms-and-conditions/", { + ns: "links", + })} target="_blank" /> ), privacy_link: ( <a data-qa="privacy-policy" - href={t("https://www.iubenda.com/privacy-policy/7934311")} + href={t( + "https://www.iubenda.com/privacy-policy/7934311", + { + ns: "links", + } + )} target="_blank" /> ), ethical_link: ( <a data-qa="ethical-code" - href={t("/ethical-code/")} + href={t("/ethical-code/", { + ns: "links", + })} target="_blank" /> ), diff --git a/tests/e2e/getting-started/getting-started.spec.ts b/tests/e2e/getting-started/getting-started.spec.ts index a5311ff6c..e14b0fb3a 100644 --- a/tests/e2e/getting-started/getting-started.spec.ts +++ b/tests/e2e/getting-started/getting-started.spec.ts @@ -126,7 +126,7 @@ test.describe("The getting started page", () => { test(`should display a link privacy policy`, async ({ page, i18n }) => { await expect(page.getByTestId("privacy-policy")).toBeVisible(); await expect(page.getByTestId("privacy-policy")).toHaveText( - i18n.t("Privacy Policy") + "Privacy Policy" ); }); test(`if the user click the privacy policy link another tab is opened to https://www.iubenda.com/privacy-policy/7934311`, async ({ @@ -146,9 +146,7 @@ test.describe("The getting started page", () => { }); test(`should display a link to ethical code`, async ({ page, i18n }) => { await expect(page.getByTestId("ethical-code")).toBeVisible(); - await expect(page.getByTestId("ethical-code")).toHaveText( - i18n.t("Ethical Code") - ); + await expect(page.getByTestId("ethical-code")).toHaveText("Ethical Code"); }); test(`if the user click the ethical code link another tab is opened to /ethical-code in the current language`, async ({ page, @@ -161,7 +159,11 @@ test.describe("The getting started page", () => { await ethicalCode.click(); const newPage = await pagePromise; await newPage.waitForLoadState(); - expect(newPage.url()).toContain(i18n.t("/ethical-code/")); + expect(newPage.url()).toContain( + i18n.t("/ethical-code/", { + ns: "links", + }) + ); }); test(`should display a link to the login page`, async ({ page, i18n }) => { await expect(page.getByTestId("login")).toBeVisible(); diff --git a/tests/e2e/getting-started/signup-mail.spec.ts b/tests/e2e/getting-started/signup-mail.spec.ts index ccecb791d..ea8db32d2 100644 --- a/tests/e2e/getting-started/signup-mail.spec.ts +++ b/tests/e2e/getting-started/signup-mail.spec.ts @@ -318,7 +318,11 @@ test.describe("The signup mail page second step", () => { await termsAndConditions.click(); const newPage = await pagePromise; await newPage.waitForLoadState(); - expect(newPage.url()).toContain(i18n.t("/ethical-code/")); + expect(newPage.url()).toContain( + i18n.t("/ethical-code/", { + ns: "links", + }) + ); }); test("if the user click to the back button got to the first step (precompiled)", async ({}) => {