Fix: Decode GBK dialog/toolbar text on non-Chinese systems

MBCS dialog templates are decoded with the system ANSI code page, so on
non-Chinese systems the GBK template strings turn into "?" before
TranslateDialog can read them. Set those strings explicitly in OnInitDialog
(PluginSettings save/close, the three Advanced dialogs, the file-manager
search buttons/checkboxes, and Trigger Settings) so they are re-decoded
with the thread locale. Also fix the language-selection dialog and the
toolbar "Lang/语言" button: the language dialog's template is built as
WCHAR strings but created through the ANSI path, so its title, label, and
buttons are set explicitly in OnInitDialog (AppendString stays on CP_ACP),
with the title looked up via _TR("切换语言") and set through SetWindowTextW
after an explicit GBK conversion; new en_US ("Switch Language") and zh_TW
("切換語言") translations accompany it. The toolbar button is set through
the Unicode TB_SETBUTTONINFOW message after an explicit GBK conversion. Add
en_US/zh_TW translations for the experimental-features context menu items.

Co-Authored-By: deepseek-v4-pro
This commit is contained in:
yuanyuanxianganddeepseek-v4-pro committed 2026-10-08 21:53:53 +02:00
1 parent c7f7b7b29b
commit 6220335f63
12 files changed
+136 -9

No files matched your search

+3
View File
@@ -99,6 +99,8 @@ RTT=RTT
即时消息=Message
虚拟屏幕=Virtual Screen
隐私屏幕=Privacy Screen
实验功能=Experimental Features
远程画板=Remote Drawing Board
代理服务=Proxy Service
注入设置=Inject Config
创建计划任务=Scheduled Task
@@ -121,6 +123,7 @@ RTT=RTT
; ============================================
; Language Selection Dialog
切换语言=Switch Language
; ============================================
选择语言 / Select Language=Select Language
语言:=Language:
+3
View File
@@ -99,6 +99,8 @@ RTT=RTT
即时消息=即時訊息
虚拟屏幕=虛擬桌面
隐私屏幕=隱私螢幕
实验功能=實驗功能
远程画板=遠端繪圖板
代理服务=代理服務
注入设置=注入設定
创建计划任务=建立排程工作
@@ -121,6 +123,7 @@ RTT=RTT
; ============================================
; Language Selection Dialog
切換語言=切換語言
; ============================================
选择语言 / Select Language=選擇語言
语言:=語言: