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

fix: skfp-819 dont display years when 0 #3815

Merged
merged 1 commit into from
Oct 3, 2023
Merged

fix: skfp-819 dont display years when 0 #3815

merged 1 commit into from
Oct 3, 2023

Conversation

francisl
Copy link

@francisl francisl commented Oct 2, 2023

#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

  • Code Approved
  • Test Coverage
  • QA Done

Screenshot

After

image

image

@netlify
Copy link

netlify bot commented Oct 2, 2023

Deploy Preview for portal-pre-prod-kidsfirstdrc ready!

Name Link
🔨 Latest commit ebc1de6
🔍 Latest deploy log https://app.netlify.com/sites/portal-pre-prod-kidsfirstdrc/deploys/651c32d4b04ce700088cd9fc
😎 Deploy Preview https://deploy-preview-3815--portal-pre-prod-kidsfirstdrc.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 2, 2023

Deploy Preview for portal-qa-next-kidsfirstdrc ready!

Name Link
🔨 Latest commit ebc1de6
🔍 Latest deploy log https://app.netlify.com/sites/portal-qa-next-kidsfirstdrc/deploys/651c32d458331800085f7c36
😎 Deploy Preview https://deploy-preview-3815--portal-qa-next-kidsfirstdrc.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

0 tests passing in 0 suite.

Report generated by 🧪jest coverage report action from ebc1de6

return (
<>
{`${years} `}
{years === 0 ? '' : `${years} `}

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}`}

Copy link
Collaborator

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}}',

Copy link
Author

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é

Copy link
Collaborator

@AltefrohneGaelle AltefrohneGaelle Oct 3, 2023

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 ?

Copy link
Author

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

@francisl francisl merged commit 5a8dac1 into 2.0 Oct 3, 2023
@francisl francisl deleted the fix/skfp-819 branch October 3, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants