processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.4k stars 1.35k forks source link

Fix error message not showing in proper selected language #3202 #3203

Closed ayush2743 closed 3 months ago

ayush2743 commented 3 months ago

Fixes #3202

Description: This pull request addresses an issue where error messages in the login form were not being properly translated when the application language was changed. The main changes include:

  1. Modified the LoginForm component to pass the translation function (t) to the validation function.
  2. Updated the validateLogin function in reduxFormUtils.js to accept the translation function as a parameter.
  3. Added an effect in LoginForm to listen for language changes and trigger a re-render when necessary.

These changes ensure that:

Changes:

I have verified that this pull request:

welcome[bot] commented 3 months ago

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

ayush2743 commented 3 months ago

@raclim when will this pull request merge?

raclim commented 3 months ago

Thanks so much for your work on this!

While what you've submitted does seem to work, ideally we would probably like to investigate these changes in reduxFormUtils.js, which is already handling the translations for the error messaging.

Due due the reasons outlined in my comment for the associated issue, I'm going to close this for now. I'm sorry that we couldn't get this in, but please feel free to check out our other issues!