Added a global store to save current language and started using Localstorage to persist selected language.#613
Merged
marcgc21 merged 6 commits intoruxailab:developfrom Apr 1, 2025
Conversation
…l-storage to store current language for persistence
Member
Author
|
@marcgc21 Sir please review this also |
Contributor
|
Hi @marcgc21 !! Could you add me as a reviewer in this PR? |
drp5
reviewed
Mar 25, 2025
| @@ -0,0 +1,28 @@ | |||
| const state = { | |||
| lang: localStorage.getItem('lang') || 'en', | |||
Contributor
There was a problem hiding this comment.
Consider wrapping localStorage.getItem in a try/catch block to prevent runtime errors.
drp5
reviewed
Mar 25, 2025
| const mutations = { | ||
| SET_LANG(state, lang) { | ||
| state.lang = lang; | ||
| localStorage.setItem('lang', lang); // Persist language in localStorage |
Contributor
There was a problem hiding this comment.
It might be useful to validate that lang is a supported language before committing.
Contributor
|
Hi @sahitya-chandra, you should resolve the conflicts in order to merge it. |
Member
Author
|
@drp5 Sir I am currently little busy writing my proposal, and I also have mid exams in 2 days. So, I will fix them soon... |
drp5
approved these changes
Mar 27, 2025
|
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
Both the points will lead to better UX.
Screencast.from.2025-02-25.22-58-38.webm
Screencast.from.2025-02-25.22-57-31.webm