-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: skfp-819 dont display years when 0 #3815
Conversation
✅ Deploy Preview for portal-pre-prod-kidsfirstdrc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for portal-qa-next-kidsfirstdrc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Coverage report
Test suite run success0 tests passing in 0 suite. Report generated by 🧪jest coverage report action from ebc1de6 |
return ( | ||
<> | ||
{`${years} `} | ||
{years === 0 ? '' : `${years} `} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comme le ternaire sers pas à afficher autre chose qu'une string vide on pourrait modifier pour
{years > 0 && `${years}`}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est ce que la traduction ne pourrait pas aussi gérer ça sachant qu'on lui passe en variable pour savoir si on met un s ou non et ça check le =0
years: '{years, plural, =0 {} =1 {year} other {years}}',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ethienneroy je peux faire ca
@AltefrohneGaelle Oui et non. C'est techniquement possible, mais le style demande que ca ne soit pas pareil. Alors ca serait plus compliqué
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@francisl je suis d'accord avec la version sans le ternaire mais juste pour ma compréhension pour le style on aurait pu faire un intl.getHTML()
et mettre le span avec le style dans la traduction non ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
peut-être, mais le style a déjà été fait de cette facon, et il n'y a pas vraiment de gain, c'est plus une préférence. Je préfère le laisser comme ca et juste ajuster le comportement
#BUG | 0 year
Description
Issue: the years in age should not be shown as 0 when the age can only be captured in days.
Validation
Screenshot
After