From 1cdde0325eeab4e47313fa2c9c1e52e8d90abe10 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Thu, 16 Jan 2025 23:12:29 +0800 Subject: [PATCH] fix: dispatch I18N_UPDATE event after language load --- apps/renderer/src/lib/load-language.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/renderer/src/lib/load-language.ts b/apps/renderer/src/lib/load-language.ts index 4c327cbab0..215e5d9fce 100644 --- a/apps/renderer/src/lib/load-language.ts +++ b/apps/renderer/src/lib/load-language.ts @@ -1,4 +1,5 @@ import { IN_ELECTRON } from "@follow/shared/constants" +import { EventBus } from "@follow/utils/event-bus" import { getOS, isEmptyObject } from "@follow/utils/utils" import dayjs from "dayjs" import i18next from "i18next" @@ -68,6 +69,7 @@ export const loadLanguageAndApply = async (lang: string) => { return } } + EventBus.dispatch("I18N_UPDATE", "") } else { let importFilePath = ""