Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Corrige l'affichage du dashboard en anglais. #10775

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

HEYGUL
Copy link
Contributor

@HEYGUL HEYGUL commented Dec 10, 2024

🎄 Problème

Quand un utilisateur qui n'a pas encore vu le nouveau dashboard affiche celui-ci en anglais, il se retrouve avec une page blanche.
En regardant la console du navigateur, on voit le message d'erreur suivant :

Uncaught (in promise) Error: [@formatjs/intl Error FORMAT_ERROR] Error formatting message: "pages.dashboard.presentation.message", using default message as fallback.
MessageID: pages.dashboard.presentation.message
Default Message: '<h2>'Hi {firstname}, welcome to your dashboard.'</h2><p>'Quickly and easily access all your tests in progress.'<br>'Follow the evolution of your Pix score and check if your profile is ready for certification.'</p>'
Description: undefined

Locale: en


The intl string context variable "firstname" was not provided to the string "'<h2>'Hi {firstname}, welcome to your dashboard.'</h2><p>'Quickly and easily access all your tests in progress.'<br>'Follow the evolution of your Pix score and check if your profile is ready for certification.'</p>'"

🎁 Proposition

En regardant la clé de traduction pages.dashboard.presentation.message, on constate que celle-ci n'a pas de paramètre firstname dans toutes les langues sauf l'anglais.
Son usage, dans le fichier banner.hbs, est effectivement fait sans passer aucun paramètre.
C'est cette absence de paramètre firstname qui provoque l'erreur à l'éxécution.
On supprime ledit paramètre de la traduction anglaise.

🧦 Remarques

RAS

🎅 Pour tester

Se rendre sur Pix App.
Se connecter avec un utilisateur qui n'a pas encore vu le nouveau dashboard, eg. [email protected].
Modifier la langue de l'utilisateur en passant par Mon Compte > Choisir ma langue.
Sélectionner l'anglais.
Se rendre sur la partie "Dashboard".
Constater que le dashboard est correctement affiché.

@HEYGUL HEYGUL added 👀 Tech Review Needed 👀 Func Review Needed team-evaluation PR relatives à l'expérience d'évaluation labels Dec 10, 2024
@HEYGUL HEYGUL self-assigned this Dec 10, 2024
@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@HEYGUL HEYGUL force-pushed the bugfix-dashboard-error-in-english-only branch from f7a1691 to 135ce5c Compare December 10, 2024 20:53
@HEYGUL HEYGUL requested a review from a team December 10, 2024 20:54
@HEYGUL
Copy link
Contributor Author

HEYGUL commented Dec 11, 2024

Test fonctionnel ✅

@HEYGUL HEYGUL added Func Review OK PO validated functionally the PR and removed 👀 Func Review Needed labels Dec 11, 2024
@pix-service-auto-merge pix-service-auto-merge force-pushed the bugfix-dashboard-error-in-english-only branch from 135ce5c to 6756576 Compare December 11, 2024 09:31
… message

This param is not provided and does not exist in other language
@pix-service-auto-merge pix-service-auto-merge force-pushed the bugfix-dashboard-error-in-english-only branch from 6756576 to d633f19 Compare December 11, 2024 09:37
@pix-service-auto-merge pix-service-auto-merge merged commit 55ae451 into dev Dec 11, 2024
7 of 8 checks passed
@pix-service-auto-merge pix-service-auto-merge deleted the bugfix-dashboard-error-in-english-only branch December 11, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Func Review OK PO validated functionally the PR 🚀 Ready to Merge team-evaluation PR relatives à l'expérience d'évaluation Tech Review OK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants