Refactor: Automate page reload on language change#7512
Open
lavjeetrai wants to merge 1 commit into
Open
Conversation
Contributor
|
🧪 Jest Test Results ✅ All Jest tests passed! This PR is ready to merge. Coverage: Statements: 48.35% | Branches: 40.04% | Functions: 53.05% | Lines: 48.74% |
Contributor
Author
|
I would love any feedback on this implementation. |
Collaborator
|
can u address the dead japanese-split code in hide() ( delete it or just move it before the storage write to fix the long standing asymmetry ) @walterbender your thoughts on this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Improved the user experience by automatically reloading the page when the user changes their language preference. Previously, the application would display a toast message asking the user to manually refresh their browser.
Changes:
js/languagebox.js: Replaced the manual refresh prompt (this.activity.textMsg) with an automaticthis.reload()call when the language is updated. Cleaned up the unusedMSGtranslation dictionary and obsolete DOM event listeners.js/__tests__/languagebox.test.js: Updated test assertions to check forreload()being called instead of checking for text prompts. Safely removed obsolete tests related to the deleted manual refresh link.Testing:
npm test) passes successfully with proper global code coverage.Category.