mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
remove console.log
This commit is contained in:
parent
19ce6c8a10
commit
0abc20fc1c
1 changed files with 1 additions and 5 deletions
|
|
@ -48,14 +48,10 @@ export const availableLocales = loadAvailableLocales()
|
|||
*/
|
||||
export function getLocale(): string {
|
||||
const storageLocale = localStorage.getItem(USER_LOCALE_KEY)
|
||||
console.log('locale from storage:', storageLocale)
|
||||
if (storageLocale && storageLocale in availableLocales) return storageLocale
|
||||
|
||||
// get the browser's preferred languages and see if we can match it to an available locale
|
||||
console.log('preferred languages:', navigator.languages)
|
||||
const s = match(navigator.languages, Object.keys(availableLocales), fallbackLocale)
|
||||
console.log('match:', s)
|
||||
return s
|
||||
return match(navigator.languages, Object.keys(availableLocales), fallbackLocale)
|
||||
}
|
||||
|
||||
export const currentLocale = getLocale()
|
||||
|
|
|
|||
Loading…
Reference in a new issue