mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
remove console.log
This commit is contained in:
parent
2d5f908bc7
commit
f3a1f82608
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