Fix i18n types

This commit is contained in:
Sam Becker 2025-05-10 11:30:56 -05:00
parent 47fac5c8d6
commit 665dd39fd7

View File

@ -11,12 +11,12 @@ export const LANGUAGES: Record<string, I18NDeepPartial | undefined> = {
'pt-br': PT_BR,
};
export const getTextForLanguage = async (
export const getTextForLanguage = (
language = '',
): Promise<I18N> => {
): I18N => {
const text = US_EN;
Object.entries(await LANGUAGES[language.toLocaleLowerCase()] ?? {})
Object.entries(LANGUAGES[language.toLocaleLowerCase()] ?? {})
.forEach(([key, value]) => {
text[key as keyof I18N] = {
...text[key as keyof I18N],