fix(packui): M113 收口 —— 导出的「Save to」字段形状与「没进包」标题承诺

复审看图挑出的两处,只改这两处,其余不动。

1. **Save to 字段**:原来是 `label("Save to (empty = suggested)")` + 空值,看起来像「这句提示就是字段值」,
   与上面 Pack name / Version 的「标签在上、值在下」不一致。改成短标签 `Save to` + 占位
   `empty = suggested path`(新增 `PackExportOutputPlaceholder` 一个键)。

2. **`Not in the pack (listed one by one)` 与 `...and 6 more files` 自相矛盾**:13 条没进包的其实全列了,
   但紧随其后的「还有 6 个」说的是**内联样例**的截断,两句挨着会被读成一件事。
   改法:「没进包」标题带真实计数(`Not in the pack: {count}`),内联样例加自己的标题
   `Copied into overrides/ (first {shown}):`,截断那句改成 `…and {count} more files (not shown here)`
   —— 谁被截断、截了几条,写在它自己的那一块里。

`tolerable_title` 因此改成收 `String`(计数是运行时 format 出来的),`golden.rs` 同步三个键。

门禁:`cargo fmt --all --check` 通过;`cargo test -p unlucky-app-iced --lib -j 2`
504 passed / 0 failed(TEST_EXIT=0);`cargo check -p unlucky-app-iced --all-targets` 零 warning。
出图:`04-export-light.png` / `04-export-dark.png` 已重出(其余 8 张未受影响、未改动)。
This commit is contained in:
AskaEth committed 2026-11-05 04:06:40 +08:00
1 parent 5f09b8113a
commit 27bbc74eaa
5 files changed
+51 -19

No files matched your search

+15 -4
View File
@@ -173,7 +173,11 @@ macro_rules! content_entries {
PackExportFormat => ("Format", "格式"),
PackExportName => ("Pack name", "包名"),
PackExportVersion => ("Version", "版本"),
PackExportOutput => ("Save to (empty = suggested)", "保存到(留空 = 自动)"),
PackExportOutput => ("Save to", "保存到"),
PackExportOutputPlaceholder => (
"empty = suggested path",
"留空 = 自动给一个路径"
),
PackExportPrecheck => ("Dry run", "预检"),
PackExportConfirm => ("Write the pack", "确认写盘"),
PackExportAbort => ("Back", "返回"),
@@ -196,13 +200,20 @@ macro_rules! content_entries {
"{bytes} copied into overrides/",
"{bytes} 会原样拷进 overrides/"
),
PackPreviewInlineTitle => (
"Copied into overrides/ (first {shown}):",
"原样拷进 overrides/(只列前 {shown} 个):"
),
PackPreviewSkippedTitle => (
"Not in the pack (listed one by one)",
"没进包(逐条列出)"
"Not in the pack: {count}",
"没进包:{count} 项"
),
PackPreviewNotes => ("Known losses", "已知损失"),
PackPreviewTarget => ("Will be written to {path}", "将写到 {path}"),
PackPreviewMore => ("…and {count} more files", "…还有 {count} 个文件"),
PackPreviewMore => (
"…and {count} more files (not shown here)",
"…还有 {count} 个文件(这里不展开)"
),
PackPreviewComplete => ("Nothing is left out", "没有遗漏任何文件"),
PackPreviewIncomplete => (
"Some files will not be in the pack",
+5 -3
View File
@@ -272,7 +272,8 @@ pub(super) const GOLDEN: &[(&str, &str, &str)] = &[
("PackExportFormat", "Format", "格式"),
("PackExportName", "Pack name", "包名"),
("PackExportVersion", "Version", "版本"),
("PackExportOutput", "Save to (empty = suggested)", "保存到(留空 = 自动)"),
("PackExportOutput", "Save to", "保存到"),
("PackExportOutputPlaceholder", "empty = suggested path", "留空 = 自动给一个路径"),
("PackExportPrecheck", "Dry run", "预检"),
("PackExportConfirm", "Write the pack", "确认写盘"),
("PackExportAbort", "Back", "返回"),
@@ -283,10 +284,11 @@ pub(super) const GOLDEN: &[(&str, &str, &str)] = &[
("PackPreviewHead", "Will inline {inline} files · cannot export: {skipped}", "将内联 {inline} 个文件 · 无法导出 {skipped} 项"),
("PackPreviewRemote", "{count} files can be referenced remotely", "{count} 个文件可走远程引用"),
("PackPreviewInlineBytes", "{bytes} copied into overrides/", "{bytes} 会原样拷进 overrides/"),
("PackPreviewSkippedTitle", "Not in the pack (listed one by one)", "没进包(逐条列出)"),
("PackPreviewInlineTitle", "Copied into overrides/ (first {shown}):", "原样拷进 overrides/(只列前 {shown} 个):"),
("PackPreviewSkippedTitle", "Not in the pack: {count}", "没进包:{count} 项"),
("PackPreviewNotes", "Known losses", "已知损失"),
("PackPreviewTarget", "Will be written to {path}", "将写到 {path}"),
("PackPreviewMore", "…and {count} more files", "…还有 {count} 个文件"),
("PackPreviewMore", "…and {count} more files (not shown here)", "…还有 {count} 个文件(这里不展开)"),
("PackPreviewComplete", "Nothing is left out", "没有遗漏任何文件"),
("PackPreviewIncomplete", "Some files will not be in the pack", "有文件不会进包"),
("PackReasonModrinthSha1", "Modrinth match (SHA-1)", "Modrinth 命中(SHA-1)"),