refactor(pages,i18n): M99 纯搬移 —— 导航表抽 pages/nav.rs、设置页拆目录、catalog 按域拆开
- pages/mod.rs 400 -> 356 行:NAV 表与组件版 rail 搬进 pages/nav.rs(NAV 可见性变 pub(crate),
只为让 pages/tests.rs 的三条断言原样保留)
- pages/settings.rs -> pages/settings/{mod,frame,general,appearance,java,download,ai,tests}.rs:
mod.rs 只留「分组注册表 + 选中分组 + 内容分发」,一组一个文件,为四条 section 线各留位置
- i18n catalog.rs 310 -> 273 行:条目表按域拆到 catalog/<域>.rs,catalog.rs 留 catalog! 宏、
装配链、Catalog 与对外 API;新增 catalog/golden.rs(拆分前 key->译文 全量快照)守门
- 行为/文案/样式零变化:pages_demo 的 instances/settings × 浅/深 四张图逐字节相同
This commit is contained in:
1 parent
4b1471a60d
commit
330f7216fd
29 files changed
+1173
-541
No files matched your search
@@ -0,0 +1,24 @@
|
||||
//! 中文字体文案(D28):中文环境缺字体时的下载提示 / 失败回退。
|
||||
//!
|
||||
//! 域文件的形状见 [`crate::catalog`] 的「域装配」一节。
|
||||
|
||||
macro_rules! font_entries {
|
||||
($next:ident, $($rest:ident,)* { $($acc:tt)* }) => {
|
||||
$next! { $($rest,)* {
|
||||
$($acc)*
|
||||
// ── 中文字体(D28:中文环境缺字体时的下载提示 / 失败回退)
|
||||
FontCjkNeedsDownload => (
|
||||
"No Chinese font found on this system. Download an open-source (OFL) Chinese font?",
|
||||
"系统里没找到中文字体。要下载一套开源(OFL)中文字体吗?"
|
||||
),
|
||||
FontCjkDownloading => ("Downloading Chinese font… {percent}%", "正在下载中文字体… {percent}%"),
|
||||
FontCjkDownloadFailed => (
|
||||
"Chinese font download failed; the interface stays in English.",
|
||||
"中文字体下载失败,界面暂时保持英文。"
|
||||
),
|
||||
FontCjkReady => ("Chinese font ready: {family}", "中文字体已就绪:{family}"),
|
||||
} }
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) use font_entries;
|
||||
Reference in new issue
Block a user