diff --git a/crates/engine/src/script/dom/preferences.rs b/crates/engine/src/script/dom/preferences.rs index 064f4fa39d..e1c25e387e 100644 --- a/crates/engine/src/script/dom/preferences.rs +++ b/crates/engine/src/script/dom/preferences.rs @@ -90,7 +90,9 @@ fn key_of(a: &[Data]) -> std::result::Result<&str, HostError> { } let Data::String(key) = arg(a, 1) else { return Err(HostError::Type("a preference's key must be a string".into())) }; if key.is_empty() || key.encode_utf16().count() > MAX_KEY_UNITS { - return Err(HostError::Range(format!("a preference's key must have 1 to {MAX_KEY_UNITS} characters"))); + return Err(HostError::Range(format!( + "a preference's key must have a length of 1 to {MAX_KEY_UNITS} (UTF-16 code units, as `length` counts)" + ))); } if key.chars().any(char::is_control) { return Err(HostError::Error("a preference's key cannot hold control characters".into())); diff --git a/crates/engine/src/tests/script_dom_prefs.rs b/crates/engine/src/tests/script_dom_prefs.rs index 548f0cee07..d8bb4dd77d 100644 --- a/crates/engine/src/tests/script_dom_prefs.rs +++ b/crates/engine/src/tests/script_dom_prefs.rs @@ -226,6 +226,8 @@ fn bad_arguments_throw_and_store_nothing() { ("app.preferences.getBooleanPreference();", "key must be a string"), ("app.preferences.setStringPreference('', 'v');", "1 to 256"), ("app.preferences.setStringPreference(new Array(258).join('k'), 'v');", "1 to 256"), + // 129 characters outside the Basic Multilingual Plane are 258 UTF-16 code units. + ("app.preferences.setStringPreference(new Array(130).join('\\uD83D\\uDE00'), 'v');", "1 to 256"), ("app.preferences.setStringPreference('a\\u0000b', 'v');", "control characters"), ("app.preferences.setStringPreference('k', new Array(65538).join('v'));", "at most 65536 bytes"), ("var f = app.preferences.getBooleanPreference; f.call({}, 'k');", "not a Preferences"), @@ -238,9 +240,11 @@ fn bad_arguments_throw_and_store_nothing() { } assert!(wrong.is_empty(), "{wrong:#?}"); assert!(s.prefs.script_preferences.is_empty()); - // A key of exactly 256 characters and a value of exactly the limit are taken. + // A key of exactly 256 code units and a value of exactly the limit are taken. log(&mut s, "app.preferences.setStringPreference(new Array(257).join('k'), new Array(65537).join('v'));"); assert_eq!(stored(&s, &"k".repeat(256)), Some(ScriptPreference::String("v".repeat(MAX_STRING_BYTES)))); + log(&mut s, "app.preferences.setStringPreference(new Array(129).join('\\uD83D\\uDE00'), 'v');"); + assert_eq!(stored(&s, &"\u{1F600}".repeat(128)), Some(ScriptPreference::String("v".into()))); } #[test] diff --git a/crates/engine/tests/it/script_host_vs_scriptcheck.rs b/crates/engine/tests/it/script_host_vs_scriptcheck.rs index d9b6b87103..df796262af 100644 --- a/crates/engine/tests/it/script_host_vs_scriptcheck.rs +++ b/crates/engine/tests/it/script_host_vs_scriptcheck.rs @@ -37,12 +37,19 @@ const OUTSIDE: &[(&str, &str, &str)] = &[ ("Folder.prototype.remove", "var d = new Folder(p); d.remove();", "filesWritten"), ("Folder.prototype.rename", "var d = new Folder(p); d.rename(q);", "filesWritten"), ("Folder.prototype.execute", "var d = new Folder(p); d.execute();", "filesOpened"), + ("Preferences.prototype.setBooleanPreference", "app.preferences.setBooleanPreference(k, true);", "preferences"), + ("Preferences.prototype.setIntegerPreference", "app.preferences.setIntegerPreference(k, 1);", "preferences"), + ("Preferences.prototype.setRealPreference", "app.preferences.setRealPreference(k, 0.5);", "preferences"), + ("Preferences.prototype.setStringPreference", "app.preferences.setStringPreference(k, s);", "preferences"), + ("Preferences.prototype.removePreference", "app.preferences.removePreference(k);", "preferences"), ]; /// The names the host adds that stay inside the document and the run, by the object that has them. /// Reading a file or a folder, a file dialog and a message to the person do not change anything /// outside it. The document model (`app`, its classes and the enumerations) acts on the open -/// documents; `Document.saveAs` and `close` throw "not available yet". +/// documents; `Document.saveAs` and `close` throw "not available yet". Reading a preference changes +/// nothing, and the matrix functions return new records. `app.copy` and `app.cut` fill VectorCraft's +/// clipboard, which the desktop app offers to other apps after the run as Edit › Copy does. const INSIDE: &[(&str, &str)] = &[ ("", "$ File Folder alert confirm localize prompt toSource"), ("Object.prototype.", "toSource"), @@ -75,14 +82,18 @@ const INSIDE: &[(&str, &str)] = &[ "", "app Application CoordinateSystem Document DocumentArtboardLayout DocumentColorSpace DocumentPreset DocumentPresetType \ DocumentPreviewMode DocumentRasterResolution DocumentTransparencyGrid Documents ElementPlacement Layer PageItem \ - PageItems RulerUnits ZOrderMethod", + PageItems Preferences RulerUnits ZOrderMethod", ), ("Application.", "prototype"), ( "Application.prototype.", - "activeDocument activeDocument= beep beep= constructor coordinateSystem coordinateSystem= documents getIsFileOpen \ - selection typename", + "activeDocument activeDocument= beep beep= concatenateMatrix concatenateRotationMatrix concatenateScaleMatrix \ + concatenateTranslationMatrix constructor coordinateSystem coordinateSystem= copy cut documents getIdentityMatrix \ + getIsFileOpen getRotationMatrix getScaleMatrix getTranslationMatrix invertMatrix isEqualMatrix isSingularMatrix paste \ + preferences selection typename", ), + ("Preferences.", "prototype"), + ("Preferences.prototype.", "constructor getBooleanPreference getIntegerPreference getRealPreference getStringPreference typename"), ("DocumentPreset.", "prototype"), ( "DocumentPreset.prototype.", diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index e4271f7926..88452d82bc 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6437,6 +6437,7 @@ digits Malayalam Malaiàlam @msg a drag or an undo group is open; finish it before running a script hi ha un arrossegament o un grup de desfer obert; acabeu-lo abans d'executar un script @msg the script left a document that cannot be kept l'script ha deixat un document que no es pot conservar @msg the script is no longer in the Scripts folder l'script ja no és a la carpeta Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? L'script demana desactivar l'avís que es mostra abans que s'executi un script triat amb Fitxer › Scripts › Un altre script… Els scripts triats després s'executarien sense l'avís. Voleu desactivar l'avís? Some scripts were not listed Alguns scripts no s'han llistat The Scripts folder cannot be read No es pot llegir la carpeta Scripts Loading scripts… S’estan carregant els scripts… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 488df173c3..d9f3c1fa55 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -5245,6 +5245,7 @@ imageTrace Outline Obrys @msg a drag or an undo group is open; finish it before running a script je otevřené tažení nebo skupina kroků zpět; před spuštěním skriptu ji dokončete @msg the script left a document that cannot be kept skript zanechal dokument, který nelze zachovat @msg the script is no longer in the Scripts folder skript už není ve složce Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Skript žádá o vypnutí upozornění, které se zobrazí před spuštěním skriptu vybraného příkazem Soubor › Skripty › Jiný skript… Později vybrané skripty by se pak spouštěly bez něj. Vypnout upozornění? Some scripts were not listed Některé skripty nebyly uvedeny The Scripts folder cannot be read Složku Scripts nelze přečíst Loading scripts… Načítání skriptů… diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 302ab6aa69..cd7f60bfcc 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -63,6 +63,7 @@ @msg a drag or an undo group is open; finish it before running a script en trækning eller en fortrydelsesgruppe er åben; afslut den, før du kører et script @msg the script left a document that cannot be kept scriptet efterlod et dokument, der ikke kan beholdes @msg the script is no longer in the Scripts folder scriptet ligger ikke længere i mappen Scripter +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Scriptet beder om at slå advarslen fra, som vises, før et script, der er valgt med Filer › Scripter › Andet script…, køres. Scripter, der vælges senere, ville så køre uden den. Vil du slå advarslen fra? @msg the script's run is no longer available scriptets kørsel er ikke længere tilgængelig @msg a failed command changed undo steps that could not be put back, so the script was stopped en mislykket kommando ændrede fortrydelsestrin, der ikke kunne genskabes, så scriptet blev stoppet @msg a recovery copy could not be written, so the script was not run en gendannelseskopi kunne ikke skrives, så scriptet blev ikke kørt diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 9482345f18..eed3f358c7 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -4830,6 +4830,7 @@ theme Appearance Erscheinungsbild @msg a drag or an undo group is open; finish it before running a script ein Ziehvorgang oder eine Rückgängig-Gruppe ist offen; schließen Sie sie ab, bevor Sie ein Skript ausführen @msg the script left a document that cannot be kept das Skript hat ein Dokument hinterlassen, das nicht behalten werden kann @msg the script is no longer in the Scripts folder das Skript befindet sich nicht mehr im Ordner „Scripts“ +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Das Skript möchte die Warnung ausschalten, die angezeigt wird, bevor ein mit „Datei › Skripte › Anderes Skript…“ gewähltes Skript ausgeführt wird. Später gewählte Skripte würden dann ohne sie ausgeführt. Warnung ausschalten? Some scripts were not listed Einige Skripte wurden nicht aufgeführt The Scripts folder cannot be read Der Ordner „Scripts“ kann nicht gelesen werden Loading scripts… Skripte werden geladen… diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 434d0cc0b8..cd7b98a516 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -2634,6 +2634,7 @@ axis Both Και τα δύο @msg a drag or an undo group is open; finish it before running a script είναι ανοιχτή μια μεταφορά ή ομάδα αναίρεσης· ολοκληρώστε την πριν εκτελέσετε σενάριο @msg the script left a document that cannot be kept το σενάριο άφησε ένα έγγραφο που δεν μπορεί να διατηρηθεί @msg the script is no longer in the Scripts folder το σενάριο δεν βρίσκεται πλέον στον φάκελο Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Το σενάριο ζητά να απενεργοποιηθεί η προειδοποίηση που εμφανίζεται πριν εκτελεστεί ένα σενάριο που επιλέχθηκε με Αρχείο › Δέσμες ενεργειών › Άλλο σενάριο… Τα σενάρια που θα επιλεγούν αργότερα θα εκτελούνται τότε χωρίς αυτήν. Να απενεργοποιηθεί η προειδοποίηση; Some scripts were not listed Ορισμένα σενάρια δεν εμφανίζονται στη λίστα The Scripts folder cannot be read Δεν είναι δυνατή η ανάγνωση του φακέλου Scripts Loading scripts… Φόρτωση σεναρίων… diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 3f83e928e4..a22748a73d 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -4909,6 +4909,7 @@ axis Both Ambos @msg a drag or an undo group is open; finish it before running a script hay un arrastre o un grupo de deshacer abierto; termínelo antes de ejecutar un script @msg the script left a document that cannot be kept el script dejó un documento que no se puede conservar @msg the script is no longer in the Scripts folder el script ya no está en la carpeta Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? El script pide desactivar la advertencia que se muestra antes de que se ejecute un script elegido con Archivo › Scripts › Otro script… Los scripts elegidos después se ejecutarían sin ella. ¿Desactivar la advertencia? Some scripts were not listed Algunos scripts no se han incluido en la lista The Scripts folder cannot be read No se puede leer la carpeta Scripts Loading scripts… Cargando scripts… diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index a4d85b23e8..e35bc338b3 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5150,6 +5150,7 @@ imageTrace Outline Ääriviiva @msg a drag or an undo group is open; finish it before running a script vetäminen tai kumousryhmä on kesken; viimeistele se ennen komentosarjan suorittamista @msg the script left a document that cannot be kept komentosarja jätti asiakirjan, jota ei voi säilyttää @msg the script is no longer in the Scripts folder komentosarja ei ole enää Scripts-kansiossa +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Komentosarja pyytää poistamaan käytöstä varoituksen, joka näytetään ennen kuin komennolla Tiedosto › Komentosarjat › Muu komentosarja… valittu komentosarja suoritetaan. Myöhemmin valitut komentosarjat suoritettaisiin silloin ilman sitä. Poistetaanko varoitus käytöstä? Some scripts were not listed Kaikkia komentosarjoja ei ole lueteltu The Scripts folder cannot be read Scripts-kansiota ei voi lukea Loading scripts… Ladataan komentosarjoja… diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 8f56486157..cf94949ece 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -4891,6 +4891,7 @@ axis Both Les deux @msg a drag or an undo group is open; finish it before running a script un glissement ou un groupe d’annulation est ouvert ; terminez-le avant d’exécuter un script @msg the script left a document that cannot be kept le script a laissé un document qui ne peut pas être conservé @msg the script is no longer in the Scripts folder le script ne se trouve plus dans le dossier Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Le script demande à désactiver l’avertissement affiché avant l’exécution d’un script choisi avec Fichier › Scripts › Autre script… Les scripts choisis ensuite s’exécuteraient alors sans lui. Désactiver l’avertissement ? Some scripts were not listed Certains scripts ne sont pas répertoriés The Scripts folder cannot be read Impossible de lire le dossier Scripts Loading scripts… Chargement des scripts… diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index e9509d9202..053d291e17 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -7583,6 +7583,7 @@ arrowhead Feather पंख @msg a drag or an undo group is open; finish it before running a script कोई ड्रैग या पूर्ववत समूह खुला है; स्क्रिप्ट चलाने से पहले उसे पूरा करें @msg the script left a document that cannot be kept स्क्रिप्ट ने ऐसा दस्तावेज़ छोड़ा है जिसे रखा नहीं जा सकता @msg the script is no longer in the Scripts folder स्क्रिप्ट अब Scripts फ़ोल्डर में नहीं है +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? स्क्रिप्ट उस चेतावनी को बंद करना चाहती है जो फ़ाइल › स्क्रिप्ट्स › अन्य स्क्रिप्ट… से चुनी गई स्क्रिप्ट चलने से पहले दिखाई जाती है। इसके बाद चुनी गई स्क्रिप्ट्स उसके बिना चलेंगी। चेतावनी बंद करें? Some scripts were not listed कुछ स्क्रिप्ट सूचीबद्ध नहीं की गईं The Scripts folder cannot be read Scripts फ़ोल्डर पढ़ा नहीं जा सकता Loading scripts… स्क्रिप्ट लोड हो रही हैं… diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 87f050ef0d..0253ef4aa3 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5762,6 +5762,7 @@ imageTrace Outline Körvonal @msg a drag or an undo group is open; finish it before running a script húzás vagy visszavonási csoport van folyamatban; fejezze be a parancsfájl futtatása előtt @msg the script left a document that cannot be kept a parancsfájl olyan dokumentumot hagyott hátra, amely nem tartható meg @msg the script is no longer in the Scripts folder a parancsfájl már nincs a Scripts mappában +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? A parancsfájl ki szeretné kapcsolni azt a figyelmeztetést, amely a Fájl › Szkriptek › Másik szkript… paranccsal kiválasztott parancsfájl futása előtt jelenik meg. A később kiválasztott parancsfájlok ezután nélküle futnának. Kikapcsolja a figyelmeztetést? Some scripts were not listed Néhány szkript nem szerepel a listában The Scripts folder cannot be read A Scripts mappa nem olvasható Loading scripts… Szkriptek betöltése… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 924d3d80b5..a5ef5115d8 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -63,6 +63,7 @@ @msg a drag or an undo group is open; finish it before running a script seretan atau grup urungkan sedang terbuka; selesaikan sebelum menjalankan skrip @msg the script left a document that cannot be kept skrip meninggalkan dokumen yang tidak dapat dipertahankan @msg the script is no longer in the Scripts folder skrip tidak lagi berada di folder Skrip +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Skrip meminta untuk mematikan peringatan yang ditampilkan sebelum skrip yang dipilih dengan Berkas › Skrip › Skrip lain… dijalankan. Skrip yang dipilih kemudian akan berjalan tanpa peringatan itu. Matikan peringatan? @msg the script's run is no longer available proses skrip tidak lagi tersedia @msg a failed command changed undo steps that could not be put back, so the script was stopped perintah yang gagal mengubah langkah urungkan yang tidak dapat dikembalikan, sehingga skrip dihentikan @msg a recovery copy could not be written, so the script was not run salinan pemulihan tidak dapat ditulis, sehingga skrip tidak dijalankan diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 5f47e3f117..c3404d2489 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -4968,6 +4968,7 @@ axis Both Entrambi @msg a drag or an undo group is open; finish it before running a script è aperto un trascinamento o un gruppo di annullamento; completalo prima di eseguire uno script @msg the script left a document that cannot be kept lo script ha lasciato un documento che non può essere conservato @msg the script is no longer in the Scripts folder lo script non è più nella cartella Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Lo script chiede di disattivare l'avviso mostrato prima che venga eseguito uno script scelto con File › Script › Altro script… Gli script scelti in seguito verrebbero quindi eseguiti senza avviso. Disattivare l'avviso? Some scripts were not listed Alcuni script non sono stati elencati The Scripts folder cannot be read Impossibile leggere la cartella Scripts Loading scripts… Caricamento degli script… diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 9a1b5f6354..713ec6687d 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5794,6 +5794,7 @@ variable-list-end {0}, {1} {0}、{1} @msg a drag or an undo group is open; finish it before running a script ドラッグまたは取り消しグループが開いています。スクリプトを実行する前に完了してください @msg the script left a document that cannot be kept スクリプトが保持できないドキュメントを残しました @msg the script is no longer in the Scripts folder スクリプトは Scripts フォルダーにもうありません +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? スクリプトが、ファイル › スクリプト › その他のスクリプト… で選んだスクリプトを実行する前に表示される警告をオフにしようとしています。オフにすると、以後に選んだスクリプトは警告なしで実行されます。警告をオフにしますか? Some scripts were not listed 一部のスクリプトは一覧に表示されていません The Scripts folder cannot be read Scripts フォルダーを読み込めません Loading scripts… スクリプトを読み込み中… diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 8eeacee621..ba497492da 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -8463,6 +8463,7 @@ imageTrace Outline კონტური @msg a drag or an undo group is open; finish it before running a script ღიაა გადათრევა ან გაუქმების ჯგუფი; დაასრულეთ სკრიპტის გაშვებამდე @msg the script left a document that cannot be kept სკრიპტმა დატოვა დოკუმენტი, რომლის შენახვა შეუძლებელია @msg the script is no longer in the Scripts folder სკრიპტი აღარ არის Scripts საქაღალდეში +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? სკრიპტი ითხოვს იმ გაფრთხილების გამორთვას, რომელიც ჩანს ბრძანებით ფაილი › სკრიპტები › სხვა სკრიპტი… არჩეული სკრიპტის გაშვებამდე. შემდეგ არჩეული სკრიპტები მის გარეშე გაეშვება. გამოირთოს გაფრთხილება? Some scripts were not listed ზოგიერთი სკრიპტი არ არის ჩამოთვლილი The Scripts folder cannot be read Scripts საქაღალდის წაკითხვა შეუძლებელია Loading scripts… სკრიპტების ჩატვირთვა… diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 57e0b8be10..d408d91cd9 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5723,6 +5723,7 @@ variable-list-end {0}, {1} {0} 및 {1} @msg a drag or an undo group is open; finish it before running a script 드래그 또는 실행 취소 그룹이 열려 있습니다. 스크립트를 실행하기 전에 완료하세요 @msg the script left a document that cannot be kept 스크립트가 유지할 수 없는 문서를 남겼습니다 @msg the script is no longer in the Scripts folder 스크립트가 더 이상 Scripts 폴더에 없습니다 +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? 스크립트가 파일 › 스크립트 › 다른 스크립트…로 선택한 스크립트를 실행하기 전에 표시되는 경고를 끄려고 합니다. 그러면 이후에 선택한 스크립트는 경고 없이 실행됩니다. 경고를 끌까요? Some scripts were not listed 일부 스크립트가 나열되지 않았습니다 The Scripts folder cannot be read Scripts 폴더를 읽을 수 없습니다 Loading scripts… 스크립트 불러오는 중… diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 5ed5cdc3e0..b048ba2e6b 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -63,6 +63,7 @@ @msg a drag or an undo group is open; finish it before running a script er is nog een sleepbeweging of een groep voor ongedaan maken open; rond die af voordat je een script uitvoert @msg the script left a document that cannot be kept het script heeft een document achtergelaten dat niet kan worden behouden @msg the script is no longer in the Scripts folder het script staat niet meer in de map Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Het script vraagt de waarschuwing uit te zetten die wordt getoond voordat een script wordt uitgevoerd dat is gekozen met Bestand › Scripts › Ander script… Scripts die later worden gekozen, worden dan zonder waarschuwing uitgevoerd. Waarschuwing uitzetten? @msg the script's run is no longer available de uitvoering van het script is niet meer beschikbaar @msg a failed command changed undo steps that could not be put back, so the script was stopped een mislukte opdracht heeft stappen voor ongedaan maken gewijzigd die niet konden worden teruggezet, dus is het script gestopt @msg a recovery copy could not be written, so the script was not run er kon geen herstelkopie worden geschreven, dus is het script niet uitgevoerd diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 74029133dc..3e6d6901df 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5073,6 +5073,7 @@ imageTrace Outline Kontur @msg a drag or an undo group is open; finish it before running a script otwarte jest przeciąganie lub grupa cofania; zakończ je przed uruchomieniem skryptu @msg the script left a document that cannot be kept skrypt pozostawił dokument, którego nie można zachować @msg the script is no longer in the Scripts folder skryptu nie ma już w folderze Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Skrypt prosi o wyłączenie ostrzeżenia wyświetlanego przed uruchomieniem skryptu wybranego poleceniem Plik › Skrypty › Inny skrypt… Skrypty wybrane później byłyby wtedy uruchamiane bez niego. Wyłączyć ostrzeżenie? Some scripts were not listed Niektóre skrypty nie zostały wyświetlone The Scripts folder cannot be read Nie można odczytać folderu Scripts Loading scripts… Wczytywanie skryptów… diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index a1747af0b2..9c58266b69 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -6112,6 +6112,7 @@ variable-list-end {0}, {1} {0} e {1} @msg a drag or an undo group is open; finish it before running a script há um arraste ou um grupo de desfazer aberto; conclua-o antes de executar um script @msg the script left a document that cannot be kept o script deixou um documento que não pode ser mantido @msg the script is no longer in the Scripts folder o script não está mais na pasta Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? O script pede para desativar o aviso mostrado antes de executar um script escolhido em Arquivo › Scripts › Outro Script… Os scripts escolhidos depois seriam executados sem ele. Desativar o aviso? Some scripts were not listed Alguns scripts não foram listados The Scripts folder cannot be read Não é possível ler a pasta Scripts Loading scripts… Carregando scripts… diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index ca0c8d5145..26be93af2d 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -2740,7 +2740,7 @@ file-filter Templates Шаблоны Other Layers Другие слои Other Libraries Другие библиотеки Other Library… Другая библиотека… - Other Script… Другая письменность… + Other Script… Другой скрипт… Out of Gamut Warning Предупреждение о выходе из цветового охвата Out of Web Color Warning Предупреждение о цвете, не поддерживаемом web Out Tangent Handles Маркеры исходящей касательной @@ -4944,6 +4944,7 @@ axis Both Оба @msg a drag or an undo group is open; finish it before running a script открыто перетаскивание или группа отмены; завершите их перед запуском скрипта @msg the script left a document that cannot be kept скрипт оставил документ, который нельзя сохранить @msg the script is no longer in the Scripts folder скрипт больше не находится в папке Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Скрипт просит отключить предупреждение, которое показывается перед запуском скрипта, выбранного командой Файл › Сценарии › Другой скрипт… Выбранные позже скрипты будут запускаться без него. Отключить предупреждение? Some scripts were not listed Некоторые сценарии не показаны The Scripts folder cannot be read Не удалось прочитать папку Scripts Loading scripts… Загрузка сценариев… diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index c26474cf93..539e4538df 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -4806,6 +4806,7 @@ axis Both Båda @msg a drag or an undo group is open; finish it before running a script en dragning eller ångragrupp är öppen; avsluta den innan du kör ett skript @msg the script left a document that cannot be kept skriptet lämnade ett dokument som inte kan behållas @msg the script is no longer in the Scripts folder skriptet finns inte längre i mappen Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Skriptet vill stänga av varningen som visas innan ett skript som valts med Fil › Skript › Annat skript… körs. Skript som väljs senare skulle då köras utan den. Stänga av varningen? Some scripts were not listed Vissa skript visas inte i listan The Scripts folder cannot be read Mappen Scripts kan inte läsas Loading scripts… Läser in skript… diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 2ca2c76e03..d0495d9cdb 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -717,6 +717,17 @@ fn compound_shape_no_area_warning_is_translated() { } } +/// The confirm a run shows before a script turns off the external script warning, which the message +/// scan doesn't read, is translated in each language of [`COMPLETE_MESSAGES`]. +#[test] +fn script_warning_off_question_is_translated() { + let question = vectorcraft_engine::script::dom::preferences::WARNING_OFF_QUESTION; + for code in COMPLETE_MESSAGES { + let lang = Lang::from_code(code).expect("registered"); + assert_ne!(message(lang, question), question, "{code}"); + } +} + /// The Save PDF dialog's Save Summary… button and `ui.pdfSummary.save`'s error when no such /// dialog is open. #[test] diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 82186ebcdd..daf4e1c36e 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -4666,6 +4666,7 @@ axis Both Her İkisi @msg a drag or an undo group is open; finish it before running a script bir sürükleme veya geri alma grubu açık; betiği çalıştırmadan önce tamamlayın @msg the script left a document that cannot be kept betik, saklanamayan bir belge bıraktı @msg the script is no longer in the Scripts folder betik artık Scripts klasöründe değil +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Komut dosyası, Dosya › Komut dosyaları › Diğer Komut Dosyası… ile seçilen bir komut dosyası çalışmadan önce gösterilen uyarıyı kapatmak istiyor. Daha sonra seçilen komut dosyaları bu durumda uyarı olmadan çalışır. Uyarı kapatılsın mı? Some scripts were not listed Bazı komut dosyaları listelenmedi The Scripts folder cannot be read Scripts klasörü okunamıyor Loading scripts… Betikler yükleniyor… diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index de3329ef10..5cbd4ef024 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -2748,7 +2748,7 @@ file-filter Templates Шаблони Other Layers Інші шари Other Libraries Інші бібліотеки Other Library… Інша бібліотека… - Other Script… Інша писемність… + Other Script… Інший скрипт… Out of Gamut Warning Попередження про вихід із колірного охоплення Out of Web Color Warning Попередження про колір, що не підтримується web Out Tangent Handles Маркери вихідної дотичної @@ -4952,6 +4952,7 @@ axis Both Обидві @msg a drag or an undo group is open; finish it before running a script відкрито перетягування або групу скасування; завершіть їх перед запуском скрипта @msg the script left a document that cannot be kept скрипт залишив документ, який не можна зберегти @msg the script is no longer in the Scripts folder скрипт більше не міститься в папці Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Скрипт просить вимкнути попередження, яке показується перед запуском скрипту, вибраного командою Файл › Сценарії › Інший скрипт… Вибрані пізніше скрипти тоді запускатимуться без нього. Вимкнути попередження? Some scripts were not listed Деякі сценарії не показано The Scripts folder cannot be read Не вдалося прочитати папку Scripts Loading scripts… Завантаження сценаріїв… diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 675143a8d6..f2def46d53 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5430,6 +5430,7 @@ theme Appearance Giao diện @msg a drag or an undo group is open; finish it before running a script đang có thao tác kéo hoặc nhóm hoàn tác; hãy hoàn thành trước khi chạy tập lệnh @msg the script left a document that cannot be kept tập lệnh để lại một tài liệu không thể giữ @msg the script is no longer in the Scripts folder tập lệnh không còn trong thư mục Scripts +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? Tập lệnh yêu cầu tắt cảnh báo hiển thị trước khi chạy một tập lệnh được chọn bằng Tệp › Script › Script khác… Các tập lệnh được chọn sau đó sẽ chạy mà không có cảnh báo. Tắt cảnh báo? Some scripts were not listed Một số tập lệnh không được liệt kê The Scripts folder cannot be read Không thể đọc thư mục Scripts Loading scripts… Đang tải tập lệnh… diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 57f6a4403b..a90fa539c6 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5459,6 +5459,7 @@ imageTrace Outline 轮廓 @msg a drag or an undo group is open; finish it before running a script 拖动或撤销组尚未结束;请在运行脚本前完成 @msg the script left a document that cannot be kept 脚本留下了无法保留的文档 @msg the script is no longer in the Scripts folder 脚本已不在 Scripts 文件夹中 +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? 脚本请求关闭在运行通过“文件 › 脚本 › 其他脚本…”选择的脚本前显示的警告。关闭后,之后选择的脚本将在没有警告的情况下运行。要关闭警告吗? Some scripts were not listed 部分脚本未列出 The Scripts folder cannot be read 无法读取 Scripts 文件夹 Loading scripts… 正在载入脚本… diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 9834c17ea6..6df3af8b96 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2805,6 +2805,7 @@ file-filter Templates 範本 @msg a drag or an undo group is open; finish it before running a script 拖曳或還原群組尚未結束;請在執行指令碼前完成 @msg the script left a document that cannot be kept 指令碼留下了無法保留的文件 @msg the script is no longer in the Scripts folder 指令碼已不在 Scripts 資料夾中 +@msg The script asks to turn off the warning shown before a script picked with File › Scripts › Other Script… runs. Scripts picked later would then run without it. Turn the warning off? 指令碼要求關閉在執行透過 檔案 › 指令碼 › 其他指令碼… 選擇的指令碼前顯示的警告。關閉後,之後選擇的指令碼將在沒有警告的情況下執行。要關閉警告嗎? Some scripts were not listed 部分指令碼未列出 The Scripts folder cannot be read 無法讀取 Scripts 資料夾 Loading scripts… 正在載入指令碼… diff --git a/docs/mcp.md b/docs/mcp.md index b7ac4fd981..6ce10d6a50 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -2697,8 +2697,9 @@ app through the global object `vc`, and writes to the Script Console and runs ot stored with the preferences under `scriptPreferences`, with the type they were set as, and are kept across runs and restarts; a run that fails or is stopped puts them back. VectorCraft's own rules: a key that was never set reads as `false`, `0`, `0` or `""`; a getter of another type converts the value as `Boolean`, `Number` and `String` do, and `getIntegerPreference` drops the fraction and gives - `0` for a value that is not a number. A key has 1 to 256 characters and no control characters, a string value at - most 65,536 bytes, and the store at most 4,096 keys and 1,048,576 bytes (each value that is not a string counts 8); + `0` for a value that is not a number. A key has a `length` of 1 to 256 UTF-16 code units (a character outside + the Basic Multilingual Plane, such as an emoji, counts 2) and no control characters, a string value at most + 65,536 bytes, and the store at most 4,096 keys and 1,048,576 bytes (each value that is not a string counts 8); `setIntegerPreference` takes a whole number within ±2^53 and `setRealPreference` a finite number. A value of the wrong type or past a limit throws an error and stores nothing, and removing a key that is not stored does nothing. - `app.getIdentityMatrix()`, `getTranslationMatrix(deltaX?, deltaY?)` (points), `getScaleMatrix(scaleX?, scaleY?)`