Feature: add a language reset button and fit toolbar labels

The entry dialog showed the external language-pack folder with no way to
disable it. Reset now clears the LangDir configuration value and restores a
built-in language; it does not read, move or delete any file on disk. The
current language is kept when already built-in (zh_CN/zh_TW/en_US); an
external pack falls back to en_US. Startup treats a missing LangDir as ./lang
and an explicitly empty one as built-ins only; scanner, loader, encoding check
and the zh_CN patch skip disk access when the directory is empty.

The button is created at runtime, sized from the localized label (German
"Zuruecksetzen" fits) and matching OK/Cancel height; the folder field shrinks.
Reset and the result message are translated in en_US, zh_TW and de_DE.

Toolbar buttons share one width taken from the longest label. At the 1400-px
startup window en_US used 76px per button and zh_TW 85px, clipping the last
icons; zh_CN was 72px and de_DE 64px. Shortening the longest en_US/zh_TW labels
brings both to 64px, so all 19 icons fit.

Verified with a Debug x64 build: resetting a German pack leaves de_DE.ini on
disk while settings become LangDir= and Language=en_US; a built-in zh_TW UI
stays zh_TW; after restart with LangDir empty, only 3 built-ins are listed.
English and zh_TW screenshots show all 19 toolbar buttons at startup.

Co-Authored-By: deepseek-flash
This commit is contained in:
yuanyuanxianganddeepseek-flash committed 2026-12-01 20:52:49 +01:00
1 parent 1d03cbeb3f
commit 3d2dd08be5
6 files changed
+226 -102

No files matched your search

+16 -14
View File
@@ -28,15 +28,15 @@
设置=Settings
终端管理=Terminal
进程管理=Process
窗口管理=Windows
窗口管理=Window
桌面管理=Desktop
文件管理=Files
文件管理=File Mgr
语音管理=Audio
视频管理=Video
服务管理=Services
服务管理=Service
注册表管理=Registry
键盘记录=Keylog
参数设置=Settings
参数设置=Options
生成服务端=Build Svc
帮助=Help
@@ -78,13 +78,13 @@ RTT=RTT
; Dialog Captions (对话框标题保持清晰)
; ============================================
远程桌面=Remote Desktop
文件管理=File Manager
进程管理=Process Mgr
窗口管理=Window Mgr
文件管理=File Mgr
进程管理=Process
窗口管理=Window
命令行=Shell
注册表=Registry
注册表管理=Registry
服务管理=Service Mgr
服务管理=Service
服务管理器=Service Mgr
键盘记录=Keylog
语音监听=Audio Spy
@@ -244,7 +244,7 @@ RTT=RTT
; ============================================
常规设置=General
网络设置=Network
参数设置=Parameters
参数设置=Options
桌面管理=Desktop
监听端口=Listen Port
监听端口:=Port:
@@ -419,7 +419,7 @@ Rar
已有授权密码。请勿将本程序用于任何非法、违规的用途,否则后果自负!\r\n\r\n是否更新试用口令?更新后原有授权码将被覆盖。=Existing authorization code found. Please do not use this program for any illegal or improper purposes; otherwise you are solely responsible for the consequences!\r\n\r\nUpdate the trial code? The existing authorization code will be overwritten.
注入记事本=Inject Notepad
机器管理=Machine Mgmt
主机管理=Host Mgmt
主机管理=Hosts
注销=Log Off
关机=Shutdown
重启=Restart
@@ -503,13 +503,13 @@ QQ
; String Table
; ============================================
远程终端=Terminal
进程管理=Process Mgr
窗口管理=Window Mgr
进程管理=Process
窗口管理=Window
远程桌面=Remote Desktop
文件管理=File Manager
文件管理=File Mgr
语音监听=Audio Monitor
视频查看=Video Viewer
服务管理=Service Mgr
服务管理=Service
注册表查看=Registry View
服务生成=Build Service
帮助=Help
@@ -2361,3 +2361,5 @@ MCP
服务模式:显示累计运行时长;有崩溃记录时显示 MTBF 与失败率。=Service mode: shows cumulative runtime; with crash records, MTBF and failure rate.
授权到期信息:=Licence expiry:
\n剩余天数包含到期当天;已过期时主控功能可能受限。=\nRemaining days include the expiry day; some features may be restricted after expiry.
重置=Reset
已清空语言包目录设置,已恢复内置语言,重启程序后生效。=Language pack folder setting cleared; built-in language restored. Restart the program to apply.