From 0e8dc3c0267ccff8b293de613bdae1c08579d420 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 05:27:56 -0800 Subject: [PATCH] Status bar: Copy, Cut and Image Trace count their notes and list them on hover After Copy or Cut writes its formats to the system clipboard, and after Image Trace's Make or Make and Expand, the status message names the first note and how many there are, and resting the pointer on it lists them all in order, as after a save or an export. Before, only the first note was shown and the rest were dropped. A Copy's or Cut's notes no longer replace a message shown while its formats were being made on the background worker; the formats are still written. Docs: docs/control-protocol.md, docs/mcp.md, docs/target-app-parity.md. --- crates/ui-egui/src/app/commands.rs | 36 +++++++--- crates/ui-egui/src/i18n/bg.tsv | 3 + crates/ui-egui/src/i18n/bs.tsv | 3 + crates/ui-egui/src/i18n/ca.tsv | 3 + crates/ui-egui/src/i18n/cs.tsv | 3 + crates/ui-egui/src/i18n/da.tsv | 3 + crates/ui-egui/src/i18n/de.tsv | 3 + crates/ui-egui/src/i18n/el.tsv | 3 + crates/ui-egui/src/i18n/es.tsv | 3 + crates/ui-egui/src/i18n/fi.tsv | 3 + crates/ui-egui/src/i18n/fr.tsv | 3 + crates/ui-egui/src/i18n/hi.tsv | 3 + crates/ui-egui/src/i18n/hu.tsv | 3 + crates/ui-egui/src/i18n/id.tsv | 3 + crates/ui-egui/src/i18n/it.tsv | 3 + crates/ui-egui/src/i18n/ja.tsv | 3 + crates/ui-egui/src/i18n/ka.tsv | 3 + crates/ui-egui/src/i18n/ko.tsv | 3 + crates/ui-egui/src/i18n/nl.tsv | 3 + crates/ui-egui/src/i18n/pl.tsv | 3 + crates/ui-egui/src/i18n/pt-br.tsv | 3 + crates/ui-egui/src/i18n/ru.tsv | 3 + crates/ui-egui/src/i18n/sv.tsv | 3 + crates/ui-egui/src/i18n/tests.rs | 17 ++++- crates/ui-egui/src/i18n/tr.tsv | 3 + crates/ui-egui/src/i18n/uk.tsv | 3 + crates/ui-egui/src/i18n/vi.tsv | 3 + crates/ui-egui/src/i18n/zh-hans.tsv | 3 + crates/ui-egui/src/i18n/zh-hant.tsv | 3 + crates/ui-egui/src/panels/character.rs | 13 ++-- crates/ui-egui/src/panels/character/tests.rs | 2 +- crates/ui-egui/src/sysclip.rs | 46 +++++++++++-- crates/ui-egui/src/tests/sysclip.rs | 72 ++++++++++++++++---- crates/ui-egui/src/tests/trace_runs.rs | 40 +++++++++++ crates/ui-egui/src/trace_runs.rs | 5 ++ docs/control-protocol.md | 3 +- docs/mcp.md | 4 +- docs/target-app-parity.md | 1 + 38 files changed, 281 insertions(+), 39 deletions(-) diff --git a/crates/ui-egui/src/app/commands.rs b/crates/ui-egui/src/app/commands.rs index 1d2493385e..f7726e396c 100644 --- a/crates/ui-egui/src/app/commands.rs +++ b/crates/ui-egui/src/app/commands.rs @@ -254,9 +254,7 @@ impl VectorcraftApp { { self.last_pathfinder = Some(op.to_string()); } - if r.is_ok() && matches!(id, "edit.copy" | "edit.cut" | "artboard.copy" | "artboard.cut") { - self.publish_clipboard(); - } + let copied = r.is_ok() && self.publish_copy(id); self.sync_views(); self.refresh_replace_font_warning(false); // File › Revert replaces the document in its tab, keeps the tab's view and starts the tool afresh. @@ -264,11 +262,8 @@ impl VectorcraftApp { match &r { Err(e) => self.ui.status = e.clone(), Ok(v) => { - // Image Trace's notes (a large image traces more slowly, or was scaled down). - if id.starts_with("imageTrace.make") - && let Some(w) = v["warnings"].as_array().and_then(|w| w.first()).and_then(Value::as_str) - { - self.ui.status = w.to_string(); + if matches!(id, "imageTrace.make" | "imageTrace.makeAndExpand") { + self.show_trace_notes(v); } if id == "file.new" { self.ui.status.clear(); @@ -312,9 +307,34 @@ impl VectorcraftApp { } } } + // The message the Copy or Cut leaves is the one its clipboard formats' notes may replace. + if copied { + self.clipboard_publishing.ran_with_status(&self.ui.status); + } r } + /// After a Copy or Cut `id` that ran: offer what it copied to other apps + /// ([`Self::publish_clipboard`]) → whether `id` is one. + fn publish_copy(&mut self, id: &str) -> bool { + let copy = matches!(id, "edit.copy" | "edit.cut" | "artboard.copy" | "artboard.cut"); + if copy { + self.publish_clipboard(matches!(id, "edit.cut" | "artboard.cut")); + } + copy + } + + /// Image Trace's notes in `reply` (a large image traces more slowly, or was scaled down): the + /// first of them and how many there are, with the rest for the message's hover. Without notes + /// the status bar keeps its message. + fn show_trace_notes(&mut self, reply: &Value) { + let notes = io::notes_of(reply); + if let Some(first) = notes.first() { + let status = crate::trace_runs::traced_with_notes(notes.len(), first); + io::show_with_notes(self, status, notes); + } + } + fn set_command_warning(&mut self, id: &str, warning: &str) { self.ui.status = warning.to_string(); if id != "text.replaceFont" { diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 3828d9ba2d..5faea23c39 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -4714,6 +4714,9 @@ axis Both И двете @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Изхвърлен е {n} възстановен документ|Изхвърлени са {n} възстановени документа @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Възстановен е {n} документ: запазете го, за да го съхраните|Възстановени са {n} документа: запазете ги, за да ги съхраните @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Отворено с {n} бележка: {first}|Отворено с {n} бележки: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Копирано с {n} бележка: {first}|Копирано с {n} бележки: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Изрязано с {n} бележка: {first}|Изрязано с {n} бележки: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Трасирано с {n} бележка: {first}|Трасирано с {n} бележки: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} е запазен с {n} бележка: {first}|{path} е запазен с {n} бележки: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Вградено е {n} изображение; {missing} липсват: първо ги свържете наново|Вградени са {n} изображения; {missing} липсват: първо ги свържете наново @msgplural Embedded {n} image|Embedded {n} images Вградено е {n} изображение|Вградени са {n} изображения diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 81fee3a079..69d1c18c03 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -5119,6 +5119,9 @@ imageTrace Outline Obris @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Odbačen {n} oporavljeni dokument|Odbačena {n} oporavljena dokumenta|Odbačeno {n} oporavljenih dokumenata @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Vraćen {n} oporavljeni dokument; sačuvajte ga da ga zadržite|Vraćena {n} oporavljena dokumenta; sačuvajte ih da ih zadržite|Vraćeno {n} oporavljenih dokumenata; sačuvajte ih da ih zadržite @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Otvoreno s {n} bilješkom: {first}|Otvoreno s {n} bilješke: {first}|Otvoreno s {n} bilješki: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Kopirano s {n} bilješkom: {first}|Kopirano s {n} bilješke: {first}|Kopirano s {n} bilješki: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Izrezano s {n} bilješkom: {first}|Izrezano s {n} bilješke: {first}|Izrezano s {n} bilješki: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Slika praćena s {n} bilješkom: {first}|Slika praćena s {n} bilješke: {first}|Slika praćena s {n} bilješki: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Sačuvano {path} s {n} bilješkom: {first}|Sačuvano {path} s {n} bilješke: {first}|Sačuvano {path} s {n} bilješki: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Ugrađena je {n} slika; nedostaje {missing}: prvo ih ponovo povežite|Ugrađene su {n} slike; nedostaje {missing}: prvo ih ponovo povežite|Ugrađeno je {n} slika; nedostaje {missing}: prvo ih ponovo povežite @msgplural Embedded {n} image|Embedded {n} images Ugrađena je {n} slika|Ugrađene su {n} slike|Ugrađeno je {n} slika diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 02ae0f4a09..019821f9cf 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -5955,6 +5955,9 @@ digits Malayalam Malaiàlam @msg Saved to User Defined: {_1} Desat a User Defined: {_1} @msg Saved {n} files beside {path} S’han desat {n} fitxers al costat de {path} @msg Saved {path} Desat {path} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} S’ha copiat amb {n} nota: {first}|S’ha copiat amb {n} notes: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} S’ha retallat amb {n} nota: {first}|S’ha retallat amb {n} notes: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} S’ha traçat la imatge amb {n} nota: {first}|S’ha traçat la imatge amb {n} notes: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} S’ha desat {path} amb {n} nota: {first}|S’ha desat {path} amb {n} notes: {first} @msg Saving S’està desant @msg Saving recovery data for {_1} S’estan desant les dades de recuperació de {_1} diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 7e3794e8a1..17238a6696 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -5308,6 +5308,9 @@ imageTrace Outline Obrys @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Zahozen {n} obnovený dokument|Zahozeny {n} obnovené dokumenty|Zahozeno {n} obnovených dokumentů @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Obnoven {n} dokument; pokud ho chcete zachovat, uložte ho|Obnoveny {n} dokumenty; pokud je chcete zachovat, uložte je|Obnoveno {n} dokumentů; pokud je chcete zachovat, uložte je @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Otevřeno, {n} poznámka: {first}|Otevřeno, {n} poznámky: {first}|Otevřeno, {n} poznámek: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Zkopírováno, {n} poznámka: {first}|Zkopírováno, {n} poznámky: {first}|Zkopírováno, {n} poznámek: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Vyjmuto, {n} poznámka: {first}|Vyjmuto, {n} poznámky: {first}|Vyjmuto, {n} poznámek: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Obraz vektorizován, {n} poznámka: {first}|Obraz vektorizován, {n} poznámky: {first}|Obraz vektorizován, {n} poznámek: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Uloženo: {path}, {n} poznámka: {first}|Uloženo: {path}, {n} poznámky: {first}|Uloženo: {path}, {n} poznámek: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Vložen {n} obrázek; chybí {missing}: nejprve je znovu propojte|Vloženy {n} obrázky; chybí {missing}: nejprve je znovu propojte|Vloženo {n} obrázků; chybí {missing}: nejprve je znovu propojte @msgplural Embedded {n} image|Embedded {n} images Vložen {n} obrázek|Vloženy {n} obrázky|Vloženo {n} obrázků diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index f7011e23bf..819388e4da 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -4804,6 +4804,9 @@ imageTrace Outline Kontur @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Kasserede {n} gendannet dokument|Kasserede {n} gendannede dokumenter @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Gendannede {n} dokument: gem det for at beholde det|Gendannede {n} dokumenter: gem dem for at beholde dem @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Åbnede med {n} note: {first}|Åbnede med {n} noter: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Kopierede med {n} note: {first}|Kopierede med {n} noter: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Klippede med {n} note: {first}|Klippede med {n} noter: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Sporede billedet med {n} note: {first}|Sporede billedet med {n} noter: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Gemte {path} med {n} note: {first}|Gemte {path} med {n} noter: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Indlejrede {n} billede; {missing} mangler: link dem igen først|Indlejrede {n} billeder; {missing} mangler: link dem igen først @msgplural Embedded {n} image|Embedded {n} images Indlejrede {n} billede|Indlejrede {n} billeder diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 4174537f87..01a9ccf652 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -4925,6 +4925,9 @@ theme Appearance Erscheinungsbild @msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} wiederhergestelltes Dokument verworfen|{n} wiederhergestellte Dokumente verworfen @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} wiederhergestelltes Dokument geöffnet: Speichern Sie es, um es zu behalten|{n} wiederhergestellte Dokumente geöffnet: Speichern Sie sie, um sie zu behalten @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Mit {n} Hinweis geöffnet: {first}|Mit {n} Hinweisen geöffnet: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Mit {n} Hinweis kopiert: {first}|Mit {n} Hinweisen kopiert: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Mit {n} Hinweis ausgeschnitten: {first}|Mit {n} Hinweisen ausgeschnitten: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Mit {n} Hinweis nachgezeichnet: {first}|Mit {n} Hinweisen nachgezeichnet: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} mit {n} Hinweis gespeichert: {first}|{path} mit {n} Hinweisen gespeichert: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} Bild eingebettet; {missing} fehlen: Verknüpfen Sie sie zuerst neu|{n} Bilder eingebettet; {missing} fehlen: Verknüpfen Sie sie zuerst neu @msgplural Embedded {n} image|Embedded {n} images {n} Bild eingebettet|{n} Bilder eingebettet diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index bde2fbee78..ebec15c3ed 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -4947,6 +4947,9 @@ digits Malayalam Μαλαγιάλαμ @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Απορρίφθηκε {n} ανακτημένο έγγραφο|Απορρίφθηκαν {n} ανακτημένα έγγραφα @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Επαναφέρθηκε {n} ανακτημένο έγγραφο: αποθηκεύστε το για να διατηρηθεί|Επαναφέρθηκαν {n} ανακτημένα έγγραφα: αποθηκεύστε τα για να διατηρηθούν @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Άνοιξε με {n} σημείωση: {first}|Άνοιξε με {n} σημειώσεις: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Αντιγράφηκε με {n} σημείωση: {first}|Αντιγράφηκε με {n} σημειώσεις: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Αποκόπηκε με {n} σημείωση: {first}|Αποκόπηκε με {n} σημειώσεις: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Η εικόνα ανιχνεύτηκε με {n} σημείωση: {first}|Η εικόνα ανιχνεύτηκε με {n} σημειώσεις: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Αποθηκεύτηκε το {path} με {n} σημείωση: {first}|Αποθηκεύτηκε το {path} με {n} σημειώσεις: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Ενσωματώθηκε {n} εικόνα· λείπουν {missing}: επανασυνδέστε τις πρώτα|Ενσωματώθηκαν {n} εικόνες· λείπουν {missing}: επανασυνδέστε τις πρώτα @msgplural Embedded {n} image|Embedded {n} images Ενσωματώθηκε {n} εικόνα|Ενσωματώθηκαν {n} εικόνες diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index ff28d9dfc5..0f1fd696e0 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5000,6 +5000,9 @@ axis Both Ambos @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Se descartó {n} documento recuperado|Se descartaron {n} documentos recuperados @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Se restauró {n} documento recuperado: guárdalo para conservarlo|Se restauraron {n} documentos recuperados: guárdalos para conservarlos @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Se abrió con {n} nota: {first}|Se abrió con {n} notas: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Se copió con {n} nota: {first}|Se copió con {n} notas: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Se cortó con {n} nota: {first}|Se cortó con {n} notas: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Se calcó la imagen con {n} nota: {first}|Se calcó la imagen con {n} notas: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Se guardó {path} con {n} nota: {first}|Se guardó {path} con {n} notas: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Se incrustó {n} imagen; faltan {missing}: vuelve a vincularlas primero|Se incrustaron {n} imágenes; faltan {missing}: vuelve a vincularlas primero @msgplural Embedded {n} image|Embedded {n} images Se incrustó {n} imagen|Se incrustaron {n} imágenes diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index bb74188ed8..a85a96c520 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5208,6 +5208,9 @@ imageTrace Outline Ääriviiva @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Hylättiin {n} palautettu asiakirja|Hylättiin {n} palautettua asiakirjaa @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Palautettiin {n} asiakirja: tallenna se säilyttääksesi sen|Palautettiin {n} asiakirjaa: tallenna ne säilyttääksesi ne @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Avattiin, {n} huomautus: {first}|Avattiin, {n} huomautusta: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Kopioitiin, {n} huomautus: {first}|Kopioitiin, {n} huomautusta: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Leikattiin, {n} huomautus: {first}|Leikattiin, {n} huomautusta: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Kuva jäljitettiin, {n} huomautus: {first}|Kuva jäljitettiin, {n} huomautusta: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Tallennettiin {path}, {n} huomautus: {first}|Tallennettiin {path}, {n} huomautusta: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Upotettiin {n} kuva; {missing} puuttuu: linkitä ne ensin uudelleen|Upotettiin {n} kuvaa; {missing} puuttuu: linkitä ne ensin uudelleen @msgplural Embedded {n} image|Embedded {n} images Upotettiin {n} kuva|Upotettiin {n} kuvaa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 09c9c35b0d..d3b68af3f2 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -4987,6 +4987,9 @@ axis Both Les deux @msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} document récupéré supprimé|{n} documents récupérés supprimés @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} document récupéré restauré : enregistrez-le pour le conserver|{n} documents récupérés restaurés : enregistrez-les pour les conserver @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Ouvert avec {n} remarque : {first}|Ouvert avec {n} remarques : {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Copié avec {n} remarque : {first}|Copié avec {n} remarques : {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Coupé avec {n} remarque : {first}|Coupé avec {n} remarques : {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Image vectorisée avec {n} remarque : {first}|Image vectorisée avec {n} remarques : {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} enregistré avec {n} remarque : {first}|{path} enregistré avec {n} remarques : {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} image incorporée ; il en manque {missing} : rétablissez d’abord leurs liens|{n} images incorporées ; il en manque {missing} : rétablissez d’abord leurs liens @msgplural Embedded {n} image|Embedded {n} images {n} image incorporée|{n} images incorporées diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 9aa4bd7b99..65c39ed997 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8491,6 +8491,9 @@ antiAlias Sharp शार्प @msgplural Relinked {n} image|Relinked {n} images {n} इमेज दोबारा लिंक हुई|{n} इमेज दोबारा लिंक हुईं @msgplural Replaced {n} image|Replaced {n} images {n} इमेज बदली गई|{n} इमेज बदली गईं @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} रिकवर किया डॉक्यूमेंट बहाल हुआ: रखने के लिए उसे सेव करें|{n} रिकवर किए डॉक्यूमेंट बहाल हुए: रखने के लिए उन्हें सेव करें +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} कॉपी किया गया, {n} नोट के साथ: {first}|कॉपी किया गया, {n} नोट्स के साथ: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} काटा गया, {n} नोट के साथ: {first}|काटा गया, {n} नोट्स के साथ: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} इमेज ट्रेस किया गया, {n} नोट के साथ: {first}|इमेज ट्रेस किया गया, {n} नोट्स के साथ: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} सेव किया गया, {n} नोट के साथ: {first}|{path} सेव किया गया, {n} नोट्स के साथ: {first} @msgplural Selected {n} embedded image|Selected {n} embedded images {n} एम्बेड की गई इमेज सिलेक्टेड|{n} एम्बेड की गई इमेज सिलेक्टेड @msgplural Selected {n} image|Selected {n} images {n} इमेज सिलेक्टेड|{n} इमेज सिलेक्टेड diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index af6f586880..9bb1441ddc 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5519,6 +5519,9 @@ imageTrace Outline Körvonal @msg Saved to User Defined: {_1} Mentve a felhasználóiak közé: {_1} @msg Saved {n} files beside {path} Mentett fájlok: {n}, a következő mellett: {path} @msg Saved {path} Mentve: {path} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Másolva; megjegyzések: {n}, az első: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Kivágva; megjegyzések: {n}, az első: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Kép vektorizálva; megjegyzések: {n}, az első: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Mentve: {path}; megjegyzések: {n}, az első: {first} @msg Saving Mentés @msg Saving recovery data for {_1} Helyreállítási adatok mentése: {_1} diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index e0ba31ecd5..2f6653eddd 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -4804,6 +4804,9 @@ imageTrace Outline Kontur @msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} dokumen hasil pemulihan dibuang @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} dokumen hasil pemulihan dipulihkan: simpan agar tidak hilang @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Dibuka dengan {n} catatan: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Disalin dengan {n} catatan: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Dipotong dengan {n} catatan: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Gambar dilacak dengan {n} catatan: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} disimpan dengan {n} catatan: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} gambar tersemat; {missing} hilang: tautkan ulang dulu @msgplural Embedded {n} image|Embedded {n} images {n} gambar tersemat diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index ce0bc58ce5..3ee1d9e3e6 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5051,6 +5051,9 @@ axis Both Entrambi @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Scartato {n} documento recuperato|Scartati {n} documenti recuperati @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Ripristinato {n} documento recuperato. Salvalo per conservarlo|Ripristinati {n} documenti recuperati. Salvali per conservarli @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Aperto con {n} nota: {first}|Aperto con {n} note: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Copiato con {n} nota: {first}|Copiato con {n} note: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Tagliato con {n} nota: {first}|Tagliato con {n} note: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Immagine ricalcata con {n} nota: {first}|Immagine ricalcata con {n} note: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Salvato {path} con {n} nota: {first}|Salvato {path} con {n} note: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Incorporata {n} immagine; mancanti: {missing} (ricollegale prima)|Incorporate {n} immagini; mancanti: {missing} (ricollegale prima) @msgplural Embedded {n} image|Embedded {n} images Incorporata {n} immagine|Incorporate {n} immagini diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 1ecce4618a..b74e8ad14c 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5168,6 +5168,9 @@ swatch Bright Violet ビビッドバイオレット @msgplural Discarded {n} recovered document|Discarded {n} recovered documents 復帰用データのドキュメントを {n} 件破棄しました @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them 復帰用データからドキュメントを {n} 件復元しました: 残すには保存してください @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} ドキュメントを開きました (注意 {n} 件): {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} コピーしましたが、注意事項が {n} 件あります: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} 切り取りましたが、注意事項が {n} 件あります: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} 画像をトレースしましたが、注意事項が {n} 件あります: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} を保存しましたが、注意事項が {n} 件あります: {first} @msg Saving recovery data for {_1} {_1} の復帰用データを保存中 @msg This shortcut file is in a form VectorCraft can't read. このショートカットファイルは VectorCraft で読み込めない形式です。 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 3d6425c373..07a171905e 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -4653,6 +4653,9 @@ font-technology Variable ცვლადი @msgplural Discarded {n} recovered document|Discarded {n} recovered documents უარყოფილია აღდგენილი დოკუმენტები: {n} @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them აღდგენილია დოკუმენტები: {n}: შესანარჩუნებლად შეინახეთ ისინი @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} გაიხსნა, შენიშვნები: {n}: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} კოპირებულია, შენიშვნები: {n}: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} ამოჭრილია, შენიშვნები: {n}: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} გამოსახულება ვექტორიზებულია, შენიშვნები: {n}: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} შენახულია {path}, შენიშვნები: {n}: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first ჩაშენებულია გამოსახულებები: {n}; აკლია {missing}: ჯერ ხელახლა მიაბით @msgplural Embedded {n} image|Embedded {n} images ჩაშენებულია გამოსახულებები: {n} diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index fb87488d64..16c39178c3 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5095,6 +5095,9 @@ theme Appearance 외관 @msgplural Discarded {n} recovered document|Discarded {n} recovered documents 복구된 문서 {n}개를 삭제했습니다 @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them 복구된 문서 {n}개를 복원했습니다: 보관하려면 저장하세요 @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} 참고 {n}건과 함께 열었습니다: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} 참고 {n}건과 함께 복사했습니다: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} 참고 {n}건과 함께 잘라냈습니다: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} 참고 {n}건과 함께 이미지를 추적했습니다: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} 참고 {n}건과 함께 {path}을(를) 저장했습니다: {first} @msg Saving recovery data for {_1} {_1}의 복구 데이터를 저장하는 중 @msg bad shortcut 잘못된 단축키 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index b3388fa82a..d8f89db400 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -4816,6 +4816,9 @@ imageTrace Outline Contour @msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} hersteld document verworpen|{n} herstelde documenten verworpen @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} hersteld document teruggezet: sla het op om het te behouden|{n} herstelde documenten teruggezet: sla ze op om ze te behouden @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Geopend met {n} opmerking: {first}|Geopend met {n} opmerkingen: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Gekopieerd met {n} opmerking: {first}|Gekopieerd met {n} opmerkingen: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Geknipt met {n} opmerking: {first}|Geknipt met {n} opmerkingen: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Afbeelding getraceerd met {n} opmerking: {first}|Afbeelding getraceerd met {n} opmerkingen: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} opgeslagen met {n} opmerking: {first}|{path} opgeslagen met {n} opmerkingen: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} afbeelding ingesloten; {missing} ontbreken: koppel ze eerst opnieuw|{n} afbeeldingen ingesloten; {missing} ontbreken: koppel ze eerst opnieuw @msgplural Embedded {n} image|Embedded {n} images {n} afbeelding ingesloten|{n} afbeeldingen ingesloten diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 0729e35c79..eaa51fe15c 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5134,6 +5134,9 @@ imageTrace Outline Kontur @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Odrzucono {n} odzyskany dokument|Odrzucono {n} odzyskane dokumenty|Odrzucono {n} odzyskanych dokumentów @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Przywrócono {n} odzyskany dokument: zapisz go, aby go zachować|Przywrócono {n} odzyskane dokumenty: zapisz je, aby je zachować|Przywrócono {n} odzyskanych dokumentów: zapisz je, aby je zachować @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Otwarto z {n} uwagą: {first}|Otwarto z {n} uwagami: {first}|Otwarto z {n} uwagami: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Skopiowano z {n} uwagą: {first}|Skopiowano z {n} uwagami: {first}|Skopiowano z {n} uwagami: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Wycięto z {n} uwagą: {first}|Wycięto z {n} uwagami: {first}|Wycięto z {n} uwagami: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Obrysowano obraz z {n} uwagą: {first}|Obrysowano obraz z {n} uwagami: {first}|Obrysowano obraz z {n} uwagami: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Zapisano {path} z {n} uwagą: {first}|Zapisano {path} z {n} uwagami: {first}|Zapisano {path} z {n} uwagami: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Osadzono {n} obraz; brakuje {missing}: najpierw połącz je ponownie|Osadzono {n} obrazy; brakuje {missing}: najpierw połącz je ponownie|Osadzono {n} obrazów; brakuje {missing}: najpierw połącz je ponownie @msgplural Embedded {n} image|Embedded {n} images Osadzono {n} obraz|Osadzono {n} obrazy|Osadzono {n} obrazów diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 36f778dbd5..8bb19e00fa 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4455,6 +4455,9 @@ axis Both Ambos @msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} documento recuperado descartado|{n} documentos recuperados descartados @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} documento recuperado restaurado: salve-o para mantê-lo|{n} documentos recuperados restaurados: salve-os para mantê-los @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Aberto com {n} observação: {first}|Aberto com {n} observações: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Copiado com {n} observação: {first}|Copiado com {n} observações: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Recortado com {n} observação: {first}|Recortado com {n} observações: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Imagem rastreada com {n} observação: {first}|Imagem rastreada com {n} observações: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path} salvo com {n} observação: {first}|{path} salvo com {n} observações: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} imagem incorporada; faltam {missing}: revincule-as primeiro|{n} imagens incorporadas; faltam {missing}: revincule-as primeiro @msgplural Embedded {n} image|Embedded {n} images {n} imagem incorporada|{n} imagens incorporadas diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 442a9612d4..ed76793c3e 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5037,6 +5037,9 @@ axis Both Оба @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Отменён {n} восстановленный документ|Отменено {n} восстановленных документа|Отменено {n} восстановленных документов @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Восстановлен {n} документ: сохраните его, чтобы оставить|Восстановлено {n} документа: сохраните их, чтобы оставить|Восстановлено {n} документов: сохраните их, чтобы оставить @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Открыто с {n} примечанием: {first}|Открыто с {n} примечаниями: {first}|Открыто с {n} примечаниями: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Скопировано с {n} примечанием: {first}|Скопировано с {n} примечаниями: {first}|Скопировано с {n} примечаниями: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Вырезано с {n} примечанием: {first}|Вырезано с {n} примечаниями: {first}|Вырезано с {n} примечаниями: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Изображение трассировано с {n} примечанием: {first}|Изображение трассировано с {n} примечаниями: {first}|Изображение трассировано с {n} примечаниями: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Сохранено: {path} с {n} примечанием: {first}|Сохранено: {path} с {n} примечаниями: {first}|Сохранено: {path} с {n} примечаниями: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Внедрено {n} изображение; отсутствует {missing}: сначала восстановите связи|Внедрено {n} изображения; отсутствует {missing}: сначала восстановите связи|Внедрено {n} изображений; отсутствует {missing}: сначала восстановите связи @msgplural Embedded {n} image|Embedded {n} images Внедрено {n} изображение|Внедрено {n} изображения|Внедрено {n} изображений diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 8a8f8453b6..8f46aa32c2 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -4895,6 +4895,9 @@ axis Both Båda @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Kastade {n} återställt dokument|Kastade {n} återställda dokument @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Återställde {n} återskapat dokument: spara det för att behålla det|Återställde {n} återskapade dokument: spara dem för att behålla dem @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Öppnad med {n} anteckning: {first}|Öppnad med {n} anteckningar: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Kopierade med {n} anteckning: {first}|Kopierade med {n} anteckningar: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Klippte ut med {n} anteckning: {first}|Klippte ut med {n} anteckningar: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Kalkerade bilden med {n} anteckning: {first}|Kalkerade bilden med {n} anteckningar: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Sparade {path} med {n} anteckning: {first}|Sparade {path} med {n} anteckningar: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Bäddade in {n} bild; {missing} saknas: länka om dem först|Bäddade in {n} bilder; {missing} saknas: länka om dem först @msgplural Embedded {n} image|Embedded {n} images Bäddade in {n} bild|Bäddade in {n} bilder diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 66caa1c3a4..c6767bafdc 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -2153,19 +2153,32 @@ const COUNTED_STATUS_MESSAGES: &[(&str, &str)] = &[ ("Downloaded 1 file", "Downloaded 2 files"), ("Exported 1 file to /out", "Exported 2 files to /out"), ("Loaded “Tidy”: 1 step was left out", "Loaded “Tidy”: 2 steps were left out"), + ("Copied with 1 note: a note", "Copied with 2 notes: a note"), + ("Cut with 1 note: a note", "Cut with 2 notes: a note"), + ("Traced with 1 note: a note", "Traced with 2 notes: a note"), ]; -/// The link, font, export and action set status messages name a count of 1 in the singular and other counts in -/// the plural, and every complete catalog translates both, in the form its plural rule picks. +/// The link, font, export, action set, clipboard and Image Trace status messages name a count of 1 in the singular +/// and other counts in the plural, and every complete catalog translates both, in the form its plural rule picks. #[test] fn counted_status_messages_take_the_plural_form() { use crate::panels::links::{relinked_status, updated_status}; + use crate::sysclip::copied_with_notes; + use crate::trace_runs::traced_with_notes; assert_eq!((relinked_status(1), relinked_status(2)), ("Relinked 1 image".to_string(), "Relinked 2 images".to_string())); assert_eq!((updated_status(1), updated_status(2)), ("Updated 1 image".to_string(), "Updated 2 images".to_string())); assert_eq!(crate::dialogs::missing_links::changed_on_disk_status(1), COUNTED_STATUS_MESSAGES[2].0); assert_eq!(crate::dialogs::missing_links::changed_on_disk_status(2), COUNTED_STATUS_MESSAGES[2].1); assert_eq!(crate::io::exported_with_notes("/out/a.svg", 1, "a note"), COUNTED_STATUS_MESSAGES[4].0); assert_eq!(crate::io::exported_with_notes("/out/a.svg", 2, "a note"), COUNTED_STATUS_MESSAGES[4].1); + let n = COUNTED_STATUS_MESSAGES.len(); + let owned = |(one, other): (&str, &str)| (one.to_string(), other.to_string()); + assert_eq!((copied_with_notes(false, 1, "a note"), copied_with_notes(false, 2, "a note")), owned(COUNTED_STATUS_MESSAGES[n - 3])); + assert_eq!((copied_with_notes(true, 1, "a note"), copied_with_notes(true, 2, "a note")), owned(COUNTED_STATUS_MESSAGES[n - 2])); + assert_eq!((traced_with_notes(1, "a note"), traced_with_notes(2, "a note")), owned(COUNTED_STATUS_MESSAGES[n - 1])); + // A note that holds placeholder text is not filled in again. + assert_eq!(copied_with_notes(true, 3, "{n} {first}"), "Cut with 3 notes: {n} {first}"); + assert_eq!(message(de(), &traced_with_notes(2, "{n}")), "Mit 2 Hinweisen nachgezeichnet: {n}"); // A value that holds placeholder text is not filled in again. assert_eq!(crate::io::exported_with_notes("/out/{first}.svg", 1, "{n}"), "Exported /out/{first}.svg with 1 note: {n}"); for code in COMPLETE_MESSAGES { diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index ef8773c31b..35260348e6 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -4733,6 +4733,9 @@ axis Both Her İkisi @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Kurtarılan {n} belge atıldı @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Kurtarılan {n} belge geri yüklendi: saklamak için kaydedin @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} {n} notla açıldı: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} {n} notla kopyalandı: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} {n} notla kesildi: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Görüntü {n} notla izlendi: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} {path}, {n} notla kaydedildi: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} görsel gömüldü; {missing} eksik: önce onları yeniden bağlayın @msgplural Embedded {n} image|Embedded {n} images {n} görsel gömüldü diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 0bccbd8cb6..3ec176de4f 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5035,6 +5035,9 @@ axis Both Обидві @msgplural Discarded {n} recovered document|Discarded {n} recovered documents Скасовано {n} відновлений документ|Скасовано {n} відновлені документи|Скасовано {n} відновлених документів @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them Відновлено {n} документ: збережіть його, щоб залишити|Відновлено {n} документи: збережіть їх, щоб залишити|Відновлено {n} документів: збережіть їх, щоб залишити @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} Відкрито з {n} приміткою: {first}|Відкрито з {n} примітками: {first}|Відкрито з {n} примітками: {first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Скопійовано з {n} приміткою: {first}|Скопійовано з {n} примітками: {first}|Скопійовано з {n} примітками: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Вирізано з {n} приміткою: {first}|Вирізано з {n} примітками: {first}|Вирізано з {n} примітками: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Зображення трасовано з {n} приміткою: {first}|Зображення трасовано з {n} примітками: {first}|Зображення трасовано з {n} примітками: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Збережено: {path} з {n} приміткою: {first}|Збережено: {path} з {n} примітками: {first}|Збережено: {path} з {n} примітками: {first} @msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first Вбудовано {n} зображення; відсутніх: {missing}. Спочатку відновіть їхні зв’язки|Вбудовано {n} зображення; відсутніх: {missing}. Спочатку відновіть їхні зв’язки|Вбудовано {n} зображень; відсутніх: {missing}. Спочатку відновіть їхні зв’язки @msgplural Embedded {n} image|Embedded {n} images Вбудовано {n} зображення|Вбудовано {n} зображення|Вбудовано {n} зображень diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 4f084029db..596ce945a5 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5182,6 +5182,9 @@ theme Appearance Giao diện @msg Saved to User Defined: {_1} Đã lưu vào Người dùng tùy chỉnh: {_1} @msg Saved {n} files beside {path} Đã lưu {n} tệp bên cạnh {path} @msg Saved {path} Đã lưu {path} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} Đã sao chép với {n} ghi chú: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} Đã cắt với {n} ghi chú: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} Đã vector hóa ảnh với {n} ghi chú: {first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} Đã lưu {path} với {n} ghi chú: {first} @msg Saving Đang lưu @msg Saving recovery data for {_1} Đang lưu dữ liệu phục hồi cho {_1} diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index b04e65a65b..51839e55f9 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -4856,6 +4856,9 @@ imageTrace Outline 轮廓 @msgplural Discarded {n} recovered document|Discarded {n} recovered documents 已丢弃 {n} 个恢复的文档 @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them 已还原 {n} 个恢复的文档:请保存以保留它们 @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} 已打开,有 {n} 条注释:{first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} 已复制,有 {n} 条注释:{first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} 已剪切,有 {n} 条注释:{first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} 已描摹图像,有 {n} 条注释:{first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} 已保存 {path},有 {n} 条注释:{first} @msg Saving recovery data for {_1} 正在保存 {_1} 的恢复数据 @msg This shortcut file is in a form VectorCraft can't read. 此快捷键文件的格式 VectorCraft 无法读取。 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index be62fde8a7..a1543bb69c 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2623,6 +2623,9 @@ file-filter Templates 範本 @msgplural Discarded {n} recovered document|Discarded {n} recovered documents 已捨棄 {n} 份復原的文件 @msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them 已還原 {n} 份復原的文件:請儲存以保留 @msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} 已開啟,附有 {n} 則註解:{first} +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} 已複製,附有 {n} 則註解:{first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} 已剪下,附有 {n} 則註解:{first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} 已描圖影像,附有 {n} 則註解:{first} @msgplural Saved {path} with {n} note: {first}|Saved {path} with {n} notes: {first} 已儲存 {path},附有 {n} 則註解:{first} @msg Saving recovery data for {_1} 正在儲存 {_1} 的復原資料 @msg This shortcut file is in a form VectorCraft can't read. VectorCraft 無法讀取此快速鍵檔案的格式。 diff --git a/crates/ui-egui/src/panels/character.rs b/crates/ui-egui/src/panels/character.rs index 2ad678bf62..b8309ca2fb 100644 --- a/crates/ui-egui/src/panels/character.rs +++ b/crates/ui-egui/src/panels/character.rs @@ -545,7 +545,8 @@ static CTX: OnceLock = OnceLock::new(); static CLIP: Mutex = Mutex::new(String::new()); static CLIP_RUNS: Mutex> = Mutex::new(None); -fn text_copy(app: &mut VectorcraftApp) -> bool { +/// Copy the Type tool's selected text (with `cut`, for a Cut, whose caller then deletes it). +fn text_copy(app: &mut VectorcraftApp, cut: bool) -> bool { let Some((id, a, b)) = text_editing(app) else { return false }; let story = text_story(app); // An empty selection has nothing to copy, unless the story's text is in the other frames. @@ -573,7 +574,7 @@ fn text_copy(app: &mut VectorcraftApp) -> bool { // plain-text copy would replace its formats, so let the publisher provide both text and // rich art. Paste on the canvas can then keep the runs after Type editing ends. if app.services.system_clipboard.is_some() { - app.publish_clipboard(); + app.publish_clipboard(cut); return true; } } @@ -644,10 +645,10 @@ pub(crate) fn intercept_text_command(app: &mut VectorcraftApp, id: &str) -> Opti } match id { "edit.copy" => { - text_copy(app); + text_copy(app, false); } "edit.cut" => { - if text_copy(app) { + if text_copy(app, true) { text_key(app, ToolKey::Delete, Mods::default()); } } @@ -738,10 +739,10 @@ pub(crate) fn apply_type_input(app: &mut VectorcraftApp, t: TextInput) { match t { TextInput::Key(k, m) => text_key(app, k, m), TextInput::Copy => { - text_copy(app); + text_copy(app, false); } TextInput::Cut => { - if text_copy(app) { + if text_copy(app, true) { text_key(app, ToolKey::Delete, Mods::default()); } } diff --git a/crates/ui-egui/src/panels/character/tests.rs b/crates/ui-egui/src/panels/character/tests.rs index a90286e2fb..1251ba6ef7 100644 --- a/crates/ui-egui/src/panels/character/tests.rs +++ b/crates/ui-egui/src/panels/character/tests.rs @@ -1427,7 +1427,7 @@ fn copy_and_cut_take_a_story_that_left_the_edited_frame() { // A story that holds no text has nothing to copy, so Cut does not run its delete. app.run("select.all", json!({})).unwrap(); assert_eq!(text_story(&app).map(|frames| frames.len()), Some(3)); - assert!(!text_copy(&mut app)); + assert!(!text_copy(&mut app, false)); } } } diff --git a/crates/ui-egui/src/sysclip.rs b/crates/ui-egui/src/sysclip.rs index ac382547de..722c602d72 100644 --- a/crates/ui-egui/src/sysclip.rs +++ b/crates/ui-egui/src/sysclip.rs @@ -97,6 +97,9 @@ pub(crate) struct Publishing { /// The latest one's formats could not be written: what the system clipboard held when the /// write failed, and the text of those formats. unwritten: Option<(Held, String)>, + /// The status bar's message when the latest one ran. Its formats' notes replace the message + /// only while the status bar still shows it. + status: String, } impl Publishing { @@ -110,6 +113,32 @@ impl Publishing { pub(crate) fn latest(&self) -> u64 { self.latest.load(Ordering::SeqCst) } + + /// `status` is the status bar's message the latest Copy or Cut left, which its formats' notes + /// may replace. + pub(crate) fn ran_with_status(&mut self, status: &str) { + status.clone_into(&mut self.status); + } +} + +/// The status bar's line after a Copy (or with `cut`, a Cut) whose formats have `n` notes, the +/// first of them `first`. +pub(crate) fn copied_with_notes(cut: bool, n: usize, first: &str) -> String { + let (one, other) = if cut { + ("Cut with {n} note: {first}", "Cut with {n} notes: {first}") + } else { + ("Copied with {n} note: {first}", "Copied with {n} notes: {first}") + }; + crate::i18n::msg_n(n as u64, one, other, &[("first", first)]) +} + +/// Show a Copy's (or with `cut`, a Cut's) formats' `notes` in the status bar: the first of them +/// and how many there are, with the rest for the message's hover. Without notes the status bar +/// keeps its message. +pub(crate) fn show_copy_notes(app: &mut VectorcraftApp, cut: bool, notes: Vec) { + let Some(first) = notes.first() else { return }; + let status = copied_with_notes(cut, notes.len(), first); + crate::io::show_with_notes(app, status, notes); } /// Does a flavour of type `mime` load with `clipboard.importImage` ([`import_command`])? @@ -166,9 +195,11 @@ impl VectorcraftApp { /// ([`Self::drop_formats_after_egui_copy`]), drops the formats not written yet. While the /// latest Copy or Cut's formats wait to be written, Paste takes the internal clipboard, and /// while a text field or type has the keyboard the app waits for them - /// ([`Self::write_formats_before_text_input`]). Once they are written, the status bar shows - /// the first of the PNG's and PDF's warnings. - pub(crate) fn publish_clipboard(&mut self) { + /// ([`Self::write_formats_before_text_input`]). Once they are written, while the status bar + /// still shows the message the Copy or Cut (`cut`) left ([`Publishing::ran_with_status`]), it + /// shows the first of the PNG's and PDF's notes and how many there are; hovering the message + /// lists them ([`crate::io::show_with_notes`]). + pub(crate) fn publish_clipboard(&mut self, cut: bool) { // Ruler guides copied alone stay in VectorCraft, but the Copy still replaces what the // system clipboard held: it is emptied, so the next Paste takes the guides rather than // what another app copied before, and what another app copies after still wins (#3226). @@ -188,6 +219,7 @@ impl VectorcraftApp { let n = latest.fetch_add(1, Ordering::SeqCst).wrapping_add(1); self.clipboard_publishing.pending = true; self.clipboard_publishing.unwritten = None; + self.clipboard_publishing.ran_with_status(&self.ui.status); // What the clipboard holds at the Copy or Cut: a copy made elsewhere before the write is newer. let before = self.services.system_clipboard.as_deref_mut().map(Held::now); let (tx, made) = channel(); @@ -236,11 +268,11 @@ impl VectorcraftApp { }); match written { Err(e) => app.ui.status = format!("Couldn't copy to the system clipboard: {e}"), - // Show the first of the PNG's and PDF's warnings (an image that couldn't be decoded, - // type in the fallback font). + // The PNG's and PDF's notes (an image that couldn't be decoded, type in the + // fallback font), unless another message has replaced the Copy or Cut's since. Ok(warnings) => { - if let Some(first) = warnings.into_iter().next() { - app.ui.status = first; + if app.ui.status == app.clipboard_publishing.status { + show_copy_notes(app, cut, warnings); } } } diff --git a/crates/ui-egui/src/tests/sysclip.rs b/crates/ui-egui/src/tests/sysclip.rs index 1da5b93322..0efb576fd9 100644 --- a/crates/ui-egui/src/tests/sysclip.rs +++ b/crates/ui-egui/src/tests/sysclip.rs @@ -378,31 +378,77 @@ fn a_copy_while_the_worker_saves_writes_the_formats_at_once() { assert_eq!(board.borrow().writes, 1); } -/// Copy of an image the renderer can't decode: the PNG leaves it out, and once the formats are -/// written the status bar shows the PNG's note, made at once or on the worker. -#[test] -fn copy_says_in_the_status_bar_when_an_image_could_not_be_decoded() { - const WARNING: &str = "an image couldn't be decoded and is missing from the picture"; - // A PNG whose header reads but whose pixel data is cut short. +/// A PNG whose header reads but whose pixel data is cut short, which the renderer can't decode. +fn cut_short_png() -> Vec { let mut png = Vec::new(); image::RgbaImage::from_pixel(64, 32, image::Rgba([200, 30, 30, 255])) .write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png) .unwrap(); + png +} + +/// The PNG's note on an image the renderer can't decode. +const UNDECODED: &str = "an image couldn't be decoded and is missing from the picture"; + +/// Copy of an image the renderer can't decode: the PNG leaves it out, and once the formats are +/// written the status bar says the Copy (or Cut) has 1 note and shows it, made at once or on the +/// worker. The note is kept for the message's hover, and a Copy without notes leaves the message. +#[test] +fn copy_says_in_the_status_bar_when_an_image_could_not_be_decoded() { + let png = cut_short_png(); for worker in [false, true] { let (mut app, board) = if worker { app_with_worker() } else { app() }; app.status("Ready"); copy_rect(&mut app); background::wait_all(&mut app); - assert_eq!(app.ui.status, "Ready", "worker {worker}: no note"); - vectorcraft_testkit::fixtures::place_cut_png(&mut app.session, &png, json!({})); - app.status("Ready"); - run(&mut app, "edit.copy", json!({})); - background::wait_all(&mut app); - assert_eq!(written(&board), [TEXT, SVG, PNG], "worker {worker}"); - assert_eq!(app.ui.status, WARNING, "worker {worker}"); + assert_eq!((app.ui.status.as_str(), &app.ui.status_notes), ("Ready", &None), "worker {worker}: no note"); + for (id, said) in [("edit.copy", "Copied"), ("artboard.copy", "Copied"), ("edit.cut", "Cut")] { + vectorcraft_testkit::fixtures::place_cut_png(&mut app.session, &png, json!({})); + app.status("Ready"); + let p = if id == "artboard.copy" { json!({"index": 0}) } else { json!({}) }; + run(&mut app, id, p); + background::wait_all(&mut app); + assert_eq!(written(&board), [TEXT, SVG, PNG], "worker {worker}: {id}"); + let status = format!("{said} with 1 note: {UNDECODED}"); + assert_eq!(app.ui.status, status, "worker {worker}: {id}"); + assert_eq!(app.ui.status_notes, Some((status, vec![UNDECODED.to_string()])), "worker {worker}: {id}"); + } } } +/// The status bar names how many notes a Copy's or Cut's formats have and the first of them, and +/// keeps them all, in order, for the message's hover. Without notes it keeps its message. +#[test] +fn copy_notes_are_counted_and_kept_in_order() { + let (mut app, _) = app(); + let notes: Vec = ["first", "second", "third"].map(String::from).to_vec(); + for (cut, said) in [(false, "Copied"), (true, "Cut")] { + crate::sysclip::show_copy_notes(&mut app, cut, notes.clone()); + let status = format!("{said} with 3 notes: first"); + assert_eq!(app.ui.status, status); + assert_eq!(app.ui.status_notes, Some((status, notes.clone()))); + } + app.status("Ready"); + app.ui.status_notes = None; + crate::sysclip::show_copy_notes(&mut app, false, vec![]); + assert_eq!((app.ui.status.as_str(), &app.ui.status_notes), ("Ready", &None)); +} + +/// A message shown while a Copy's formats are made on the worker stays: the formats are written +/// once they are ready, and their note does not replace the newer message. +#[test] +fn a_copy_note_does_not_replace_a_newer_message() { + let (mut app, board, hold) = app_with_busy_worker(""); + vectorcraft_testkit::fixtures::place_cut_png(&mut app.session, &cut_short_png(), json!({})); + app.status("Ready"); + run(&mut app, "edit.copy", json!({})); + app.status("Saved /out/a.vectorcraft"); + drop(hold); + background::wait_all(&mut app); + assert_eq!(written(&board), [TEXT, SVG, PNG]); + assert_eq!((app.ui.status.as_str(), &app.ui.status_notes), ("Saved /out/a.vectorcraft", &None)); +} + /// Text copied in a field or with the Type tool after Copy, before the formats are written: they /// are not written, the system clipboard keeps the text, and Paste takes it. #[test] diff --git a/crates/ui-egui/src/tests/trace_runs.rs b/crates/ui-egui/src/tests/trace_runs.rs index d2de2f00f5..6da8e8a60e 100644 --- a/crates/ui-egui/src/tests/trace_runs.rs +++ b/crates/ui-egui/src/tests/trace_runs.rs @@ -108,6 +108,46 @@ fn without_threads_make_traces_at_once() { assert_eq!(undos(&app), before + 1); } +/// A trace's notes: the status bar names how many there are and the first of them, and keeps them +/// all, in the reply's order, for the message's hover. Make and Make and Expand, at once, off the +/// UI thread and from the Image Trace panel; a trace without notes leaves the status bar empty. +#[test] +fn a_trace_shows_how_many_notes_it_has() { + let mut app = app(); + let img = image::RgbaImage::from_fn(1501, 20, |x, _| image::Rgba(if x < 700 { [0, 0, 0, 255] } else { [255, 255, 255, 255] })); + let mut png = vec![]; + img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + let data = vectorcraft_format::base64_encode(&png); + let p = json!({"params": {"mode": "color", "palette": "limited", "colors": 2, "keepColors": ["#ff00ff", "#00ffff"]}}); + for (command, threaded, from_panel) in + [("imageTrace.make", false, false), ("imageTrace.make", true, false), ("imageTrace.makeAndExpand", true, true)] + { + app.run("file.place", json!({"name": "wide.png", "dataBase64": data, "link": false})).unwrap(); + app.trace_runs.off_the_ui_thread = threaded; + app.ui.status.clear(); + trace_runs::start(&mut app, command, p.clone(), from_panel).unwrap(); + wait(&mut app); + let notes = [ + "Nothing was traced: none of the colors the trace found matches keepColors (#ff00ff, #00ffff).", + "The image is 1501 × 20 pixels, more than 1500 on a side: it is traced, but more slowly. A lower-fidelity preset or a smaller copy of the image traces faster.", + ] + .map(String::from) + .to_vec(); + let status = format!("Traced with 2 notes: {}", notes[0]); + assert_eq!(app.ui.status, status, "{command}, threaded {threaded}"); + assert_eq!(app.ui.status_notes, Some((status, notes)), "{command}, threaded {threaded}"); + } + // The 40 × 40 px image of [`app`] traces without notes: the status bar stays empty. + let mut app = self::app(); + for command in ["imageTrace.make", "imageTrace.makeAndExpand"] { + app.ui.status.clear(); + let v = app.run(command, json!({"preset": "Default"})).unwrap(); + assert_eq!(v["warnings"], json!([]), "{command}"); + assert_eq!((app.ui.status.as_str(), &app.ui.status_notes), ("", &None), "{command}"); + app.run("edit.undo", json!({})).unwrap(); + } +} + /// Nothing to trace fails at once, before anything runs. #[test] fn nothing_to_trace_fails_at_once() { diff --git a/crates/ui-egui/src/trace_runs.rs b/crates/ui-egui/src/trace_runs.rs index e05448b10c..09df74f724 100644 --- a/crates/ui-egui/src/trace_runs.rs +++ b/crates/ui-egui/src/trace_runs.rs @@ -76,6 +76,11 @@ pub struct TraceRuns { pub(crate) off_the_ui_thread: bool, } +/// The status bar's line after an Image Trace with `n` notes, the first of them `first`. +pub(crate) fn traced_with_notes(n: usize, first: &str) -> String { + crate::i18n::msg_n(n as u64, "Traced with {n} note: {first}", "Traced with {n} notes: {first}", &[("first", first)]) +} + /// Does `app` trace off the UI thread? Where documents open off it ([`crate::opening::available`]), /// and in the unit tests that set `off_the_ui_thread`. pub fn available(app: &VectorcraftApp) -> bool { diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 5694d9582d..ab50aecf1e 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -702,7 +702,8 @@ type with those options (`file.place {text: {…}}`). System clipboard formats: through the desktop app, `edit.copy`, `edit.cut`, `artboard.copy` and `artboard.cut` publish what `clipboard.flavours` lists to the system clipboard (once they are written, the status bar shows the first of the PNG's and PDF's -`warnings`, such as an image that couldn't be decoded), and every Paste command first loads what another app copied (`clipboard.importSvg`, +`warnings`, such as an image that couldn't be decoded, and how many there are, and hovering the message lists them, unless +another message has replaced the Copy or Cut's meanwhile), and every Paste command first loads what another app copied (`clipboard.importSvg`, `importPdf`, `importEps`, `importText` or `importImage`, centred in the view; the desktop app reads PDF and EPS from the Windows clipboard and, with SVG, from the macOS pasteboard, and an `.eps` file, or a `.ai` or `.ait` file that holds a PDF or PostScript, copied in a file manager anywhere; a copied `.ai` or `.ait` file that holds a PDF loads with `importPdf {editingData: true}`, which reads its editing data); an import error answers the Paste with that error and pastes nothing. Cmd+V also pastes a bitmap or PDF with no text beside it (on the key's release, as egui sends no diff --git a/docs/mcp.md b/docs/mcp.md index 274db05a34..4aee59ff57 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -6689,7 +6689,9 @@ area). Each one has a query command: (a one-page PDF, the page the objects' visual bounds) and `clipboard.exportPng {scale?}` (cropped to the objects, transparent around them). As in `document.export`, the PDF's and the PNG's replies list their notes in `warnings` (type written in the fallback font…; the PNG's also say when an image couldn't be decoded). After Copy or Cut the app -shows the first note of the PDF and PNG it offers in the status bar. +shows the first note of the PDF and PNG it offers in the status bar and how many there are, and hovering the message lists +them all, unless another message has replaced the Copy or Cut's while the formats were made. The `clipboard.export*` +replies still list every note. What other apps copied goes into the clipboard with `clipboard.importSvg`, `clipboard.importPdf {dataBase64, page?, password?, editingData?}` (the page's objects; with `editingData: true` the data is a `.ai` or `.ait` file, and every diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index f04ee3c910..68c56358e2 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -594,6 +594,7 @@ since 2026-10-01. - **Clipped bottom-bar text (#6622):** A Help Bar hint wider than the window, such as the Dimension tool's hint in an 800-point window, ends in an ellipsis, as the status message does. In a narrow status bar the tool name ends in an ellipsis and leaves the status message its room. Resting the pointer on a clipped hint, tool name or message shows the full text in a tooltip that wraps within the window. Text that fits shows no tooltip, and screen readers receive the full text. Scores and estimates are unchanged. - **Notes of an open in the status bar:** After File › Open the status message names the first note that says reading the file left something out (the notes that make Save ask before writing over the file), else the first note, and counts them all. With several notes, resting the pointer on the message lists them in that order, as many as fit in the window and at most 30, then how many more. Screen readers receive the list after the message. Scores and estimates are unchanged. - **Notes of a save or an export in the status bar:** After Save, Save As, Save a Copy, Save as Template, Save a Timestamped Copy, Save as PDF, Export As, Export Selection, Export for Screens, Asset Export, Save for Web, Preview in Browser, Save for Office Documents, Text Export Options, a print to a file or the CSS Properties panel's export, the status message names the first note and counts them all. With several notes, resting the pointer on the message lists them in the order the reply gives them (a save's notes start with what the format loses), as it lists an open's notes. Scores and estimates are unchanged. +- **Notes of a Copy, a Cut or an Image Trace in the status bar:** After Copy or Cut (also of artboards and of text in the Type tool) writes its formats to the system clipboard, and after Image Trace's Make or Make and Expand, the status message names the first note and counts them all. With several notes, resting the pointer on the message lists them in the order they were made, as it lists a save's notes. A message shown while the clipboard formats were being made stays in place of the Copy's or Cut's notes. Scores and estimates are unchanged. - **What a save or an export loses, named first:** Each writer marks its notes as a loss (something of the document the file leaves out or writes differently) or a note on the options (an option it didn't apply or applied another way while the art reaches the file as it looks, or something an option turns off). The replies of the save and export commands list the losses first, each kind in the order given, across every file an export writes. The status message after a save or an export then names a loss when there is one: an export to lossy WebP of type in a font that isn't installed names the fallback-font note instead of the lossy WebP note. A print to a file and the print preview list theirs the same way: art outside the imageable area, type in a fallback font and transparency flattened for PostScript come before notes such as a fixed flatness that isn't written or copies per sheet that don't fit. Scores and estimates are unchanged. - **Canvas review follow-up:** Cached canvas dimensions match the renderer limit before cache-key creation, view construction and worker submission. Controlled-worker regression checks oversized width and height, high DPI and the render transform without allocating oversized images. Scores and estimates are unchanged.