update: FLUID 界面翻译使用外置 JSON 语言包
MemRelay-Operation: memory-save:uiframe-fluid-json-locale-coverage-20261122 MemRelay-Resource: fc5bc4b3-dfe5-41a8-bf3e-9b204a1847d7
This commit is contained in:
@@ -8,14 +8,14 @@ memory_type: decision
|
|||||||
project_id: 0017cd22-9dea-4f87-9595-fc050356ff3c
|
project_id: 0017cd22-9dea-4f87-9595-fc050356ff3c
|
||||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||||
status: active
|
status: active
|
||||||
revision: 1
|
revision: 2
|
||||||
request_id: uiframe-fluid-json-locale-20261122
|
request_id: uiframe-fluid-json-locale-coverage-20261122
|
||||||
created_at: '2026-11-21T19:57:49.684886+00:00'
|
created_at: '2026-11-21T19:57:49.684886+00:00'
|
||||||
updated_at: '2026-11-21T19:57:49.684886+00:00'
|
updated_at: '2026-11-21T20:12:41.944138+00:00'
|
||||||
tags:
|
tags:
|
||||||
- fltk-plus
|
- fltk-plus
|
||||||
- fluid
|
- fluid
|
||||||
- i18n
|
- i18n
|
||||||
---
|
---
|
||||||
|
|
||||||
FLUID 自己的菜单和设置窗口不再把译文写进 C++ 表。英文是内置原文,不做语言包。其他语言放在 fltk-plus/fluid/locale/下的 UTF-8 JSON:字段 id、name、translations。键必须是界面上的英文原文,包括 & 快捷键标记。缺的键保持英文。文件名任意,以 .json 结尾。下拉框显示 name,偏好保存 id(ui_language_id)。旧的整数键 ui_language=1 仍当作简体中文。查找顺序:环境变量 FLUID_LOCALE_DIR,可执行文件旁边的 locale,再是 ../share/fltk-plus/locale。Windows 用 GetModuleFileNameW,macOS 用 _NSGetExecutablePath,Linux 用 /proc/self/exe。文件用 fl_fopen 读,以便中文路径在三个系统上都能打开。构建后把 locale 复制到 fluid.exe 旁边;安装时放到 ${FLTK_DATADIR}/fltk-plus/locale。中文字体按系统已装字体探测,不写死微软雅黑。测试必须跑 E:\code\UIFrame\fltk-plus\build\bin\fluid.exe,不要用 cargo 安装的旧 fluid。这次改动尚未提交、未推送。
|
FLUID 界面译文在 fltk-plus/fluid/locale 的 UTF-8 JSON。英文是内置原文。缺的键保持英文。查找顺序:FLUID_LOCALE_DIR、可执行文件旁边的 locale、../share/fltk-plus/locale。偏好键 ui_language_id。测试用 E:\code\UIFrame\fltk-plus\build\bin\fluid.exe,不要用 cargo 安装的旧 fluid。当前构建目录是 Visual Studio 多配置,Release 产物在 build\bin\Release,已同步到 build\bin\fluid.exe 和 build\bin\locale。语言包覆盖主菜单、新建菜单(含图标项的类型名)、模板对话框、控件箱、代码视图、关于、命令窗口和控件属性页的主要标签。边框类型名(NO_BOX 等)和一部分长说明仍是英文。这次改动尚未提交。
|
||||||
Reference in New Issue
Block a user