From e9b28c5a901c1954d7c4953761887ce991640e01 Mon Sep 17 00:00:00 2001 From: Sam Hoang Van Date: Sat, 21 Jun 2025 14:42:15 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9Bfix:=20remove=20unused=20exports=20?= =?UTF-8?q?from=20i18n=20index=20and=20ensure=20translate=20function=20ret?= =?UTF-8?q?urns=20correct=20type=20(#5419)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-app/src/i18n/index.ts | 2 +- web-app/src/i18n/setup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web-app/src/i18n/index.ts b/web-app/src/i18n/index.ts index 174d86f14..7c8f53bda 100644 --- a/web-app/src/i18n/index.ts +++ b/web-app/src/i18n/index.ts @@ -2,7 +2,7 @@ export { default as i18n, loadTranslations } from './setup' // Export the React context and hook -export { TranslationProvider, useAppTranslation, TranslationContext } from './TranslationContext' +export { TranslationProvider } from './TranslationContext' // Export types export type { I18nInstance, TranslationResources } from './setup' \ No newline at end of file diff --git a/web-app/src/i18n/setup.ts b/web-app/src/i18n/setup.ts index 2135e9b99..9026100ee 100644 --- a/web-app/src/i18n/setup.ts +++ b/web-app/src/i18n/setup.ts @@ -82,7 +82,7 @@ const translate = (key: string, options: Record = {}): string = return current && typeof current === 'object' && current !== null && key in current ? (current as Record)[key] : undefined - }, obj as unknown) + }, obj as unknown) as string | undefined } // Try to get translation from current language