From 5cccbd6ba5e0d273daa5ef6ec74d9f97baa8c97e Mon Sep 17 00:00:00 2001 From: cyfung1031 <44498510+cyfung1031@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:31:50 +0900 Subject: [PATCH] M7: report unsupported link actions without a JavaScript claim (#1242) Co-authored-by: Brandon Thomas --- ATTRIBUTION.toml | 40 +++++++++++++------------- crates/ui-egui/src/canvas.rs | 2 +- crates/ui-egui/src/i18n/ar.tsv | 2 +- crates/ui-egui/src/i18n/bg.tsv | 2 +- crates/ui-egui/src/i18n/cs.tsv | 2 +- crates/ui-egui/src/i18n/de.tsv | 2 +- crates/ui-egui/src/i18n/el.tsv | 2 +- crates/ui-egui/src/i18n/es.tsv | 2 +- crates/ui-egui/src/i18n/fr.tsv | 2 +- crates/ui-egui/src/i18n/hu.tsv | 2 +- crates/ui-egui/src/i18n/it.tsv | 2 +- crates/ui-egui/src/i18n/ja.tsv | 2 +- crates/ui-egui/src/i18n/kk.tsv | 2 +- crates/ui-egui/src/i18n/pl.tsv | 2 +- crates/ui-egui/src/i18n/pt-br.tsv | 2 +- crates/ui-egui/src/i18n/ru.tsv | 2 +- crates/ui-egui/src/i18n/sl.tsv | 2 +- crates/ui-egui/src/i18n/te.tsv | 2 +- crates/ui-egui/src/i18n/tr.tsv | 2 +- crates/ui-egui/src/i18n/uk.tsv | 2 +- crates/ui-egui/src/i18n/zh-hans.tsv | 2 +- crates/ui-egui/src/i18n/zh-hant.tsv | 2 +- crates/ui-egui/tests/document_links.rs | 30 +++++++++++++++++-- 23 files changed, 68 insertions(+), 44 deletions(-) diff --git a/ATTRIBUTION.toml b/ATTRIBUTION.toml index 544c6da50..3e9c6df00 100644 --- a/ATTRIBUTION.toml +++ b/ATTRIBUTION.toml @@ -7,7 +7,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Greek UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "af63461265989c9ec1372693a7b69eb654bc7bf27d48cb2e6110f0b28b99d08e" +sha256 = "b97302bc4c8088eba7f2584cf60c88375e5955ad18394e61795c332537ee9390" # ATTRIBUTION.toml: one entry per asset (AGENTS.md §1). The source of truth for provenance and licences. # ATTRIBUTION.md is generated from this file: `cargo xtask assets --write`. Checked by `cargo xtask assets` (part of `xtask ci`). @@ -30,7 +30,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Simplified Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "afb80c70ebc3283e37430fb70e8f38e79cf6cde5dc1f9c15f33b2e60888541dc" +sha256 = "da6455ddbec0394c8b6661c2762cab87a0a5df3d6aaa879b4f66b3817f242cb8" [[asset]] path = "crates/ui-egui/src/i18n/zh-hant.tsv" @@ -41,7 +41,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Traditional Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "38597523f35334a0d859e35d4d100a3681330b4d8344343e6bc4f20e5e7b31f3" +sha256 = "09db938e6a0a63bb9ecda5fafed65c1bb753112b8af361b99527643492682078" [[asset]] path = "crates/ui-egui/src/i18n/cs.tsv" @@ -52,7 +52,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Czech UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "9a0341426c2cade8e972a0b1ab8c8fdaecf4855e23fdbebf3085f46c7671ee53" +sha256 = "7e28ad71f83126d57386ee95882fec5c64e936f0771aeee9f9e4abf6c8f28f67" [[asset]] path = "crates/ui-egui/src/i18n/pt-br.tsv" @@ -63,7 +63,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Brazilian Portuguese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "200a9a98b5768ad6ca902ed8216ad1bc7726ea31c5eabafb0b3093b0065c8d3c" +sha256 = "bbcc59d6ef51c2fef0e3f83f6f5f0d0babe5ff348548e0790a3540b4506e732b" [[asset]] path = "crates/ui-egui/src/i18n/es.tsv" @@ -74,7 +74,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Spanish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "5e7b00f52143013d994c237ede8e0103f077680793875877aed3450318f5d33f" +sha256 = "27290455fc9aacfe708dbf0888e3d65f2500b6fafba8bbb7e287f6e07c13d17c" [[asset]] path = "crates/ui-egui/src/i18n/fr.tsv" @@ -85,7 +85,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "French UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "90bbf75d0531a72691bed36064ca76d74171349459933ea98b408b66b0e4b82b" +sha256 = "b11701fa33d091f31f2d1ce1b7cf9ae0801905da0e26becae779e10e9436224c" [[asset]] path = "crates/ui-egui/src/i18n/de.tsv" @@ -96,7 +96,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "German UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "78167dfeda59c04b37506677888070e3232ea03bac1d5f9e1758d138bf5d1c4b" +sha256 = "91230f34859577be8709597a4945e621087958b20c1f1db3cd6e77eb80721206" [[asset]] path = "crates/ui-egui/src/i18n/te.tsv" @@ -107,7 +107,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Telugu UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "9291b3d848744e956a3b4bba2ac8f861215bd79da786ab6df70e3d1c11cd27fc" +sha256 = "095dd072669b1b4b4752de65b1ab225b479980696c3a7ed30d4ea9bc1716b505" [[asset]] path = "crates/ui-egui/src/i18n/it.tsv" @@ -118,7 +118,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Italian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "c180bc5e82eed9d1659756e90b82d9cf21541f0e5d353043e5aa7995a77cee14" +sha256 = "46e4ac6005b3df5c1cd2b6d14601513825fae478fb6b4a8fbd12fcced0d17f62" [[asset]] path = "crates/ui-egui/src/i18n/pl.tsv" @@ -129,7 +129,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Polish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "a6e48cd058650a8579d030b250d078e5f20b8769bebe0d063bd70367f1958f9f" +sha256 = "e08117f26be8dea744bd073054d111afdda37c016eb8e35ef2a1e969bf5e73ec" [[asset]] path = "crates/ui-egui/src/i18n/ru.tsv" @@ -140,7 +140,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Russian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "691bb26d2243788a1ad174a564afb0802b923a74139b8b282ee101380e572a34" +sha256 = "9c40091a92f5449ece985bf601bf614dde98073e356dbfce163531318fd0938e" [[asset]] path = "crates/ui-egui/src/i18n/hu.tsv" @@ -151,7 +151,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Hungarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "2e5aab0e55a9ce8cdaead8a474aba9a2dda60d619c4b8612634ee3db2d8788d2" +sha256 = "86298f3a6e2da3c1beb58f3eb4af33bf220cb0b6f68f3324297fa50b7e50baeb" [[asset]] path = "crates/ui-egui/src/i18n/bg.tsv" @@ -162,7 +162,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Bulgarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "24e3c057eb25624b397fdcda5bca8d4e505b1edc660d6d18f6e7cf87a55097bd" +sha256 = "d63e207517a18b6088455175801d79dd74b9fe8c34a9f23cbd51aa68a37af130" [[asset]] path = "crates/ui-egui/src/i18n/kk.tsv" @@ -173,7 +173,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Kazakh UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "0a4e6e85e4879e5fec6fbc08ac2f3ff0c70350ae9002fad1cfac0305fccb9fdb" +sha256 = "02cc19031eac7d49909defed801c01d40b6b9c947c387c773376fea324ca7903" [[asset]] path = "crates/ui-egui/src/i18n/ja.tsv" @@ -184,7 +184,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Japanese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "76b83c9c58e28b5ea03a4564bcf993c8590a8c3400671206fd3af8c1e5b92f65" +sha256 = "4bbc430569b27117b053a4655c518daeb83f462c8dec250647aafe01d849129f" [[asset]] path = "crates/ui-egui/src/i18n/uk.tsv" @@ -195,7 +195,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Ukrainian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "ea2401d850a463d03beb5cce9628fd49ad64ec82dc676bca3114748fe15b9e59" +sha256 = "586df1a1d4fc5d670fdc1796509904a6f0fe4820bc0f02c860a8d89e088e6b0b" [[asset]] path = "crates/ui-egui/src/i18n/ar.tsv" @@ -206,7 +206,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Arabic UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "7db3c7688833bf001603904d98fda2eabc1c3af7a535c8ac52038c3b5deaa3a3" +sha256 = "88a2db042818aa78cbd2f0734ee59321cdf4015bfae50b1344501229656c9cc7" [[asset]] path = "crates/ui-egui/src/i18n/tr.tsv" @@ -217,7 +217,7 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Turkish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "65ca67b2281a261285aed4e143c9cc5a06b14d8dc4a001acb88e8d067d61d9f3" +sha256 = "80263c1d792c894c3d90c2158df47a8a7fdddcee1c2041b30d2ff242380d8880" [[asset]] path = "assets/icons/accessibility.svg" @@ -3339,4 +3339,4 @@ licence = "MIT OR Apache-2.0" licence_file = "LICENSE-MIT" kind = "translation" usage = "Slovene UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs" -sha256 = "74cf01a92ad951fc6cf85cacfdca5f0723c166971a03edd1b677ae0cfd109e99" +sha256 = "358032976389361b8ec1f63a54f5a2b2f85abffea9c2e1cca046a12d3e853ecc" diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index d73519177..9448ad67f 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -3184,7 +3184,7 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) { Some(LinkTarget::Page(p, dest)) => view.go_to_dest(p, dest, info), Some(LinkTarget::Uri(u)) => app.request_document_url(&u, crate::LinkOrigin::Link), Some(LinkTarget::SetLayers { changes, preserve_rb }) => set_layers(app, index, &changes, preserve_rb), - Some(LinkTarget::Other(s)) => app.notify_fmt("{s} actions run in the JavaScript engine (M6)", &[("s", &s)]), + Some(LinkTarget::Other(s)) => app.notify_fmt("This PDF uses the unsupported {s} action.", &[("s", &s)]), None => {} } if tool == QuickTool::Crop && cropped { diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsv index f27739202..1ab86bce4 100644 --- a/crates/ui-egui/src/i18n/ar.tsv +++ b/crates/ui-egui/src/i18n/ar.tsv @@ -1537,7 +1537,7 @@ Couldn't optimize the file: {e} تعذّر تحسين الملف: {e} Couldn't write {path}: {e} تعذّرت الكتابة في {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. النموذج يطلب إرساله إلى {u}؛ PdfCraft لا يرسل بيانات النماذج. احفظ المستند للاحتفاظ بما أدخلته. - {s} actions run in the JavaScript engine (M6) إجراءات {s} تعمل في محرك JavaScript (M6) + This PDF uses the unsupported {s} action. يستخدم هذا الملف إجراء {s} غير مدعوم. {name}: the {other} action isn't supported yet {name}: الإجراء {other} غير مدعوم بعد {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} يرسل النموذج إلى {url}؛ PdfCraft لا يرسل بيانات النماذج. احفظ المستند للاحتفاظ بما أدخلته. Export stopped: {e} توقف التصدير: {e} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 9de66b3c0..dabbb764e 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -1489,7 +1489,7 @@ Couldn't optimize the file: {e} Файлът не можа да бъде оптимизиран: {e} Couldn't write {path}: {e} Не можа да се запише {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Формулярът изисква да бъде изпратен до {u}; PdfCraft не изпраща данни от формуляри. Запишете документа, за да запазите въведеното. - {s} actions run in the JavaScript engine (M6) Действията {s} се изпълняват в JavaScript машината (M6) + This PDF uses the unsupported {s} action. Този PDF използва неподдържаното действие {s}. {name}: the {other} action isn't supported yet {name}: действието {other} все още не се поддържа {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} изпраща формуляра до {url}; PdfCraft не изпраща данни от формуляри. Запишете документа, за да запазите въведеното. Export stopped: {e} Експортирането е спряно: {e} diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 54ff8f20c..8fad884b1 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1603,7 +1603,7 @@ key Space Mezerník Couldn't optimize the file: {e} Soubor nelze optimalizovat: {e} Couldn't write {path}: {e} Nelze zapsat {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Formulář žádá o odeslání na {u}; PdfCraft data formulářů neodesílá. Své údaje zachováte uložením dokumentu. - {s} actions run in the JavaScript engine (M6) Akce {s} se spouštějí v JavaScriptovém stroji (M6) + This PDF uses the unsupported {s} action. Tento PDF používá nepodporovanou akci {s}. {name}: the {other} action isn't supported yet {name}: akce {other} zatím není podporována {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} odesílá formulář na {url}; PdfCraft data formulářů neodesílá. Své údaje zachováte uložením dokumentu. Export stopped: {e} Export byl zastaven: {e} diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index c514ded26..3099069da 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1522,7 +1522,7 @@ Couldn't optimize the file: {e} Die Datei konnte nicht optimiert werden: {e} Couldn't write {path}: {e} {path} konnte nicht geschrieben werden: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Das Formular soll an {u} gesendet werden; PdfCraft sendet keine Formulardaten. Speichere das Dokument, um deine Eingaben zu behalten. - {s} actions run in the JavaScript engine (M6) {s}-Aktionen laufen in der JavaScript-Engine (M6) + This PDF uses the unsupported {s} action. Dieses PDF verwendet die nicht unterstützte Aktion {s}. {name}: the {other} action isn't supported yet {name}: Die Aktion {other} wird noch nicht unterstützt {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} sendet das Formular an {url}; PdfCraft sendet keine Formulardaten. Speichere das Dokument, um deine Eingaben zu behalten. Export stopped: {e} Export abgebrochen: {e} diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 022c57770..93c41e810 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1063,7 +1063,7 @@ Couldn't optimize the file: {e} Δεν ήταν δυνατή η βελτιστοποίηση του αρχείου: {e} Couldn't write {path}: {e} Δεν ήταν δυνατή η εγγραφή στο {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Η φόρμα ζητά υποβολή στο {u}, αλλά το PdfCraft δεν αποστέλλει δεδομένα φόρμας. Αποθηκεύστε το έγγραφο για να διατηρήσετε τις καταχωρίσεις σας. - {s} actions run in the JavaScript engine (M6) {s} ενέργειες εκτελούνται στη μηχανή JavaScript (M6) + This PDF uses the unsupported {s} action. Αυτό το PDF χρησιμοποιεί τη μη υποστηριζόμενη ενέργεια {s}. {name}: the {other} action isn't supported yet {name}: η ενέργεια {other} δεν υποστηρίζεται ακόμη {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. Το {name} υποβάλλει τη φόρμα στο {url}, αλλά το PdfCraft δεν αποστέλλει δεδομένα φόρμας. Αποθηκεύστε το έγγραφο για να διατηρήσετε τις καταχωρίσεις σας. Export stopped: {e} Η εξαγωγή διακόπηκε: {e} diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 2fb3e21bf..fa349f776 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1533,7 +1533,7 @@ Couldn't optimize the file: {e} No se pudo optimizar el archivo: {e} Couldn't write {path}: {e} No se pudo escribir {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. El formulario pide enviarse a {u}; PdfCraft no envía datos de formulario. Guarda el documento para conservar lo que has introducido. - {s} actions run in the JavaScript engine (M6) Las acciones {s} se ejecutan en el motor de JavaScript (M6) + This PDF uses the unsupported {s} action. Este PDF usa una acción {s} no compatible. {name}: the {other} action isn't supported yet {name}: la acción {other} aún no es compatible {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} envía el formulario a {url}; PdfCraft no envía datos de formulario. Guarda el documento para conservar lo que has introducido. Export stopped: {e} Exportación detenida: {e} diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 400ec711c..c008269f0 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1517,7 +1517,7 @@ Couldn't optimize the file: {e} Impossible d'optimiser le fichier : {e} Couldn't write {path}: {e} Impossible d'écrire {path} : {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Le formulaire demande un envoi vers {u} ; PdfCraft n'envoie pas les données de formulaire. Enregistrez le document pour conserver vos saisies. - {s} actions run in the JavaScript engine (M6) Les actions {s} s'exécutent dans le moteur JavaScript (M6) + This PDF uses the unsupported {s} action. Ce PDF utilise une action {s} non prise en charge. {name}: the {other} action isn't supported yet {name} : l'action {other} n'est pas encore prise en charge {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} envoie le formulaire vers {url} ; PdfCraft n'envoie pas les données de formulaire. Enregistrez le document pour conserver vos saisies. Export stopped: {e} Exportation interrompue : {e} diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 010e40931..e9ef2cc3a 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -1507,7 +1507,7 @@ Couldn't optimize the file: {e} A fájlt nem sikerült optimalizálni: {e} Couldn't write {path}: {e} Nem sikerült írni ide: {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Az űrlap ide kéri a beküldést: {u}; a PdfCraft nem küld űrlapadatot. Mentsd a dokumentumot, hogy megmaradjanak a beírásaid. - {s} actions run in the JavaScript engine (M6) {s} műveletek a JavaScript-motorban futnak (M6) + This PDF uses the unsupported {s} action. Ez a PDF nem támogatott {s} műveletet használ. {name}: the {other} action isn't supported yet {name}: ez a művelet még nem támogatott ({other}) {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} ide küldi az űrlapot: {url}; a PdfCraft nem küld űrlapadatot. Mentsd a dokumentumot, hogy megmaradjanak a beírásaid. Export stopped: {e} Az exportálás leállt: {e} diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 863e3f6c0..732ddefb7 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -1533,7 +1533,7 @@ Couldn't optimize the file: {e} Impossibile ottimizzare il file: {e} Couldn't write {path}: {e} Impossibile scrivere {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Il modulo chiede di essere inviato a {u}; PdfCraft non invia dati dei moduli. Salva il documento per conservare i dati inseriti. - {s} actions run in the JavaScript engine (M6) Le azioni {s} vengono eseguite nel motore JavaScript (M6) + This PDF uses the unsupported {s} action. Questo PDF usa l'azione {s} non supportata. {name}: the {other} action isn't supported yet {name}: l'azione {other} non è ancora supportata {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} invia il modulo a {url}; PdfCraft non invia dati dei moduli. Salva il documento per conservare i dati inseriti. Export stopped: {e} Esportazione interrotta: {e} diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 5527e8cde..1bc282424 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1538,7 +1538,7 @@ Couldn't optimize the file: {e} ファイルを最適化できませんでした: {e} Couldn't write {path}: {e} {path} に書き込めませんでした: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. フォームは {u} への送信を要求していますが、PdfCraft はフォームデータを送信しません。入力内容を保持するには文書を保存してください。 - {s} actions run in the JavaScript engine (M6) {s} 件のアクションは JavaScript エンジンで実行します(M6) + This PDF uses the unsupported {s} action. この PDF では未対応の {s} アクションが使われています。 {name}: the {other} action isn't supported yet {name}: {other} アクションにはまだ対応していません {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} はフォームを {url} に送信しますが、PdfCraft はフォームデータを送信しません。入力内容を保持するには文書を保存してください。 Export stopped: {e} 書き出しを中止しました: {e} diff --git a/crates/ui-egui/src/i18n/kk.tsv b/crates/ui-egui/src/i18n/kk.tsv index 16d4aec1b..411804dad 100644 --- a/crates/ui-egui/src/i18n/kk.tsv +++ b/crates/ui-egui/src/i18n/kk.tsv @@ -1476,7 +1476,7 @@ Couldn't optimize the file: {e} Файлды оңтайландыру мүмкін болмады: {e} Couldn't write {path}: {e} {path} жолына жазу мүмкін болмады: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Форма {u} адресіне жіберілуді сұрайды; PdfCraft форма деректерін жібермейді. Енгізген деректеріңізді сақтап қалу үшін құжатты сақтаңыз. - {s} actions run in the JavaScript engine (M6) {s} әрекет JavaScript қозғалтқышында орындалады (M6) + This PDF uses the unsupported {s} action. Бұл PDF қолдау көрсетілмейтін {s} әрекетін пайдаланады. {name}: the {other} action isn't supported yet {name}: {other} әрекеті әлі қолдау көрсетілмейді {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} форманы {url} адресіне жібереді; PdfCraft форма деректерін жібермейді. Енгізген деректеріңізді сақтап қалу үшін құжатты сақтаңыз. Export stopped: {e} Экспорт тоқтатылды: {e} diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 4a7254d7c..d11fe6a9d 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1520,7 +1520,7 @@ Couldn't optimize the file: {e} Nie można zoptymalizować pliku: {e} Couldn't write {path}: {e} Nie można zapisać {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Formularz wymaga wysłania do {u}; PdfCraft nie wysyła danych formularza. Zapisz dokument, aby zachować wpisane dane. - {s} actions run in the JavaScript engine (M6) Liczba akcji wykonywanych w silniku JavaScript (M6): {s} + This PDF uses the unsupported {s} action. Ten PDF używa nieobsługiwanej akcji {s}. {name}: the {other} action isn't supported yet {name}: akcja {other} nie jest jeszcze obsługiwana {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} wysyła formularz do {url}; PdfCraft nie wysyła danych formularza. Zapisz dokument, aby zachować wpisane dane. Export stopped: {e} Eksport zatrzymany: {e} diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 416fd5676..f5a520307 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -1432,7 +1432,7 @@ Couldn't optimize the file: {e} Não foi possível otimizar o arquivo: {e} Couldn't write {path}: {e} Não foi possível gravar {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. O formulário solicita envio para {u}; o PdfCraft não envia dados de formulário. Salve o documento para manter suas entradas. - {s} actions run in the JavaScript engine (M6) As ações {s} são executadas no mecanismo JavaScript (M6) + This PDF uses the unsupported {s} action. Este PDF usa a ação {s} não compatível. {name}: the {other} action isn't supported yet {name}: a ação {other} ainda não é suportada {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} envia o formulário para {url}; o PdfCraft não envia dados de formulário. Salve o documento para manter suas entradas. Export stopped: {e} Exportação interrompida: {e} diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 7a258f191..c023393b5 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -1538,7 +1538,7 @@ Couldn't optimize the file: {e} Не удалось оптимизировать файл: {e} Couldn't write {path}: {e} Не удалось записать {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Форма просит отправить данные на {u}; PdfCraft не отправляет данные форм. Сохраните документ, чтобы сохранить введённые данные. - {s} actions run in the JavaScript engine (M6) {s} действий выполняется в движке JavaScript (M6) + This PDF uses the unsupported {s} action. В этом PDF используется неподдерживаемое действие {s}. {name}: the {other} action isn't supported yet {name}: действие {other} пока не поддерживается {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} отправляет форму на {url}; PdfCraft не отправляет данные форм. Сохраните документ, чтобы сохранить введённые данные. Export stopped: {e} Экспорт остановлен: {e} diff --git a/crates/ui-egui/src/i18n/sl.tsv b/crates/ui-egui/src/i18n/sl.tsv index 95a9ee140..cf694de62 100644 --- a/crates/ui-egui/src/i18n/sl.tsv +++ b/crates/ui-egui/src/i18n/sl.tsv @@ -2072,7 +2072,7 @@ {n} {kind} {kind}: {n} {rule} - {status} {rule} - {status} {s} action Dejanj: {s} - {s} actions run in the JavaScript engine (M6) Dejanja ({s}) se izvajajo v pogonu JavaScript (M6) + This PDF uses the unsupported {s} action. Ta PDF uporablja nepodprto dejanje {s}. {verb} Background Ozadje: {verb} {verb} Header and Footer Glava in noga: {verb} {verb} Watermark Vodni žig: {verb} diff --git a/crates/ui-egui/src/i18n/te.tsv b/crates/ui-egui/src/i18n/te.tsv index 887a043a1..ff6c75da9 100644 --- a/crates/ui-egui/src/i18n/te.tsv +++ b/crates/ui-egui/src/i18n/te.tsv @@ -1509,7 +1509,7 @@ action wizard Start ప్రారంభించు Couldn't optimize the file: {e} ఫైల్‌ను ఆప్టిమైజ్ చేయడం సాధ్యం కాలేదు: {e} Couldn't write {path}: {e} {path}ను రాయడం సాధ్యం కాలేదు: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. ఈ ఫారం {u}కు సమర్పించమని అడుగుతోంది; PdfCraft ఫారం డేటాను పంపదు. మీరు నింపిన వివరాలను ఉంచుకోవడానికి పత్రాన్ని సేవ్ చేయండి. - {s} actions run in the JavaScript engine (M6) {s} చర్యలు JavaScript ఇంజిన్‌లో అమలవుతాయి (M6) + This PDF uses the unsupported {s} action. ఈ PDF మద్దతు లేని {s} చర్యను ఉపయోగిస్తోంది. {name}: the {other} action isn't supported yet {name}: {other} చర్యకు ఇంకా మద్దతు లేదు {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} ఫారాన్ని {url}కు సమర్పిస్తుంది; PdfCraft ఫారం డేటాను పంపదు. మీరు నింపిన వివరాలను ఉంచుకోవడానికి పత్రాన్ని సేవ్ చేయండి. Export stopped: {e} ఎగుమతి ఆగిపోయింది: {e} diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 06bfa0596..410b5c2a0 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1492,7 +1492,7 @@ Couldn't optimize the file: {e} Dosya en iyileştirilemedi: {e} Couldn't write {path}: {e} {path} yazılamadı: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Form {u} adresine gönderilmek isteniyor; PdfCraft form verilerini göndermez. Girdilerinizi korumak için belgeyi kaydedin. - {s} actions run in the JavaScript engine (M6) {s} eylemleri JavaScript motorunda çalışır (M6) + This PDF uses the unsupported {s} action. Bu PDF desteklenmeyen {s} eylemini kullanıyor. {name}: the {other} action isn't supported yet {name}: {other} eylemi henüz desteklenmiyor {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} formu {url} adresine gönderiyor; PdfCraft form verilerini göndermez. Girdilerinizi korumak için belgeyi kaydedin. Export stopped: {e} Dışa aktarma durduruldu: {e} diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 8632c9dc6..0815a89df 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -1535,7 +1535,7 @@ Couldn't optimize the file: {e} Не вдалося оптимізувати файл: {e} Couldn't write {path}: {e} Не вдалося записати {path}: {e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. Форма запитує надсилання до {u}; PdfCraft не надсилає дані форми. Збережіть документ, щоб зберегти введені дані. - {s} actions run in the JavaScript engine (M6) Дії ({s}) виконуються в рушії JavaScript (M6) + This PDF uses the unsupported {s} action. У цьому PDF використовується непідтримувана дія {s}. {name}: the {other} action isn't supported yet {name}: дія {other} ще не підтримується {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} надсилає форму до {url}; PdfCraft не надсилає дані форми. Збережіть документ, щоб зберегти введені дані. Export stopped: {e} Експорт зупинено: {e} diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 9c1086100..195720ea0 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -1496,7 +1496,7 @@ Couldn't optimize the file: {e} 无法优化文件:{e} Couldn't write {path}: {e} 无法写入{path}:{e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. 该表单请求提交到{u};PdfCraft 不发送表单数据。请保存文档以保留填写内容。 - {s} actions run in the JavaScript engine (M6) {s} 动作在 JavaScript 引擎中运行 (M6) + This PDF uses the unsupported {s} action. 此 PDF 使用了不支持的 {s} 操作。 {name}: the {other} action isn't supported yet {name}:{other} 动作暂不受支持 {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} 将表单提交到{url};PdfCraft 不发送表单数据。请保存文档以保留填写内容。 Export stopped: {e} 导出中止:{e} diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 934ec48c4..ed34a8817 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -1441,7 +1441,7 @@ Couldn't optimize the file: {e} 無法最佳化檔案:{e} Couldn't write {path}: {e} 無法寫入{path}:{e} The form asks to be submitted to {u}; PdfCraft doesn't send form data. Save the document to keep your entries. 該表單請求提交到{u};PdfCraft 不傳送表單資料。請儲存文件以保留填寫內容。 - {s} actions run in the JavaScript engine (M6) {s} 動作在 JavaScript 引擎中執行 (M6) + This PDF uses the unsupported {s} action. 此 PDF 使用了不支援的 {s} 動作。 {name}: the {other} action isn't supported yet {name}:{other} 動作暫不受支援 {name} submits the form to {url}; PdfCraft doesn't send form data. Save the document to keep your entries. {name} 將表單提交到{url};PdfCraft 不傳送表單資料。請儲存文件以保留填寫內容。 Export stopped: {e} 匯出中止:{e} diff --git a/crates/ui-egui/tests/document_links.rs b/crates/ui-egui/tests/document_links.rs index 1951d24fc..a5b166480 100644 --- a/crates/ui-egui/tests/document_links.rs +++ b/crates/ui-egui/tests/document_links.rs @@ -21,11 +21,18 @@ fn fixture() -> Vec { let objs = [ "<< /Type /Catalog /Pages 2 0 R /AcroForm << /Fields [5 0 R 6 0 R] /DA (/Helv 0 Tf 0 g) >> >>".to_string(), "<< /Type /Pages /Kids [3 0 R] /Count 1 /MediaBox [0 0 300 400] >>".to_string(), - "<< /Type /Page /Parent 2 0 R /Annots [4 0 R 5 0 R 6 0 R] >>".to_string(), + "<< /Type /Page /Parent 2 0 R /Annots [4 0 R 5 0 R 6 0 R 7 0 R 8 0 R] >>".to_string(), format!("<< /Type /Annot /Subtype /Link /Rect [50 300 250 350] /Border [0 0 0] /A << /S /URI /URI ({LINK_URL}) >> >>"), format!("<< /Type /Annot /Subtype /Widget /FT /Btn /Ff 65536 /T (web) /Rect [20 200 100 220] /P 3 0 R /A << /S /URI /URI ({BUTTON_URL}) >> >>"), "<< /Type /Annot /Subtype /Widget /FT /Btn /Ff 65536 /T (sneaky) /Rect [120 200 200 220] /P 3 0 R /AA << /U << /S /JavaScript /JS (app.launchURL\\(\"file:///C:/Windows/System32/calc.exe\", true\\);) >> >> >>".to_string(), ]; + let objs = objs + .into_iter() + .chain([ + "<< /Type /Annot /Subtype /Link /Rect [50 250 250 280] /A << /S /GoToR /F (target.pdf) /D [0 /Fit] >> >>".to_string(), + "<< /Type /Annot /Subtype /Link /Rect [50 220 250 240] /A << /S /Launch /F (program) >> >>".to_string(), + ]) + .collect::>(); let mut out = b"%PDF-1.7\n".to_vec(); let mut offs = Vec::new(); for (i, o) in objs.iter().enumerate() { @@ -64,12 +71,16 @@ fn click_at(h: &mut Harness<'static, PdfCraftApp>, at: egui::Pos2) { } /// Click the link on page 1, at the middle of its rectangle. -fn click_link(h: &mut Harness<'static, PdfCraftApp>) { +fn click_link_at(h: &mut Harness<'static, PdfCraftApp>, y: f32) { let r = h.state().views[0].page_screen_rect(0).expect("page 1 on screen"); - let at = egui::pos2(r.min.x + r.width() * (150.0 / 300.0), r.min.y + r.height() * (1.0 - 325.0 / 400.0)); + let at = egui::pos2(r.min.x + r.width() * (150.0 / 300.0), r.min.y + r.height() * (1.0 - y / 400.0)); click_at(h, at); } +fn click_link(h: &mut Harness<'static, PdfCraftApp>) { + click_link_at(h, 325.0); +} + fn click_field(h: &mut Harness<'static, PdfCraftApp>, name: &str) { let at = { let s = h.state(); @@ -98,6 +109,19 @@ fn a_link_asks_first_and_opens_when_allowed() { assert_eq!(h.state().pending_link, None); } +#[test] +fn unsupported_launch_action_is_reported_without_claiming_javascript() { + let _gpu = gpu(); + let mut h = harness(); + click_link_at(&mut h, 230.0); + assert_eq!(h.state().pending_link, None); + assert_eq!(h.state().last_opened_url, None); + assert_eq!(h.state().views.len(), 1); + assert_eq!(h.state().views[0].current, 0); + let toast = h.state().toast.clone().expect("the unsupported action is reported").0; + assert_eq!(toast, "This PDF uses the unsupported Launch action."); +} + #[test] fn cancel_opens_nothing() { let _gpu = gpu();