From 678e17bb5c6a4573a0d378bb82db649b14593a39 Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 6 Nov 2025 21:00:47 +0800 Subject: [PATCH] Revert "fix(ui): Remove dynamic import for i18n in settings store" This reverts commit 0216325e0f6814897f6278f4afd477cbf9bce199. --- lightrag_webui/src/stores/settings.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lightrag_webui/src/stores/settings.ts b/lightrag_webui/src/stores/settings.ts index 0764df47..983f5c43 100644 --- a/lightrag_webui/src/stores/settings.ts +++ b/lightrag_webui/src/stores/settings.ts @@ -3,7 +3,6 @@ import { persist, createJSONStorage } from 'zustand/middleware' import { createSelectors } from '@/lib/utils' import { defaultQueryLabel } from '@/lib/constants' import { Message, QueryRequest } from '@/api/lightrag' -import i18n from '@/i18n' type Theme = 'dark' | 'light' | 'system' type Language = 'en' | 'zh' | 'fr' | 'ar' | 'zh_TW' @@ -143,9 +142,11 @@ const useSettingsStoreBase = create()( setLanguage: (language: Language) => { set({ language }) // Update i18n after state is updated - if (i18n.language !== language) { - i18n.changeLanguage(language) - } + import('i18next').then(({ default: i18n }) => { + if (i18n.language !== language) { + i18n.changeLanguage(language) + } + }) }, setGraphLayoutMaxIterations: (iterations: number) =>