diff --git a/src/client/includes/lookup.ts b/src/client/includes/lookup.ts index 130ced2..39d0ec4 100644 --- a/src/client/includes/lookup.ts +++ b/src/client/includes/lookup.ts @@ -3,7 +3,7 @@ import resolvePath from 'object-resolve-path' import { hasLocaleDictionary } from '../stores/dictionary' -import { getGenericLocaleFrom } from './utils' +import { getFallbackLocale } from './utils' const lookupCache: Record> = {} @@ -14,10 +14,6 @@ const addToCache = (path: string, locale: string, message: string) => { return message } -export const removeFromLookupCache = (locale: string) => { - delete lookupCache[locale] -} - export const lookupMessage = ( dictionary: any, path: string, @@ -38,6 +34,6 @@ export const lookupMessage = ( return addToCache( path, locale, - lookupMessage(dictionary, path, getGenericLocaleFrom(locale)) + lookupMessage(dictionary, path, getFallbackLocale(locale)) ) }