Skip to content

Feat: Give Preferred language based Credential Error from Backend #2898

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

Closed
wants to merge 3 commits into from

Conversation

Vishal2002
Copy link

Fixes #2860

Changes:

  • Added i18next in the backend to automatically determine the language and map the correct error credential message.
  • In the Nav.jsx component, a backend request is sent to the endpoint /getCurrentLanguage to store the current language. The language is then changed using i18n.changeLanguage(language);.
  • Utilized i18nextMiddleware to capture the language and facilitate mapping errors accordingly.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #2860
Screenshot 2024-01-14 215132 Screenshot 2024-01-14 215224

Copy link

welcome bot commented Jan 14, 2024

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@lindapaiste
Copy link
Collaborator

This shows a lot of potential! Translating server-side messages is something that we've been discussing for a long time. See #1587

Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Looks good!

@Vishal2002
Copy link
Author

This shows a lot of potential! Translating server-side messages is something that we've been discussing for a long time. See #1587

What to do next?

Copy link
Contributor

@PiyushChandra17 PiyushChandra17 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@raclim
Copy link
Collaborator

raclim commented Jul 26, 2024

Thanks so much for your work on this!

Due to some of the changes here falling out of date and some of the other features/fixes we'd like to prioritize over the next two months, I'm going to close this pull request for now. I'm really sorry that it took a while to get to this and that we couldn't get this in at the moment, but please feel free to update and reopen this pull request in the future!

@raclim raclim closed this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with Language Change and Invalid Username/Password Error on p5.js Web Editor
5 participants