From e014437bc3b39a0a14820c3490f830b232a82af3 Mon Sep 17 00:00:00 2001 From: fxliang Date: Tue, 12 Mar 2024 09:44:40 +0000 Subject: [PATCH] chore: fix ShowBalloon tip translation follow locale --- WeaselServer/WeaselTrayIcon.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/WeaselServer/WeaselTrayIcon.cpp b/WeaselServer/WeaselTrayIcon.cpp index 53582a591..9b77ebf80 100644 --- a/WeaselServer/WeaselTrayIcon.cpp +++ b/WeaselServer/WeaselTrayIcon.cpp @@ -76,7 +76,11 @@ void WeaselTrayIcon::Refresh() { SetIcon(mode_icon[mode]); if (mode_label[mode] && m_disabled == false) { - ShowBalloon(mode_label[mode], WEASEL_IME_NAME); + if (GetThreadUILanguage() == + MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)) + ShowBalloon(mode_label[mode], WEASEL_IME_NAME); + else + ShowBalloon(L"维护中", WEASEL_IME_NAME); m_disabled = true; } if (m_mode != DISABLED)