From 98f4a42250ff55326be3755db365ca8d2df03774 Mon Sep 17 00:00:00 2001 From: MemRelay Date: Sun, 22 Nov 2026 04:12:45 +0800 Subject: [PATCH] =?UTF-8?q?update:=20FLUID=20=E7=95=8C=E9=9D=A2=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=BD=BF=E7=94=A8=E5=A4=96=E7=BD=AE=20JSON=20?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MemRelay-Operation: memory-save:uiframe-fluid-json-locale-coverage-20261122 MemRelay-Resource: fc5bc4b3-dfe5-41a8-bf3e-9b204a1847d7 --- .../FLUID 界面翻译使用外置 JSON 语言包.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/0017cd22-9dea-4f87-9595-fc050356ff3c/FLUID 界面翻译使用外置 JSON 语言包.md b/projects/0017cd22-9dea-4f87-9595-fc050356ff3c/FLUID 界面翻译使用外置 JSON 语言包.md index 466b109..71d7daa 100644 --- a/projects/0017cd22-9dea-4f87-9595-fc050356ff3c/FLUID 界面翻译使用外置 JSON 语言包.md +++ b/projects/0017cd22-9dea-4f87-9595-fc050356ff3c/FLUID 界面翻译使用外置 JSON 语言包.md @@ -8,14 +8,14 @@ memory_type: decision project_id: 0017cd22-9dea-4f87-9595-fc050356ff3c usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 status: active -revision: 1 -request_id: uiframe-fluid-json-locale-20261122 +revision: 2 +request_id: uiframe-fluid-json-locale-coverage-20261122 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: - fltk-plus - fluid - 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。这次改动尚未提交、未推送。 \ No newline at end of file +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 等)和一部分长说明仍是英文。这次改动尚未提交。 \ No newline at end of file