-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix login username label and show error messages (#303)
* 🔨 fix login label and show error messages * 💚 give alert box some space to breathe * 🔨 fix using i18n in stores
- Loading branch information
Showing
8 changed files
with
55 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// init localization | ||
import { createI18n } from 'vue-i18n'; | ||
|
||
// language source files | ||
import de from '@/locales/de.json'; | ||
import en from '@/locales/en.json'; | ||
|
||
const messages = { | ||
de, // German | ||
en, // English | ||
}; | ||
const loc = localStorage?.getItem('locale') ?? (navigator.language || navigator.userLanguage); | ||
const instance = createI18n({ | ||
legacy: false, | ||
globalInjection: true, | ||
locale: loc, | ||
fallbackLocale: 'en', | ||
messages, | ||
}); | ||
|
||
export default instance; | ||
export const i18n = instance.global; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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