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,65 @@
|
||||
//! 下载页文案(M94)。
|
||||
//!
|
||||
//! 一句话一个 key:带变量的句子用 `{name}`,页面只做 [`crate::Catalog::render`],不拼片段
|
||||
//! ([`crate::bridge`] 的规矩 1)。
|
||||
//!
|
||||
//! 文案口径(M94 r1 / P2-2):**只说这个页面真能做到的动作**(切分类、刷新、看日志),
|
||||
//! 不写「稍后会自动重试」这类 UI 没有的能力,也不拿文案去补功能。
|
||||
//!
|
||||
//! 域文件的形状见 [`crate::catalog`] 的「域装配」一节。
|
||||
|
||||
macro_rules! download_entries {
|
||||
($next:ident, $($rest:ident,)* { $($acc:tt)* }) => {
|
||||
$next! { $($rest,)* {
|
||||
$($acc)*
|
||||
// --- download page (M94) ---
|
||||
DownloadTitle => ("Downloads", "下载"),
|
||||
DownloadSubtitle => ("Versions you can install", "可以安装的版本"),
|
||||
DownloadRefresh => ("Refresh", "刷新"),
|
||||
DownloadInstall => ("Install", "安装"),
|
||||
DownloadCancel => ("Cancel install", "取消安装"),
|
||||
DownloadInstalled => ("Installed", "已安装"),
|
||||
DownloadCount => ("{count} versions", "{count} 个版本"),
|
||||
DownloadRowSupporting => ("{kind} · released {date}", "{kind} · 发布于 {date}"),
|
||||
DownloadSelectHint => ("Pick a version, then install", "选一个版本再安装"),
|
||||
DownloadLoading => ("Loading versions…", "正在加载版本列表…"),
|
||||
DownloadLoadingHint => (
|
||||
"If this stays here, press Refresh in the top right.",
|
||||
"如果一直停在这里,点右上角的刷新。"
|
||||
),
|
||||
DownloadEmptyTitle => ("No versions to show", "没有可显示的版本"),
|
||||
DownloadEmptyBody => (
|
||||
"Pick another category, or refresh the list.",
|
||||
"换一个分类,或刷新一次列表。"
|
||||
),
|
||||
DownloadCategoryAll => ("All", "全部"),
|
||||
DownloadCategoryRelease => ("Release", "正式版"),
|
||||
DownloadCategorySnapshot => ("Snapshot", "预览版"),
|
||||
DownloadCategoryAncient => ("Ancient", "远古版"),
|
||||
DownloadStagePlanning => ("Planning", "解析版本"),
|
||||
DownloadStageDownloading => ("Downloading files", "下载文件"),
|
||||
DownloadStageInstalling => ("Building the version", "生成版本"),
|
||||
DownloadStageRegistering => ("Registering the instance", "登记实例"),
|
||||
DownloadStageDone => ("Done", "已完成"),
|
||||
DownloadStageFailed => ("Install failed", "安装失败"),
|
||||
DownloadStageCancelled => ("Install cancelled", "安装已取消"),
|
||||
DownloadProgress => (
|
||||
"{done}/{total} files",
|
||||
"{done}/{total} 文件"
|
||||
),
|
||||
DownloadProgressUnknown => ("Waiting for the first file…", "等第一个文件…"),
|
||||
// 速率与剩余时间是两个独立短语,各占一个 key(`DownloadRate` 只负责把它们排成一行)
|
||||
DownloadRate => ("{speed} · {eta}", "{speed},{eta}"),
|
||||
DownloadEtaSecs => ("{secs}s left", "剩 {secs}s"),
|
||||
DownloadEtaMins => ("{mins}m{secs}s left", "剩 {mins}m{secs}s"),
|
||||
DownloadFailedHint => (
|
||||
"The Logs page has the full reason.",
|
||||
"完整原因在日志页。"
|
||||
),
|
||||
DownloadOpenLogs => ("Open logs", "打开日志"),
|
||||
DownloadDismiss => ("Dismiss", "关闭"),
|
||||
} }
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) use download_entries;
|
||||
Reference in new issue
Block a user