mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 16:42:24 +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 {
|
export function getLocale(): string {
|
||||||
const storageLocale = localStorage.getItem(USER_LOCALE_KEY)
|
const storageLocale = localStorage.getItem(USER_LOCALE_KEY)
|
||||||
console.log('locale from storage:', storageLocale)
|
|
||||||
if (storageLocale && storageLocale in availableLocales) return 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
|
// get the browser's preferred languages and see if we can match it to an available locale
|
||||||
console.log('preferred languages:', navigator.languages)
|
return match(navigator.languages, Object.keys(availableLocales), fallbackLocale)
|
||||||
const s = match(navigator.languages, Object.keys(availableLocales), fallbackLocale)
|
|
||||||
console.log('match:', s)
|
|
||||||
return s
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const currentLocale = getLocale()
|
export const currentLocale = getLocale()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue