Fixed slash command popup #184#185
Merged
lostdesign merged 2 commits intolostdesign:masterfrom Oct 9, 2022
Merged
Conversation
Bug due to the variable localStorage.lang doesn't have a default value
lostdesign
requested changes
Oct 9, 2022
src/translation.js
Outdated
| export const Translations = { | ||
| locale: localStorage.lang ?? 'de-DE', | ||
| translationStrings: import(`./locales/${localStorage.lang}.json`), | ||
| translationStrings: import(`./locales/${this.locale}.json`), |
Owner
There was a problem hiding this comment.
this.locale may not be always set upon startup - while it does not noticeably break the app, it still throws an error.
Could you change
locale: localStorage.lang ?? 'de-DE',
translationStrings: import(`./locales/${this.locale}.json`),to
locale: localStorage.lang ?? 'en-US',
translationStrings: import(`./locales/${this.locale || 'en-US'}.json`),
lostdesign
approved these changes
Oct 9, 2022
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.
Issue #184 solved.
Bug description:
When you do a clean installation for devs, slash command popups doesn't show.
Fix description:
The problem is that variable localstorage.lang hasn't a default value so if you don't pick a language in the dropdown menu of the application settings the slash popups doesn't appears.