diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2025-12-16 22:06:45 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2025-12-16 22:06:45 +0800 |
| commit | b4ae0f05a874fb9f852431d7b5392e41000ccdb6 (patch) | |
| tree | 81db6dee40aa981829144c5760f3fb5e3438b503 /src/bin | |
| parent | e7201c79b6a39394fb936d91d2e75f11658d075d (diff) | |
Improve alignment command suggestions and error messages
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/jv.rs | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/bin/jv.rs b/src/bin/jv.rs index a9f8033..ff0ea8e 100644 --- a/src/bin/jv.rs +++ b/src/bin/jv.rs @@ -2438,6 +2438,37 @@ async fn jv_sheet_align(args: SheetAlignArgs) { "{}", md(t!("jv.success.sheet.align.list", tasks = table.to_string())) ); + + // Suggestion1: Confirm Erased + if align_tasks.erased.len() > 0 { + println!( + "\n{}", + md(t!( + "jv.success.sheet.align.suggestion_1", + example_erased = align_tasks.erased[0].0 + )) + ) + } else + // Suggestion2: Confirm Lost + if align_tasks.lost.len() > 0 { + println!( + "\n{}", + md(t!( + "jv.success.sheet.align.suggestion_2", + example_lost = align_tasks.lost[0].0 + )) + ) + } else + // Suggestion3: Confirm Moved + if align_tasks.moved.len() > 0 { + println!( + "\n{}", + md(t!( + "jv.success.sheet.align.suggestion_3", + example_moved = align_tasks.moved[0].0 + )) + ) + } } else { println!("{}", md(t!("jv.success.sheet.align.no_changes").trim())); } @@ -2456,7 +2487,7 @@ async fn jv_sheet_align(args: SheetAlignArgs) { "remote" => true, "local" => false, _ => { - eprintln!("{}", md(t!("jv.fail.sheet.align.unknown_method"))); + eprintln!("{}", md(t!("jv.fail.sheet.align.unknown_moved_direction"))); return; } }; |
