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

English/French translations + edit drawer error handling #441

Merged
merged 32 commits into from
Feb 24, 2022

Conversation

willyyhuang
Copy link
Contributor

@willyyhuang willyyhuang commented Feb 22, 2022

Closes #385 , #423

Added react-i18next to handle english/french translations
Edit drawer should not close on failure as well now.

Usage of react-i18next is

  • import useTranslation hook (since we are using functional components, hooks work the best)
  • use the t function to find the specific string in the translation files

@codeclimate
Copy link

codeclimate bot commented Feb 22, 2022

Code Climate has analyzed commit bef89a0 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 89.9% (90% is the threshold).

This pull request will bring the total coverage in the repository to 91.6% (0.3% change).

View more on Code Climate.

@willyyhuang willyyhuang changed the title English/French translations English/French translations + edit drawer error handling Feb 22, 2022
@willyyhuang willyyhuang added the bug Something isn't working label Feb 22, 2022
@willyyhuang willyyhuang linked an issue Feb 22, 2022 that may be closed by this pull request
@willyyhuang
Copy link
Contributor Author

Diff-coverage is 89.9% and total coverage increased by 0.3%, the reason why diff-coverage can not be achieved to 90% is because there are conditions where we can't test in unit tests now, such as autocomplete fields and useEffect hooks.

@sonarcloud
Copy link

sonarcloud bot commented Feb 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
2.1% 2.1% Duplication

Copy link
Collaborator

@luigibesani luigibesani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! You really were thorough with the translations; it seems that everything is covered.
The implementation of the translation framework is very clean as well.
We should discuss about the presence of the language selection drop down in the front page.

@willyyhuang willyyhuang merged commit 5f1a796 into main Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit error handling ENGLISH/FRENCH Translation
2 participants