From cdfbde663de12f10598be5dc074b29b7e00159d5 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 09:20:11 -0800 Subject: [PATCH 01/52] i18n: translate the composite font errors in the complete-message languages The errors of type.compositeFonts.set, export and import, the composite font checks behind them and the Composite Fonts dialog showed in English in every language. Each complete-message catalog gets a row for each of them. The translations keep the font name, the parameter keys and the class keys (kanji, kana, punctuation, symbols, roman, numerals) as written, and NAMED_KEYS checks that they do. --- crates/ui-egui/src/i18n/ca.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/cs.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/de.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/el.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/es.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/fi.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/fr.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/hi.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/hu.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/it.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/ja.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/ka.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/ko.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/nl.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/pl.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/pt-br.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/ru.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/sv.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/tests.rs | 95 +++++++++++++++++++++++++++++ crates/ui-egui/src/i18n/tr.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/uk.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/vi.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/zh-hans.tsv | 36 +++++++++++ crates/ui-egui/src/i18n/zh-hant.tsv | 36 +++++++++++ 24 files changed, 923 insertions(+) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 5516c9662f..f293bb4202 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -4589,6 +4589,42 @@ digits Malayalam Malaiàlam Composite Fonts Tipus de lletra compostos Export Composite Fonts Exporta tipus de lletra compostos Import Composite Fonts Importa tipus de lletra compostos +@msg each font must be {name, parts} cada tipus de lletra ha de ser {name, parts} +@msg unknown key `{k}`; a font takes name and parts clau desconeguda `{k}`; un tipus de lletra admet name i parts +@msg each font needs a name cada tipus de lletra necessita un nom +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` no pot anomenar un tipus de lletra compost (d’1 a {COMPOSITE_NAME_MAX} caràcters, sense caràcters de control) +@msg `{name}`: parts must be an object `{name}`: parts ha de ser un objecte +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: classe desconeguda `{k}`; les classes són kanji, kana, punctuation, symbols, roman i numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} ha de ser un objecte +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: clau desconeguda `{k}` a {_1} +@msg `{name}`: give the kanji part `{name}`: indiqueu la part kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts un document conté com a màxim {COMPOSITE_FONTS_MAX} tipus de lletra compostos +@msg two composite fonts are named `{_1}` dos tipus de lletra compostos es diuen `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` és el nom d’un tipus de lletra instal·lat +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} usa `{font}`, un tipus de lletra compost +@msg give fonts: [{name, parts}…] indiqueu fonts: [{name, parts}…] +@msg path is empty path és buit +@msg fonts must be a list of composite fonts fonts ha de ser una llista de tipus de lletra compostos +@msg names must be strings names ha de contenir cadenes +@msg no composite font named `{n}` cap tipus de lletra compost anomenat `{n}` +@msg names must be a list of names names ha de ser una llista de noms +@msg no composite fonts to export cap tipus de lletra compost per exportar +@msg not a composite fonts file: {e} no és un fitxer de tipus de lletra compostos: {e} +@msg not a composite fonts file: no compositeFonts list no és un fitxer de tipus de lletra compostos: no hi ha cap llista compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts el fitxer conté més de {COMPOSITE_FONTS_MAX} tipus de lletra compostos +@msg the file is larger than 4 MB el fitxer ocupa més de 4 MB +@msg dataBase64 is not base64 dataBase64 no és base64 +@msg give one of path, data or dataBase64 indiqueu path, data o dataBase64 +@msg the file holds no composite fonts el fitxer no conté cap tipus de lletra compost +@msg the file holds two composite fonts named `{_1}` el fitxer conté dos tipus de lletra compostos anomenats `{_1}` +@msg `{_1}` can't name a composite font `{_1}` no pot anomenar un tipus de lletra compost +@msg {k}: give a font {k}: indiqueu un tipus de lletra +@msg {k}: size must be {_1} to {_2}% {k}: size ha d’estar entre {_1} i {_2} % +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline ha d’estar entre {_1} i {_2} % +@msg {k}: scale must be {_1} to {_2}% {k}: l’escala ha d’estar entre {_1} i {_2} % +@msg {k}: only kana, roman and numerals can be scaled {k}: només kana, roman i numerals es poden escalar +@msg {k}: only kana can be scaled at the center {k}: només kana es pot escalar des del centre +@msg no composite font cap tipus de lletra compost Delete Font Suprimeix el tipus de lletra Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index d03d192a3a..5e850005d1 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1638,6 +1638,42 @@ digits Malayalam Malajálamské Composite Fonts Složená písma Export Composite Fonts Exportovat složená písma Import Composite Fonts Importovat složená písma +@msg each font must be {name, parts} každé písmo musí být {name, parts} +@msg unknown key `{k}`; a font takes name and parts neznámý klíč `{k}`; písmo přijímá name a parts +@msg each font needs a name každé písmo potřebuje název +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` nemůže být názvem složeného písma (1 až {COMPOSITE_NAME_MAX} znaků, bez řídicích znaků) +@msg `{name}`: parts must be an object `{name}`: parts musí být objekt +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: neznámá třída `{k}`; třídy jsou kanji, kana, punctuation, symbols, roman a numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} musí být objekt +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: neznámý klíč `{k}` v {_1} +@msg `{name}`: give the kanji part `{name}`: zadejte část kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts dokument obsahuje nejvýše {COMPOSITE_FONTS_MAX} složených písem +@msg two composite fonts are named `{_1}` dvě složená písma se jmenují `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` je název nainstalovaného písma +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} používá `{font}`, což je složené písmo +@msg give fonts: [{name, parts}…] zadejte fonts: [{name, parts}…] +@msg path is empty path je prázdné +@msg fonts must be a list of composite fonts fonts musí být seznam složených písem +@msg names must be strings names musí být řetězce +@msg no composite font named `{n}` žádné složené písmo s názvem `{n}` +@msg names must be a list of names names musí být seznam názvů +@msg no composite fonts to export žádná složená písma k exportu +@msg not a composite fonts file: {e} nejde o soubor složených písem: {e} +@msg not a composite fonts file: no compositeFonts list nejde o soubor složených písem: chybí seznam compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts soubor obsahuje více než {COMPOSITE_FONTS_MAX} složených písem +@msg the file is larger than 4 MB soubor je větší než 4 MB +@msg dataBase64 is not base64 dataBase64 není base64 +@msg give one of path, data or dataBase64 zadejte path, data nebo dataBase64 +@msg the file holds no composite fonts soubor neobsahuje žádná složená písma +@msg the file holds two composite fonts named `{_1}` soubor obsahuje dvě složená písma s názvem `{_1}` +@msg `{_1}` can't name a composite font `{_1}` nemůže být názvem složeného písma +@msg {k}: give a font {k}: zadejte písmo +@msg {k}: size must be {_1} to {_2}% {k}: size musí být {_1} až {_2} % +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline musí být {_1} až {_2} % +@msg {k}: scale must be {_1} to {_2}% {k}: měřítko musí být {_1} až {_2} % +@msg {k}: only kana, roman and numerals can be scaled {k}: měnit měřítko lze jen u kana, roman a numerals +@msg {k}: only kana can be scaled at the center {k}: měřítko od středu lze měnit jen u kana +@msg no composite font žádné složené písmo Delete Font Odstranit písmo Kanji Kandži Kana Kana diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 47337855aa..0fd46c7d0b 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -3590,6 +3590,42 @@ effect Points Punkte Composite Fonts Zusammengesetzte Schriften Export Composite Fonts Zusammengesetzte Schriften exportieren Import Composite Fonts Zusammengesetzte Schriften importieren +@msg each font must be {name, parts} jede Schrift muss {name, parts} sein +@msg unknown key `{k}`; a font takes name and parts unbekannter Schlüssel `{k}`; eine Schrift nimmt name und parts +@msg each font needs a name jede Schrift braucht einen Namen +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` kann keine zusammengesetzte Schrift benennen (1 bis {COMPOSITE_NAME_MAX} Zeichen, keine Steuerzeichen) +@msg `{name}`: parts must be an object `{name}`: parts muss ein Objekt sein +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: unbekannte Klasse `{k}`; die Klassen sind kanji, kana, punctuation, symbols, roman und numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} muss ein Objekt sein +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: unbekannter Schlüssel `{k}` in {_1} +@msg `{name}`: give the kanji part `{name}`: geben Sie den Teil kanji an +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts ein Dokument enthält höchstens {COMPOSITE_FONTS_MAX} zusammengesetzte Schriften +@msg two composite fonts are named `{_1}` zwei zusammengesetzte Schriften heißen `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` ist der Name einer installierten Schrift +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} ist in `{font}` gesetzt, einer zusammengesetzten Schrift +@msg give fonts: [{name, parts}…] geben Sie fonts an: [{name, parts}…] +@msg path is empty path ist leer +@msg fonts must be a list of composite fonts fonts muss eine Liste zusammengesetzter Schriften sein +@msg names must be strings names müssen Zeichenketten sein +@msg no composite font named `{n}` keine zusammengesetzte Schrift namens `{n}` +@msg names must be a list of names names muss eine Liste von Namen sein +@msg no composite fonts to export keine zusammengesetzten Schriften zum Exportieren +@msg not a composite fonts file: {e} keine Datei mit zusammengesetzten Schriften: {e} +@msg not a composite fonts file: no compositeFonts list keine Datei mit zusammengesetzten Schriften: keine Liste compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts die Datei enthält mehr als {COMPOSITE_FONTS_MAX} zusammengesetzte Schriften +@msg the file is larger than 4 MB die Datei ist größer als 4 MB +@msg dataBase64 is not base64 dataBase64 ist kein Base64 +@msg give one of path, data or dataBase64 geben Sie path, data oder dataBase64 an +@msg the file holds no composite fonts die Datei enthält keine zusammengesetzten Schriften +@msg the file holds two composite fonts named `{_1}` die Datei enthält zwei zusammengesetzte Schriften namens `{_1}` +@msg `{_1}` can't name a composite font `{_1}` kann keine zusammengesetzte Schrift benennen +@msg {k}: give a font {k}: geben Sie eine Schrift an +@msg {k}: size must be {_1} to {_2}% {k}: size muss {_1} bis {_2} % sein +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline muss {_1} bis {_2} % sein +@msg {k}: scale must be {_1} to {_2}% {k}: die Skalierung muss {_1} bis {_2} % sein +@msg {k}: only kana, roman and numerals can be scaled {k}: nur kana, roman und numerals lassen sich skalieren +@msg {k}: only kana can be scaled at the center {k}: nur kana lässt sich am Mittelpunkt skalieren +@msg no composite font keine zusammengesetzte Schrift Delete Font Schrift löschen Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index c319729a71..98f743c7fc 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -4109,6 +4109,42 @@ digits Malayalam Μαλαγιάλαμ Composite Fonts Σύνθετες γραμματοσειρές Export Composite Fonts Εξαγωγή σύνθετων γραμματοσειρών Import Composite Fonts Εισαγωγή σύνθετων γραμματοσειρών +@msg each font must be {name, parts} κάθε γραμματοσειρά πρέπει να είναι {name, parts} +@msg unknown key `{k}`; a font takes name and parts άγνωστο κλειδί `{k}`· μια γραμματοσειρά δέχεται name και parts +@msg each font needs a name κάθε γραμματοσειρά χρειάζεται όνομα +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) το `{raw}` δεν μπορεί να είναι όνομα σύνθετης γραμματοσειράς (1 έως {COMPOSITE_NAME_MAX} χαρακτήρες, χωρίς χαρακτήρες ελέγχου) +@msg `{name}`: parts must be an object `{name}`: το parts πρέπει να είναι αντικείμενο +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: άγνωστη κλάση `{k}`· οι κλάσεις είναι kanji, kana, punctuation, symbols, roman και numerals +@msg `{name}`: {_1} must be an object `{name}`: το {_1} πρέπει να είναι αντικείμενο +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: άγνωστο κλειδί `{k}` στο {_1} +@msg `{name}`: give the kanji part `{name}`: δώστε το τμήμα kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts ένα έγγραφο περιέχει το πολύ {COMPOSITE_FONTS_MAX} σύνθετες γραμματοσειρές +@msg two composite fonts are named `{_1}` δύο σύνθετες γραμματοσειρές ονομάζονται `{_1}` +@msg `{_1}` is the name of an installed font το `{_1}` είναι όνομα εγκατεστημένης γραμματοσειράς +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: το {_2} χρησιμοποιεί την `{font}`, που είναι σύνθετη γραμματοσειρά +@msg give fonts: [{name, parts}…] δώστε fonts: [{name, parts}…] +@msg path is empty το path είναι κενό +@msg fonts must be a list of composite fonts το fonts πρέπει να είναι λίστα σύνθετων γραμματοσειρών +@msg names must be strings τα names πρέπει να είναι συμβολοσειρές +@msg no composite font named `{n}` δεν υπάρχει σύνθετη γραμματοσειρά με όνομα `{n}` +@msg names must be a list of names το names πρέπει να είναι λίστα ονομάτων +@msg no composite fonts to export δεν υπάρχουν σύνθετες γραμματοσειρές για εξαγωγή +@msg not a composite fonts file: {e} δεν είναι αρχείο σύνθετων γραμματοσειρών: {e} +@msg not a composite fonts file: no compositeFonts list δεν είναι αρχείο σύνθετων γραμματοσειρών: δεν υπάρχει λίστα compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts το αρχείο περιέχει περισσότερες από {COMPOSITE_FONTS_MAX} σύνθετες γραμματοσειρές +@msg the file is larger than 4 MB το αρχείο είναι μεγαλύτερο από 4 MB +@msg dataBase64 is not base64 το dataBase64 δεν είναι base64 +@msg give one of path, data or dataBase64 δώστε path, data ή dataBase64 +@msg the file holds no composite fonts το αρχείο δεν περιέχει σύνθετες γραμματοσειρές +@msg the file holds two composite fonts named `{_1}` το αρχείο περιέχει δύο σύνθετες γραμματοσειρές με όνομα `{_1}` +@msg `{_1}` can't name a composite font το `{_1}` δεν μπορεί να είναι όνομα σύνθετης γραμματοσειράς +@msg {k}: give a font {k}: δώστε γραμματοσειρά +@msg {k}: size must be {_1} to {_2}% {k}: το size πρέπει να είναι από {_1} έως {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: το baseline πρέπει να είναι από {_1} έως {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: η κλίμακα πρέπει να είναι από {_1} έως {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: μόνο τα kana, roman και numerals αλλάζουν κλίμακα +@msg {k}: only kana can be scaled at the center {k}: μόνο το kana αλλάζει κλίμακα από το κέντρο +@msg no composite font καμία σύνθετη γραμματοσειρά Delete Font Διαγραφή γραμματοσειράς Kanji Κάντζι Kana Κάνα diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 5b203292a4..af64c7e2de 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -3638,6 +3638,42 @@ digits Malayalam Malayálam Composite Fonts Fuentes compuestas Export Composite Fonts Exportar fuentes compuestas Import Composite Fonts Importar fuentes compuestas +@msg each font must be {name, parts} cada fuente debe ser {name, parts} +@msg unknown key `{k}`; a font takes name and parts clave desconocida `{k}`; una fuente admite name y parts +@msg each font needs a name cada fuente necesita un nombre +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` no puede nombrar una fuente compuesta (de 1 a {COMPOSITE_NAME_MAX} caracteres, sin caracteres de control) +@msg `{name}`: parts must be an object `{name}`: parts debe ser un objeto +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: clase desconocida `{k}`; las clases son kanji, kana, punctuation, symbols, roman y numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} debe ser un objeto +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: clave desconocida `{k}` en {_1} +@msg `{name}`: give the kanji part `{name}`: indique la parte kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts un documento admite como máximo {COMPOSITE_FONTS_MAX} fuentes compuestas +@msg two composite fonts are named `{_1}` dos fuentes compuestas se llaman `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` es el nombre de una fuente instalada +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} usa `{font}`, una fuente compuesta +@msg give fonts: [{name, parts}…] indique fonts: [{name, parts}…] +@msg path is empty path está vacío +@msg fonts must be a list of composite fonts fonts debe ser una lista de fuentes compuestas +@msg names must be strings names debe contener cadenas +@msg no composite font named `{n}` no hay ninguna fuente compuesta llamada `{n}` +@msg names must be a list of names names debe ser una lista de nombres +@msg no composite fonts to export no hay fuentes compuestas para exportar +@msg not a composite fonts file: {e} no es un archivo de fuentes compuestas: {e} +@msg not a composite fonts file: no compositeFonts list no es un archivo de fuentes compuestas: no hay lista compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts el archivo contiene más de {COMPOSITE_FONTS_MAX} fuentes compuestas +@msg the file is larger than 4 MB el archivo ocupa más de 4 MB +@msg dataBase64 is not base64 dataBase64 no es base64 +@msg give one of path, data or dataBase64 indique path, data o dataBase64 +@msg the file holds no composite fonts el archivo no contiene fuentes compuestas +@msg the file holds two composite fonts named `{_1}` el archivo contiene dos fuentes compuestas llamadas `{_1}` +@msg `{_1}` can't name a composite font `{_1}` no puede nombrar una fuente compuesta +@msg {k}: give a font {k}: indique una fuente +@msg {k}: size must be {_1} to {_2}% {k}: size debe estar entre {_1} y {_2} % +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline debe estar entre {_1} y {_2} % +@msg {k}: scale must be {_1} to {_2}% {k}: la escala debe estar entre {_1} y {_2} % +@msg {k}: only kana, roman and numerals can be scaled {k}: solo kana, roman y numerals se pueden escalar +@msg {k}: only kana can be scaled at the center {k}: solo kana se puede escalar desde el centro +@msg no composite font ninguna fuente compuesta Delete Font Eliminar fuente Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index b2c6f48d54..ccff1a1a06 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1611,6 +1611,42 @@ digits Malayalam Malajalam Composite Fonts Yhdistelmäfontit Export Composite Fonts Vie yhdistelmäfontit Import Composite Fonts Tuo yhdistelmäfontit +@msg each font must be {name, parts} jokaisen fontin on oltava {name, parts} +@msg unknown key `{k}`; a font takes name and parts tuntematon avain `{k}`; fontti ottaa name ja parts +@msg each font needs a name jokainen fontti tarvitsee nimen +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` ei kelpaa yhdistelmäfontin nimeksi (1–{COMPOSITE_NAME_MAX} merkkiä, ei ohjausmerkkejä) +@msg `{name}`: parts must be an object `{name}`: parts on oltava objekti +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: tuntematon luokka `{k}`; luokat ovat kanji, kana, punctuation, symbols, roman ja numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} on oltava objekti +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: tuntematon avain `{k}` osassa {_1} +@msg `{name}`: give the kanji part `{name}`: anna osa kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts asiakirjassa voi olla enintään {COMPOSITE_FONTS_MAX} yhdistelmäfonttia +@msg two composite fonts are named `{_1}` kahden yhdistelmäfontin nimi on `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` on asennetun fontin nimi +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} käyttää fonttia `{font}`, joka on yhdistelmäfontti +@msg give fonts: [{name, parts}…] anna fonts: [{name, parts}…] +@msg path is empty path on tyhjä +@msg fonts must be a list of composite fonts fonts on oltava luettelo yhdistelmäfonteista +@msg names must be strings names on oltava merkkijonoja +@msg no composite font named `{n}` yhdistelmäfonttia `{n}` ei ole +@msg names must be a list of names names on oltava luettelo nimistä +@msg no composite fonts to export ei vietäviä yhdistelmäfontteja +@msg not a composite fonts file: {e} ei yhdistelmäfonttitiedosto: {e} +@msg not a composite fonts file: no compositeFonts list ei yhdistelmäfonttitiedosto: luettelo compositeFonts puuttuu +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts tiedostossa on yli {COMPOSITE_FONTS_MAX} yhdistelmäfonttia +@msg the file is larger than 4 MB tiedosto on suurempi kuin 4 Mt +@msg dataBase64 is not base64 dataBase64 ei ole base64-muotoa +@msg give one of path, data or dataBase64 anna path, data tai dataBase64 +@msg the file holds no composite fonts tiedostossa ei ole yhdistelmäfontteja +@msg the file holds two composite fonts named `{_1}` tiedostossa on kaksi yhdistelmäfonttia nimeltä `{_1}` +@msg `{_1}` can't name a composite font `{_1}` ei kelpaa yhdistelmäfontin nimeksi +@msg {k}: give a font {k}: anna fontti +@msg {k}: size must be {_1} to {_2}% {k}: size on oltava {_1}–{_2} % +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline on oltava {_1}–{_2} % +@msg {k}: scale must be {_1} to {_2}% {k}: skaalauksen on oltava {_1}–{_2} % +@msg {k}: only kana, roman and numerals can be scaled {k}: vain kana, roman ja numerals voidaan skaalata +@msg {k}: only kana can be scaled at the center {k}: vain kana voidaan skaalata keskeltä +@msg no composite font ei yhdistelmäfonttia Delete Font Poista fontti Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index e84f344060..2468d74626 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3630,6 +3630,42 @@ digits Malayalam Malayalam Composite Fonts Polices composites Export Composite Fonts Exporter des polices composites Import Composite Fonts Importer des polices composites +@msg each font must be {name, parts} chaque police doit être {name, parts} +@msg unknown key `{k}`; a font takes name and parts clé inconnue `{k}` ; une police prend name et parts +@msg each font needs a name chaque police doit avoir un nom +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` ne peut pas nommer une police composite (1 à {COMPOSITE_NAME_MAX} caractères, sans caractères de contrôle) +@msg `{name}`: parts must be an object `{name}` : parts doit être un objet +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}` : classe inconnue `{k}` ; les classes sont kanji, kana, punctuation, symbols, roman et numerals +@msg `{name}`: {_1} must be an object `{name}` : {_1} doit être un objet +@msg `{name}`: unknown key `{k}` in {_1} `{name}` : clé inconnue `{k}` dans {_1} +@msg `{name}`: give the kanji part `{name}` : indiquez la partie kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts un document contient au plus {COMPOSITE_FONTS_MAX} polices composites +@msg two composite fonts are named `{_1}` deux polices composites s’appellent `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` est le nom d’une police installée +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}` : {_2} utilise `{font}`, une police composite +@msg give fonts: [{name, parts}…] indiquez fonts : [{name, parts}…] +@msg path is empty path est vide +@msg fonts must be a list of composite fonts fonts doit être une liste de polices composites +@msg names must be strings names doit contenir des chaînes +@msg no composite font named `{n}` aucune police composite nommée `{n}` +@msg names must be a list of names names doit être une liste de noms +@msg no composite fonts to export aucune police composite à exporter +@msg not a composite fonts file: {e} ce n’est pas un fichier de polices composites : {e} +@msg not a composite fonts file: no compositeFonts list ce n’est pas un fichier de polices composites : pas de liste compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts le fichier contient plus de {COMPOSITE_FONTS_MAX} polices composites +@msg the file is larger than 4 MB le fichier dépasse 4 Mo +@msg dataBase64 is not base64 dataBase64 n’est pas du base64 +@msg give one of path, data or dataBase64 indiquez path, data ou dataBase64 +@msg the file holds no composite fonts le fichier ne contient aucune police composite +@msg the file holds two composite fonts named `{_1}` le fichier contient deux polices composites nommées `{_1}` +@msg `{_1}` can't name a composite font `{_1}` ne peut pas nommer une police composite +@msg {k}: give a font {k} : indiquez une police +@msg {k}: size must be {_1} to {_2}% {k} : size doit être compris entre {_1} et {_2} % +@msg {k}: baseline must be {_1} to {_2}% {k} : baseline doit être compris entre {_1} et {_2} % +@msg {k}: scale must be {_1} to {_2}% {k} : l’échelle doit être comprise entre {_1} et {_2} % +@msg {k}: only kana, roman and numerals can be scaled {k} : seuls kana, roman et numerals peuvent être mis à l’échelle +@msg {k}: only kana can be scaled at the center {k} : seul kana peut être mis à l’échelle depuis le centre +@msg no composite font aucune police composite Delete Font Supprimer la police Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 017bc03750..4246a55ac3 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -4972,6 +4972,42 @@ antiAlias Sharp शार्प Composite Fonts कंपोज़िट फ़ॉन्ट Export Composite Fonts कंपोज़िट फ़ॉन्ट एक्सपोर्ट करें Import Composite Fonts कंपोज़िट फ़ॉन्ट इम्पोर्ट करें +@msg each font must be {name, parts} हर फ़ॉन्ट {name, parts} होना चाहिए +@msg unknown key `{k}`; a font takes name and parts अज्ञात कुंजी `{k}`; फ़ॉन्ट name और parts लेता है +@msg each font needs a name हर फ़ॉन्ट का एक नाम होना चाहिए +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` कंपोज़िट फ़ॉन्ट का नाम नहीं हो सकता (1 से {COMPOSITE_NAME_MAX} अक्षर, कोई नियंत्रण अक्षर नहीं) +@msg `{name}`: parts must be an object `{name}`: parts एक ऑब्जेक्ट होना चाहिए +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: अज्ञात वर्ग `{k}`; वर्ग kanji, kana, punctuation, symbols, roman और numerals हैं +@msg `{name}`: {_1} must be an object `{name}`: {_1} एक ऑब्जेक्ट होना चाहिए +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: {_1} में अज्ञात कुंजी `{k}` +@msg `{name}`: give the kanji part `{name}`: kanji भाग दें +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts एक दस्तावेज़ में अधिकतम {COMPOSITE_FONTS_MAX} कंपोज़िट फ़ॉन्ट रहते हैं +@msg two composite fonts are named `{_1}` दो कंपोज़िट फ़ॉन्ट का नाम `{_1}` है +@msg `{_1}` is the name of an installed font `{_1}` एक इंस्टॉल किए गए फ़ॉन्ट का नाम है +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} `{font}` में सेट है, जो एक कंपोज़िट फ़ॉन्ट है +@msg give fonts: [{name, parts}…] fonts दें: [{name, parts}…] +@msg path is empty path खाली है +@msg fonts must be a list of composite fonts fonts कंपोज़िट फ़ॉन्ट की सूची होनी चाहिए +@msg names must be strings names स्ट्रिंग होने चाहिए +@msg no composite font named `{n}` `{n}` नाम का कोई कंपोज़िट फ़ॉन्ट नहीं है +@msg names must be a list of names names नामों की सूची होनी चाहिए +@msg no composite fonts to export एक्सपोर्ट करने के लिए कोई कंपोज़िट फ़ॉन्ट नहीं है +@msg not a composite fonts file: {e} यह कंपोज़िट फ़ॉन्ट फ़ाइल नहीं है: {e} +@msg not a composite fonts file: no compositeFonts list यह कंपोज़िट फ़ॉन्ट फ़ाइल नहीं है: compositeFonts सूची नहीं है +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts फ़ाइल में {COMPOSITE_FONTS_MAX} से अधिक कंपोज़िट फ़ॉन्ट हैं +@msg the file is larger than 4 MB फ़ाइल 4 MB से बड़ी है +@msg dataBase64 is not base64 dataBase64 base64 नहीं है +@msg give one of path, data or dataBase64 path, data या dataBase64 में से एक दें +@msg the file holds no composite fonts फ़ाइल में कोई कंपोज़िट फ़ॉन्ट नहीं है +@msg the file holds two composite fonts named `{_1}` फ़ाइल में `{_1}` नाम के दो कंपोज़िट फ़ॉन्ट हैं +@msg `{_1}` can't name a composite font `{_1}` कंपोज़िट फ़ॉन्ट का नाम नहीं हो सकता +@msg {k}: give a font {k}: एक फ़ॉन्ट दें +@msg {k}: size must be {_1} to {_2}% {k}: size {_1} से {_2}% तक होना चाहिए +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline {_1} से {_2}% तक होना चाहिए +@msg {k}: scale must be {_1} to {_2}% {k}: स्केल {_1} से {_2}% तक होना चाहिए +@msg {k}: only kana, roman and numerals can be scaled {k}: केवल kana, roman और numerals को स्केल किया जा सकता है +@msg {k}: only kana can be scaled at the center {k}: केंद्र से केवल kana को स्केल किया जा सकता है +@msg no composite font कोई कंपोज़िट फ़ॉन्ट नहीं Delete Font फ़ॉन्ट हटाएँ Kanji कांजी Kana काना diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index effb31e5d8..5c8f222c62 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -4303,6 +4303,42 @@ mark-style Japanese Japán Composite Fonts Összetett betűtípusok Export Composite Fonts Összetett betűtípusok exportálása Import Composite Fonts Összetett betűtípusok importálása +@msg each font must be {name, parts} minden betűtípusnak {name, parts} alakúnak kell lennie +@msg unknown key `{k}`; a font takes name and parts ismeretlen kulcs: `{k}`; egy betűtípus name és parts kulcsot fogad +@msg each font needs a name minden betűtípusnak kell egy név +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` nem lehet összetett betűtípus neve (1–{COMPOSITE_NAME_MAX} karakter, vezérlőkarakterek nélkül) +@msg `{name}`: parts must be an object `{name}`: a parts értékének objektumnak kell lennie +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: ismeretlen osztály: `{k}`; az osztályok: kanji, kana, punctuation, symbols, roman és numerals +@msg `{name}`: {_1} must be an object `{name}`: a(z) {_1} értékének objektumnak kell lennie +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: ismeretlen kulcs: `{k}` itt: {_1} +@msg `{name}`: give the kanji part `{name}`: adja meg a kanji részt +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts egy dokumentum legfeljebb {COMPOSITE_FONTS_MAX} összetett betűtípust tartalmazhat +@msg two composite fonts are named `{_1}` két összetett betűtípus neve is `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` egy telepített betűtípus neve +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: a(z) {_2} a(z) `{font}` összetett betűtípust használja +@msg give fonts: [{name, parts}…] adja meg: fonts: [{name, parts}…] +@msg path is empty a path üres +@msg fonts must be a list of composite fonts a fonts értékének összetett betűtípusok listájának kell lennie +@msg names must be strings a names elemeinek karakterláncoknak kell lenniük +@msg no composite font named `{n}` nincs `{n}` nevű összetett betűtípus +@msg names must be a list of names a names értékének nevek listájának kell lennie +@msg no composite fonts to export nincs exportálható összetett betűtípus +@msg not a composite fonts file: {e} nem összetettbetűtípus-fájl: {e} +@msg not a composite fonts file: no compositeFonts list nem összetettbetűtípus-fájl: nincs compositeFonts lista +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts a fájl több mint {COMPOSITE_FONTS_MAX} összetett betűtípust tartalmaz +@msg the file is larger than 4 MB a fájl nagyobb 4 MB-nál +@msg dataBase64 is not base64 a dataBase64 nem base64 +@msg give one of path, data or dataBase64 adja meg a path, data vagy dataBase64 egyikét +@msg the file holds no composite fonts a fájl nem tartalmaz összetett betűtípust +@msg the file holds two composite fonts named `{_1}` a fájl két `{_1}` nevű összetett betűtípust tartalmaz +@msg `{_1}` can't name a composite font `{_1}` nem lehet összetett betűtípus neve +@msg {k}: give a font {k}: adjon meg egy betűtípust +@msg {k}: size must be {_1} to {_2}% {k}: a size értéke {_1}–{_2}% lehet +@msg {k}: baseline must be {_1} to {_2}% {k}: a baseline értéke {_1}–{_2}% lehet +@msg {k}: scale must be {_1} to {_2}% {k}: a méretezés {_1}–{_2}% lehet +@msg {k}: only kana, roman and numerals can be scaled {k}: csak a kana, roman és numerals méretezhető +@msg {k}: only kana can be scaled at the center {k}: csak a kana méretezhető a középpontból +@msg no composite font nincs összetett betűtípus Delete Font Betűtípus törlése Kanji Kandzsi Kana Kana diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 2d6c7e2186..98e597c75e 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -3684,6 +3684,42 @@ digits Malayalam Malayalam Composite Fonts Font compositi Export Composite Fonts Esporta font compositi Import Composite Fonts Importa font compositi +@msg each font must be {name, parts} ogni font deve essere {name, parts} +@msg unknown key `{k}`; a font takes name and parts chiave sconosciuta `{k}`; un font accetta name e parts +@msg each font needs a name ogni font deve avere un nome +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` non può essere il nome di un font composito (da 1 a {COMPOSITE_NAME_MAX} caratteri, senza caratteri di controllo) +@msg `{name}`: parts must be an object `{name}`: parts deve essere un oggetto +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: classe sconosciuta `{k}`; le classi sono kanji, kana, punctuation, symbols, roman e numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} deve essere un oggetto +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: chiave sconosciuta `{k}` in {_1} +@msg `{name}`: give the kanji part `{name}`: indica la parte kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts un documento contiene al massimo {COMPOSITE_FONTS_MAX} font compositi +@msg two composite fonts are named `{_1}` due font compositi si chiamano `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` è il nome di un font installato +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} usa `{font}`, un font composito +@msg give fonts: [{name, parts}…] indica fonts: [{name, parts}…] +@msg path is empty path è vuoto +@msg fonts must be a list of composite fonts fonts deve essere un elenco di font compositi +@msg names must be strings names deve contenere stringhe +@msg no composite font named `{n}` nessun font composito di nome `{n}` +@msg names must be a list of names names deve essere un elenco di nomi +@msg no composite fonts to export nessun font composito da esportare +@msg not a composite fonts file: {e} non è un file di font compositi: {e} +@msg not a composite fonts file: no compositeFonts list non è un file di font compositi: manca l’elenco compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts il file contiene più di {COMPOSITE_FONTS_MAX} font compositi +@msg the file is larger than 4 MB il file supera 4 MB +@msg dataBase64 is not base64 dataBase64 non è base64 +@msg give one of path, data or dataBase64 indica path, data o dataBase64 +@msg the file holds no composite fonts il file non contiene font compositi +@msg the file holds two composite fonts named `{_1}` il file contiene due font compositi di nome `{_1}` +@msg `{_1}` can't name a composite font `{_1}` non può essere il nome di un font composito +@msg {k}: give a font {k}: indica un font +@msg {k}: size must be {_1} to {_2}% {k}: size deve essere tra {_1} e {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline deve essere tra {_1} e {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: la scala deve essere tra {_1} e {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: solo kana, roman e numerals si possono ridimensionare +@msg {k}: only kana can be scaled at the center {k}: solo kana si può ridimensionare dal centro +@msg no composite font nessun font composito Delete Font Elimina font Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 17444d894e..89f481878d 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -4013,6 +4013,42 @@ file-filter Templates テンプレート Composite Fonts 合成フォント Export Composite Fonts 合成フォントを書き出し Import Composite Fonts 合成フォントを読み込み +@msg each font must be {name, parts} 各フォントは {name, parts} の形にしてください +@msg unknown key `{k}`; a font takes name and parts `{k}` は不明なキーです。フォントに使えるのは name と parts です +@msg each font needs a name 各フォントには名前が必要です +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` は合成フォントの名前にできません (1~{COMPOSITE_NAME_MAX} 文字、制御文字なし) +@msg `{name}`: parts must be an object `{name}`: parts はオブジェクトにしてください +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: `{k}` は不明なクラスです。クラスは kanji、kana、punctuation、symbols、roman、numerals です +@msg `{name}`: {_1} must be an object `{name}`: {_1} はオブジェクトにしてください +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: {_1} の `{k}` は不明なキーです +@msg `{name}`: give the kanji part `{name}`: kanji の部分を指定してください +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts 1 つのドキュメントに置ける合成フォントは {COMPOSITE_FONTS_MAX} 個までです +@msg two composite fonts are named `{_1}` `{_1}` という名前の合成フォントが 2 つあります +@msg `{_1}` is the name of an installed font `{_1}` はインストール済みのフォントの名前です +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} に合成フォントの `{font}` が設定されています +@msg give fonts: [{name, parts}…] fonts を指定してください: [{name, parts}…] +@msg path is empty path が空です +@msg fonts must be a list of composite fonts fonts は合成フォントのリストにしてください +@msg names must be strings names は文字列にしてください +@msg no composite font named `{n}` `{n}` という合成フォントはありません +@msg names must be a list of names names は名前のリストにしてください +@msg no composite fonts to export 書き出す合成フォントがありません +@msg not a composite fonts file: {e} 合成フォントのファイルではありません: {e} +@msg not a composite fonts file: no compositeFonts list 合成フォントのファイルではありません: compositeFonts のリストがありません +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts ファイルに {COMPOSITE_FONTS_MAX} 個を超える合成フォントがあります +@msg the file is larger than 4 MB ファイルが 4 MB を超えています +@msg dataBase64 is not base64 dataBase64 が base64 ではありません +@msg give one of path, data or dataBase64 path、data、dataBase64 のいずれかを指定してください +@msg the file holds no composite fonts ファイルに合成フォントがありません +@msg the file holds two composite fonts named `{_1}` ファイルに `{_1}` という名前の合成フォントが 2 つあります +@msg `{_1}` can't name a composite font `{_1}` は合成フォントの名前にできません +@msg {k}: give a font {k}: フォントを指定してください +@msg {k}: size must be {_1} to {_2}% {k}: size は {_1}~{_2}% にしてください +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline は {_1}~{_2}% にしてください +@msg {k}: scale must be {_1} to {_2}% {k}: 比率は {_1}~{_2}% にしてください +@msg {k}: only kana, roman and numerals can be scaled {k}: 比率を変更できるのは kana、roman、numerals だけです +@msg {k}: only kana can be scaled at the center {k}: 中央を基準に比率を変更できるのは kana だけです +@msg no composite font 合成フォントがありません Delete Font フォントを削除 Kanji 漢字 Kana かな diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index be8a847cb2..07ae7d42b2 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1482,6 +1482,42 @@ digits Malayalam მალაიალამური Composite Fonts კომპოზიტური შრიფტები Export Composite Fonts კომპოზიტური შრიფტების ექსპორტი Import Composite Fonts კომპოზიტური შრიფტების იმპორტი +@msg each font must be {name, parts} თითოეული შრიფტი უნდა იყოს {name, parts} +@msg unknown key `{k}`; a font takes name and parts უცნობი გასაღები `{k}`; შრიფტი იღებს name-სა და parts-ს +@msg each font needs a name თითოეულ შრიფტს სახელი სჭირდება +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` ვერ იქნება კომპოზიტური შრიფტის სახელი (1-დან {COMPOSITE_NAME_MAX} სიმბოლომდე, მმართველი სიმბოლოების გარეშე) +@msg `{name}`: parts must be an object `{name}`: parts უნდა იყოს ობიექტი +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: უცნობი კლასი `{k}`; კლასებია: kanji, kana, punctuation, symbols, roman და numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} უნდა იყოს ობიექტი +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: უცნობი გასაღები `{k}` ნაწილში {_1} +@msg `{name}`: give the kanji part `{name}`: მიუთითეთ ნაწილი kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts დოკუმენტი შეიცავს არაუმეტეს {COMPOSITE_FONTS_MAX} კომპოზიტურ შრიფტს +@msg two composite fonts are named `{_1}` ორ კომპოზიტურ შრიფტს ჰქვია `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` დაინსტალირებული შრიფტის სახელია +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} იყენებს `{font}`-ს, რომელიც კომპოზიტური შრიფტია +@msg give fonts: [{name, parts}…] მიუთითეთ fonts: [{name, parts}…] +@msg path is empty path ცარიელია +@msg fonts must be a list of composite fonts fonts უნდა იყოს კომპოზიტური შრიფტების სია +@msg names must be strings names უნდა იყოს სტრიქონები +@msg no composite font named `{n}` კომპოზიტური შრიფტი სახელით `{n}` არ არსებობს +@msg names must be a list of names names უნდა იყოს სახელების სია +@msg no composite fonts to export საექსპორტო კომპოზიტური შრიფტები არ არის +@msg not a composite fonts file: {e} ეს არ არის კომპოზიტური შრიფტების ფაილი: {e} +@msg not a composite fonts file: no compositeFonts list ეს არ არის კომპოზიტური შრიფტების ფაილი: სია compositeFonts არ არის +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts ფაილი შეიცავს {COMPOSITE_FONTS_MAX}-ზე მეტ კომპოზიტურ შრიფტს +@msg the file is larger than 4 MB ფაილი 4 MB-ზე დიდია +@msg dataBase64 is not base64 dataBase64 არ არის base64 +@msg give one of path, data or dataBase64 მიუთითეთ path, data ან dataBase64 +@msg the file holds no composite fonts ფაილი კომპოზიტურ შრიფტებს არ შეიცავს +@msg the file holds two composite fonts named `{_1}` ფაილი შეიცავს ორ კომპოზიტურ შრიფტს სახელით `{_1}` +@msg `{_1}` can't name a composite font `{_1}` ვერ იქნება კომპოზიტური შრიფტის სახელი +@msg {k}: give a font {k}: მიუთითეთ შრიფტი +@msg {k}: size must be {_1} to {_2}% {k}: size უნდა იყოს {_1}-დან {_2}%-მდე +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline უნდა იყოს {_1}-დან {_2}%-მდე +@msg {k}: scale must be {_1} to {_2}% {k}: მასშტაბი უნდა იყოს {_1}-დან {_2}%-მდე +@msg {k}: only kana, roman and numerals can be scaled {k}: მასშტაბირება შეიძლება მხოლოდ kana, roman და numerals ნაწილებში +@msg {k}: only kana can be scaled at the center {k}: ცენტრიდან მასშტაბირება შეიძლება მხოლოდ kana ნაწილში +@msg no composite font კომპოზიტური შრიფტი არ არის Delete Font შრიფტის წაშლა Kanji კანძი Kana კანა diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 991daba6d0..fbb22fd589 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -4001,6 +4001,42 @@ file-filter Templates 템플릿 Composite Fonts 합성 글꼴 Export Composite Fonts 합성 글꼴 내보내기 Import Composite Fonts 합성 글꼴 가져오기 +@msg each font must be {name, parts} 각 글꼴은 {name, parts} 형식이어야 합니다 +@msg unknown key `{k}`; a font takes name and parts 알 수 없는 키 `{k}`: 글꼴에는 name과 parts만 쓸 수 있습니다 +@msg each font needs a name 각 글꼴에는 이름이 필요합니다 +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}`은(는) 합성 글꼴 이름으로 쓸 수 없습니다(1~{COMPOSITE_NAME_MAX}자, 제어 문자 없음) +@msg `{name}`: parts must be an object `{name}`: parts는 객체여야 합니다 +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: 알 수 없는 클래스 `{k}`: 클래스는 kanji, kana, punctuation, symbols, roman, numerals입니다 +@msg `{name}`: {_1} must be an object `{name}`: {_1}은(는) 객체여야 합니다 +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: {_1}에 알 수 없는 키 `{k}`이(가) 있습니다 +@msg `{name}`: give the kanji part `{name}`: kanji 부분을 지정하세요 +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts 문서에는 합성 글꼴을 최대 {COMPOSITE_FONTS_MAX}개까지 둘 수 있습니다 +@msg two composite fonts are named `{_1}` 이름이 `{_1}`인 합성 글꼴이 두 개 있습니다 +@msg `{_1}` is the name of an installed font `{_1}`은(는) 설치된 글꼴의 이름입니다 +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2}이(가) 합성 글꼴인 `{font}`(으)로 설정되어 있습니다 +@msg give fonts: [{name, parts}…] fonts를 지정하세요: [{name, parts}…] +@msg path is empty path가 비어 있습니다 +@msg fonts must be a list of composite fonts fonts는 합성 글꼴 목록이어야 합니다 +@msg names must be strings names는 문자열이어야 합니다 +@msg no composite font named `{n}` 이름이 `{n}`인 합성 글꼴이 없습니다 +@msg names must be a list of names names는 이름 목록이어야 합니다 +@msg no composite fonts to export 내보낼 합성 글꼴이 없습니다 +@msg not a composite fonts file: {e} 합성 글꼴 파일이 아닙니다: {e} +@msg not a composite fonts file: no compositeFonts list 합성 글꼴 파일이 아닙니다: compositeFonts 목록이 없습니다 +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts 파일에 합성 글꼴이 {COMPOSITE_FONTS_MAX}개보다 많습니다 +@msg the file is larger than 4 MB 파일이 4MB보다 큽니다 +@msg dataBase64 is not base64 dataBase64가 base64가 아닙니다 +@msg give one of path, data or dataBase64 path, data, dataBase64 중 하나를 지정하세요 +@msg the file holds no composite fonts 파일에 합성 글꼴이 없습니다 +@msg the file holds two composite fonts named `{_1}` 파일에 이름이 `{_1}`인 합성 글꼴이 두 개 있습니다 +@msg `{_1}` can't name a composite font `{_1}`은(는) 합성 글꼴 이름으로 쓸 수 없습니다 +@msg {k}: give a font {k}: 글꼴을 지정하세요 +@msg {k}: size must be {_1} to {_2}% {k}: size는 {_1}~{_2}%여야 합니다 +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline은 {_1}~{_2}%여야 합니다 +@msg {k}: scale must be {_1} to {_2}% {k}: 비율은 {_1}~{_2}%여야 합니다 +@msg {k}: only kana, roman and numerals can be scaled {k}: 비율을 바꿀 수 있는 것은 kana, roman, numerals뿐입니다 +@msg {k}: only kana can be scaled at the center {k}: 가운데를 기준으로 비율을 바꿀 수 있는 것은 kana뿐입니다 +@msg no composite font 합성 글꼴이 없습니다 Delete Font 글꼴 삭제 Kanji 한자 Kana 가나 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index b8ca33858f..3335e94b74 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -2059,6 +2059,42 @@ digits Malayalam Malayalam Composite Fonts Samengestelde lettertypen Export Composite Fonts Samengestelde lettertypen exporteren Import Composite Fonts Samengestelde lettertypen importeren +@msg each font must be {name, parts} elk lettertype moet {name, parts} zijn +@msg unknown key `{k}`; a font takes name and parts onbekende sleutel `{k}`; een lettertype neemt name en parts +@msg each font needs a name elk lettertype heeft een naam nodig +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` kan geen naam van een samengesteld lettertype zijn (1 tot {COMPOSITE_NAME_MAX} tekens, geen besturingstekens) +@msg `{name}`: parts must be an object `{name}`: parts moet een object zijn +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: onbekende klasse `{k}`; de klassen zijn kanji, kana, punctuation, symbols, roman en numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} moet een object zijn +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: onbekende sleutel `{k}` in {_1} +@msg `{name}`: give the kanji part `{name}`: geef het deel kanji op +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts een document bevat hoogstens {COMPOSITE_FONTS_MAX} samengestelde lettertypen +@msg two composite fonts are named `{_1}` twee samengestelde lettertypen heten `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` is de naam van een geïnstalleerd lettertype +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} gebruikt `{font}`, een samengesteld lettertype +@msg give fonts: [{name, parts}…] geef fonts op: [{name, parts}…] +@msg path is empty path is leeg +@msg fonts must be a list of composite fonts fonts moet een lijst van samengestelde lettertypen zijn +@msg names must be strings names moeten tekenreeksen zijn +@msg no composite font named `{n}` geen samengesteld lettertype met de naam `{n}` +@msg names must be a list of names names moet een lijst van namen zijn +@msg no composite fonts to export geen samengestelde lettertypen om te exporteren +@msg not a composite fonts file: {e} geen bestand met samengestelde lettertypen: {e} +@msg not a composite fonts file: no compositeFonts list geen bestand met samengestelde lettertypen: geen lijst compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts het bestand bevat meer dan {COMPOSITE_FONTS_MAX} samengestelde lettertypen +@msg the file is larger than 4 MB het bestand is groter dan 4 MB +@msg dataBase64 is not base64 dataBase64 is geen base64 +@msg give one of path, data or dataBase64 geef path, data of dataBase64 op +@msg the file holds no composite fonts het bestand bevat geen samengestelde lettertypen +@msg the file holds two composite fonts named `{_1}` het bestand bevat twee samengestelde lettertypen met de naam `{_1}` +@msg `{_1}` can't name a composite font `{_1}` kan geen naam van een samengesteld lettertype zijn +@msg {k}: give a font {k}: geef een lettertype op +@msg {k}: size must be {_1} to {_2}% {k}: size moet tussen {_1} en {_2}% liggen +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline moet tussen {_1} en {_2}% liggen +@msg {k}: scale must be {_1} to {_2}% {k}: de schaal moet tussen {_1} en {_2}% liggen +@msg {k}: only kana, roman and numerals can be scaled {k}: alleen kana, roman en numerals kunnen worden geschaald +@msg {k}: only kana can be scaled at the center {k}: alleen kana kan vanuit het midden worden geschaald +@msg no composite font geen samengesteld lettertype Delete Font Lettertype verwijderen Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index eb5afe87cc..cb236dfcaf 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1550,6 +1550,42 @@ digits Malayalam Malajalam Composite Fonts Fonty złożone Export Composite Fonts Eksportuj fonty złożone Import Composite Fonts Importuj fonty złożone +@msg each font must be {name, parts} każdy font musi mieć postać {name, parts} +@msg unknown key `{k}`; a font takes name and parts nieznany klucz `{k}`; font przyjmuje name i parts +@msg each font needs a name każdy font musi mieć nazwę +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` nie może być nazwą fontu złożonego (od 1 do {COMPOSITE_NAME_MAX} znaków, bez znaków sterujących) +@msg `{name}`: parts must be an object `{name}`: parts musi być obiektem +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: nieznana klasa `{k}`; klasy to kanji, kana, punctuation, symbols, roman i numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} musi być obiektem +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: nieznany klucz `{k}` w {_1} +@msg `{name}`: give the kanji part `{name}`: podaj część kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts dokument może zawierać najwyżej {COMPOSITE_FONTS_MAX} fontów złożonych +@msg two composite fonts are named `{_1}` dwa fonty złożone mają nazwę `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` to nazwa zainstalowanego fontu +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} używa `{font}`, który jest fontem złożonym +@msg give fonts: [{name, parts}…] podaj fonts: [{name, parts}…] +@msg path is empty path jest puste +@msg fonts must be a list of composite fonts fonts musi być listą fontów złożonych +@msg names must be strings names muszą być ciągami znaków +@msg no composite font named `{n}` brak fontu złożonego o nazwie `{n}` +@msg names must be a list of names names musi być listą nazw +@msg no composite fonts to export brak fontów złożonych do eksportu +@msg not a composite fonts file: {e} to nie jest plik fontów złożonych: {e} +@msg not a composite fonts file: no compositeFonts list to nie jest plik fontów złożonych: brak listy compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts plik zawiera więcej niż {COMPOSITE_FONTS_MAX} fontów złożonych +@msg the file is larger than 4 MB plik jest większy niż 4 MB +@msg dataBase64 is not base64 dataBase64 nie jest w formacie base64 +@msg give one of path, data or dataBase64 podaj path, data lub dataBase64 +@msg the file holds no composite fonts plik nie zawiera fontów złożonych +@msg the file holds two composite fonts named `{_1}` plik zawiera dwa fonty złożone o nazwie `{_1}` +@msg `{_1}` can't name a composite font `{_1}` nie może być nazwą fontu złożonego +@msg {k}: give a font {k}: podaj font +@msg {k}: size must be {_1} to {_2}% {k}: size musi wynosić od {_1} do {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline musi wynosić od {_1} do {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: skala musi wynosić od {_1} do {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: skalować można tylko kana, roman i numerals +@msg {k}: only kana can be scaled at the center {k}: od środka można skalować tylko kana +@msg no composite font brak fontu złożonego Delete Font Usuń font Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 80615d6370..8f9a2ef218 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5181,6 +5181,42 @@ axis Both Ambos Composite Fonts Fontes compostas Export Composite Fonts Exportar fontes compostas Import Composite Fonts Importar fontes compostas +@msg each font must be {name, parts} cada fonte deve ser {name, parts} +@msg unknown key `{k}`; a font takes name and parts chave desconhecida `{k}`; uma fonte aceita name e parts +@msg each font needs a name cada fonte precisa de um nome +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` não pode nomear uma fonte composta (de 1 a {COMPOSITE_NAME_MAX} caracteres, sem caracteres de controle) +@msg `{name}`: parts must be an object `{name}`: parts deve ser um objeto +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: classe desconhecida `{k}`; as classes são kanji, kana, punctuation, symbols, roman e numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} deve ser um objeto +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: chave desconhecida `{k}` em {_1} +@msg `{name}`: give the kanji part `{name}`: informe a parte kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts um documento contém no máximo {COMPOSITE_FONTS_MAX} fontes compostas +@msg two composite fonts are named `{_1}` duas fontes compostas se chamam `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` é o nome de uma fonte instalada +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} usa `{font}`, uma fonte composta +@msg give fonts: [{name, parts}…] informe fonts: [{name, parts}…] +@msg path is empty path está vazio +@msg fonts must be a list of composite fonts fonts deve ser uma lista de fontes compostas +@msg names must be strings names deve conter strings +@msg no composite font named `{n}` nenhuma fonte composta chamada `{n}` +@msg names must be a list of names names deve ser uma lista de nomes +@msg no composite fonts to export nenhuma fonte composta para exportar +@msg not a composite fonts file: {e} não é um arquivo de fontes compostas: {e} +@msg not a composite fonts file: no compositeFonts list não é um arquivo de fontes compostas: não há lista compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts o arquivo contém mais de {COMPOSITE_FONTS_MAX} fontes compostas +@msg the file is larger than 4 MB o arquivo tem mais de 4 MB +@msg dataBase64 is not base64 dataBase64 não é base64 +@msg give one of path, data or dataBase64 informe path, data ou dataBase64 +@msg the file holds no composite fonts o arquivo não contém fontes compostas +@msg the file holds two composite fonts named `{_1}` o arquivo contém duas fontes compostas chamadas `{_1}` +@msg `{_1}` can't name a composite font `{_1}` não pode nomear uma fonte composta +@msg {k}: give a font {k}: informe uma fonte +@msg {k}: size must be {_1} to {_2}% {k}: size deve estar entre {_1} e {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline deve estar entre {_1} e {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: a escala deve estar entre {_1} e {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: só kana, roman e numerals podem ser escalados +@msg {k}: only kana can be scaled at the center {k}: só kana pode ser escalado a partir do centro +@msg no composite font nenhuma fonte composta Delete Font Excluir fonte Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index c830e69b37..84da770f7a 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3670,6 +3670,42 @@ digits Malayalam Малаялам Composite Fonts Составные шрифты Export Composite Fonts Экспорт составных шрифтов Import Composite Fonts Импорт составных шрифтов +@msg each font must be {name, parts} каждый шрифт должен иметь вид {name, parts} +@msg unknown key `{k}`; a font takes name and parts неизвестный ключ `{k}`; шрифт принимает name и parts +@msg each font needs a name у каждого шрифта должно быть имя +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` не может быть именем составного шрифта (от 1 до {COMPOSITE_NAME_MAX} символов, без управляющих символов) +@msg `{name}`: parts must be an object `{name}`: parts должен быть объектом +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: неизвестный класс `{k}`; классы: kanji, kana, punctuation, symbols, roman и numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} должен быть объектом +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: неизвестный ключ `{k}` в {_1} +@msg `{name}`: give the kanji part `{name}`: укажите часть kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts документ содержит не более {COMPOSITE_FONTS_MAX} составных шрифтов +@msg two composite fonts are named `{_1}` два составных шрифта называются `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` является именем установленного шрифта +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} использует `{font}`, а это составной шрифт +@msg give fonts: [{name, parts}…] укажите fonts: [{name, parts}…] +@msg path is empty path пуст +@msg fonts must be a list of composite fonts fonts должен быть списком составных шрифтов +@msg names must be strings names должны быть строками +@msg no composite font named `{n}` нет составного шрифта с именем `{n}` +@msg names must be a list of names names должен быть списком имён +@msg no composite fonts to export нет составных шрифтов для экспорта +@msg not a composite fonts file: {e} это не файл составных шрифтов: {e} +@msg not a composite fonts file: no compositeFonts list это не файл составных шрифтов: нет списка compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts в файле больше {COMPOSITE_FONTS_MAX} составных шрифтов +@msg the file is larger than 4 MB файл больше 4 МБ +@msg dataBase64 is not base64 dataBase64 не в формате base64 +@msg give one of path, data or dataBase64 укажите path, data или dataBase64 +@msg the file holds no composite fonts в файле нет составных шрифтов +@msg the file holds two composite fonts named `{_1}` в файле два составных шрифта с именем `{_1}` +@msg `{_1}` can't name a composite font `{_1}` не может быть именем составного шрифта +@msg {k}: give a font {k}: укажите шрифт +@msg {k}: size must be {_1} to {_2}% {k}: size должен быть от {_1} до {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline должен быть от {_1} до {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: масштаб должен быть от {_1} до {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: масштабировать можно только kana, roman и numerals +@msg {k}: only kana can be scaled at the center {k}: масштабировать от центра можно только kana +@msg no composite font нет составного шрифта Delete Font Удалить шрифт Kanji Кандзи Kana Кана diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index d4304b97bd..3994415e3a 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -3560,6 +3560,42 @@ digits Malayalam Malayalam Composite Fonts Sammansatta typsnitt Export Composite Fonts Exportera sammansatta typsnitt Import Composite Fonts Importera sammansatta typsnitt +@msg each font must be {name, parts} varje typsnitt måste vara {name, parts} +@msg unknown key `{k}`; a font takes name and parts okänd nyckel `{k}`; ett typsnitt tar name och parts +@msg each font needs a name varje typsnitt behöver ett namn +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` kan inte vara namnet på ett sammansatt typsnitt (1 till {COMPOSITE_NAME_MAX} tecken, inga styrtecken) +@msg `{name}`: parts must be an object `{name}`: parts måste vara ett objekt +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: okänd klass `{k}`; klasserna är kanji, kana, punctuation, symbols, roman och numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} måste vara ett objekt +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: okänd nyckel `{k}` i {_1} +@msg `{name}`: give the kanji part `{name}`: ange delen kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts ett dokument har högst {COMPOSITE_FONTS_MAX} sammansatta typsnitt +@msg two composite fonts are named `{_1}` två sammansatta typsnitt heter `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` är namnet på ett installerat typsnitt +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} använder `{font}`, ett sammansatt typsnitt +@msg give fonts: [{name, parts}…] ange fonts: [{name, parts}…] +@msg path is empty path är tom +@msg fonts must be a list of composite fonts fonts måste vara en lista med sammansatta typsnitt +@msg names must be strings names måste vara strängar +@msg no composite font named `{n}` inget sammansatt typsnitt heter `{n}` +@msg names must be a list of names names måste vara en lista med namn +@msg no composite fonts to export inga sammansatta typsnitt att exportera +@msg not a composite fonts file: {e} inte en fil med sammansatta typsnitt: {e} +@msg not a composite fonts file: no compositeFonts list inte en fil med sammansatta typsnitt: ingen lista compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts filen innehåller fler än {COMPOSITE_FONTS_MAX} sammansatta typsnitt +@msg the file is larger than 4 MB filen är större än 4 MB +@msg dataBase64 is not base64 dataBase64 är inte base64 +@msg give one of path, data or dataBase64 ange path, data eller dataBase64 +@msg the file holds no composite fonts filen innehåller inga sammansatta typsnitt +@msg the file holds two composite fonts named `{_1}` filen innehåller två sammansatta typsnitt som heter `{_1}` +@msg `{_1}` can't name a composite font `{_1}` kan inte vara namnet på ett sammansatt typsnitt +@msg {k}: give a font {k}: ange ett typsnitt +@msg {k}: size must be {_1} to {_2}% {k}: size måste vara {_1} till {_2} % +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline måste vara {_1} till {_2} % +@msg {k}: scale must be {_1} to {_2}% {k}: skalan måste vara {_1} till {_2} % +@msg {k}: only kana, roman and numerals can be scaled {k}: bara kana, roman och numerals kan skalas +@msg {k}: only kana can be scaled at the center {k}: bara kana kan skalas från mitten +@msg no composite font inget sammansatt typsnitt Delete Font Ta bort typsnitt Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index d7f2c8a2ef..72f9a4db10 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -1801,6 +1801,81 @@ fn recolor_notes_on_objects_left_unchanged_translate_with_their_counts() { } } +/// Every complete-message catalog has a row for each error that `type.compositeFonts.set`, +/// `.export` and `.import`, the composite font checks behind them and the Composite Fonts dialog +/// give, and translates them with the font name, the key and the class key kept, and the reason +/// after a font's name translated in turn. +#[test] +fn composite_font_errors_translate_in_complete_languages() { + const SOURCES: &[&str] = &[ + "each font must be {name, parts}", + "unknown key `{k}`; a font takes name and parts", + "each font needs a name", + "`{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters)", + "`{name}`: parts must be an object", + "`{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals", + "`{name}`: {_1} must be an object", + "`{name}`: unknown key `{k}` in {_1}", + "`{name}`: give the kanji part", + "a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts", + "two composite fonts are named `{_1}`", + "`{_1}` is the name of an installed font", + "`{_1}`: {_2} is set in `{font}`, a composite font", + "give fonts: [{name, parts}…]", + "path is empty", + "fonts must be a list of composite fonts", + "names must be strings", + "no composite font named `{n}`", + "names must be a list of names", + "no composite fonts to export", + "not a composite fonts file: {e}", + "not a composite fonts file: no compositeFonts list", + "the file holds more than {COMPOSITE_FONTS_MAX} composite fonts", + "the file is larger than 4 MB", + "dataBase64 is not base64", + "give one of path, data or dataBase64", + "the file holds no composite fonts", + "the file holds two composite fonts named `{_1}`", + "`{_1}` can't name a composite font", + "{k}: give a font", + "{k}: size must be {_1} to {_2}%", + "{k}: baseline must be {_1} to {_2}%", + "{k}: scale must be {_1} to {_2}%", + "{k}: only kana, roman and numerals can be scaled", + "{k}: only kana can be scaled at the center", + "no composite font", + ]; + // An error, English words its translation replaces, and the text it keeps. + let cases: &[(&str, &str, &[&str])] = &[ + ( + "`Mincho Mix`: unknown class `kanjj`; the classes are kanji, kana, punctuation, symbols, roman and numerals", + "the classes are", + &["`Mincho Mix`", "`kanjj`", "kanji", "kana", "punctuation", "symbols", "roman", "numerals"], + ), + ("`Mincho Mix`: give the kanji part", "give the", &["`Mincho Mix`", "kanji"]), + ("`Mincho Mix`: parts must be an object", "must be an object", &["`Mincho Mix`", "parts"]), + ("`Mincho Mix`: kana must be an object", "must be an object", &["`Mincho Mix`", "kana"]), + ("`Mincho Mix`: unknown key `weight` in roman", "unknown key", &["`Mincho Mix`", "`weight`", "roman"]), + ("two composite fonts are named `Mincho Mix`", "are named", &["`Mincho Mix`"]), + ("`Mincho Mix`: kana: give a font", "give a font", &["`Mincho Mix`", "kana"]), + ("not a composite fonts file: the file is larger than 4 MB", "larger than", &["4"]), + ]; + for code in COMPLETE_MESSAGES { + let lang = Lang::from_code(code).expect("registered"); + let (entries, _) = parse_entries(lang.0.source); + let rows: Vec<&str> = entries.iter().filter(|(ctx, _, _)| ctx == "@msg").map(|(_, src, _)| src.as_str()).collect(); + let missing: Vec<&&str> = SOURCES.iter().filter(|s| !rows.contains(s)).collect(); + assert!(missing.is_empty(), "{code} has no row for {missing:?}"); + for (error, english, kept) in cases { + let shown = message(lang, error); + assert!(!shown.contains(english), "{code}: {shown}"); + for k in *kept { + assert!(shown.contains(k), "{code}: {k} in {shown}"); + } + } + } +} + #[test] fn package_status_message_templates_parse() { let c = Catalog::parse(concat!( @@ -3542,8 +3617,13 @@ const NAMED_KEYS: &[(&str, &[&str])] = &[ ("column must be true or a number from 1", &["column"]), ("column: true floats the whole column and takes no onto, above or below", &["column", "onto", "above", "below"]), ("control must be fillStroke, coloring, drawMode or screenMode", &["control", "fillStroke", "coloring", "drawMode", "screenMode"]), + ("dataBase64 is not base64", &["dataBase64"]), ("decimals must be {_1}–{_2} (got {_3})", &["decimals"]), ("detect must be true or false", &["detect"]), + ("each font must be {name, parts}", &["name", "parts"]), + ("fonts must be a list of composite fonts", &["fonts"]), + ("give fonts: [{name, parts}…]", &["fonts", "name", "parts"]), + ("give one of path, data or dataBase64", &["path", "data", "dataBase64"]), ("give origin: [x, y], or reset: true", &["origin", "reset"]), ("global must be true or false", &["global"]), ("group must be true or false", &["group"]), @@ -3562,12 +3642,16 @@ const NAMED_KEYS: &[(&str, &[&str])] = &[ ("member is for order front, forward, backward or back", &["member", "order", "front", "forward", "backward", "back"]), ("mode is set, add or toggle, not `{other}`", &["mode", "set", "add", "toggle"]), ("names is empty", &["names"]), + ("names must be a list of names", &["names"]), + ("names must be strings", &["names"]), + ("not a composite fonts file: no compositeFonts list", &["compositeFonts"]), ("on must be true or false", &["on"]), ("onto must name a floating panel", &["onto"]), ("others must be true or false", &["others"]), ("page must be a whole number from 1", &["page"]), ("panel is not in a dock group", &["panel"]), ("panel must name a registered panel", &["panel"]), + ("path is empty", &["path"]), ("paths must be strings", &["paths"]), ("percent must be above 0 and at most 6400, not {p}", &["percent"]), ("plane must be left, right or ground", &["plane", "left", "right", "ground"]), @@ -3583,6 +3667,7 @@ const NAMED_KEYS: &[(&str, &[&str])] = &[ ("span: \"selection\" places a linear, radial, conic or diamond gradient, not a freeform one", &["span"]), ("thickness must be from 0.01 to 5000 pt", &["thickness"]), ("title can't be empty", &["title"]), + ("unknown key `{k}`; a font takes name and parts", &["name", "parts"]), ( "unknown light setting: use color, intensity, rotation, height, softness or behind", &["color", "intensity", "rotation", "height", "softness", "behind"], @@ -3595,6 +3680,16 @@ const NAMED_KEYS: &[(&str, &[&str])] = &[ ("`strokeMode` applies to strokes (stroke: true)", &["stroke"]), ("`{GRAPHICS}` entries take symbol, face, x, y, scale and rotation, not `{k}`", &["symbol", "face", "x", "y", "scale", "rotation"]), ("`{GRAPHICS}` face must be front or back", &["face", "front", "back"]), + ("`{name}`: give the kanji part", &["kanji"]), + ("`{name}`: parts must be an object", &["parts"]), + ( + "`{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals", + &["kanji", "kana", "punctuation", "symbols", "roman", "numerals"], + ), + ("{k}: baseline must be {_1} to {_2}%", &["baseline"]), + ("{k}: only kana can be scaled at the center", &["kana"]), + ("{k}: only kana, roman and numerals can be scaled", &["kana", "roman", "numerals"]), + ("{k}: size must be {_1} to {_2}%", &["size"]), ]; /// Every catalog's translation of a [`NAMED_KEYS`] message keeps each name the table lists, as diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index f5fc694ec2..b61389b633 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -3449,6 +3449,42 @@ digits Malayalam Malayalam Composite Fonts Bileşik Fontlar Export Composite Fonts Bileşik Fontları Dışa Aktar Import Composite Fonts Bileşik Fontları İçe Aktar +@msg each font must be {name, parts} her font {name, parts} biçiminde olmalı +@msg unknown key `{k}`; a font takes name and parts bilinmeyen anahtar `{k}`; bir font name ve parts alır +@msg each font needs a name her fontun bir adı olmalı +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` bir bileşik fontun adı olamaz (1 ile {COMPOSITE_NAME_MAX} karakter arası, denetim karakteri olmadan) +@msg `{name}`: parts must be an object `{name}`: parts bir nesne olmalı +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: bilinmeyen sınıf `{k}`; sınıflar: kanji, kana, punctuation, symbols, roman ve numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} bir nesne olmalı +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: {_1} içinde bilinmeyen anahtar `{k}` +@msg `{name}`: give the kanji part `{name}`: kanji bölümünü verin +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts bir belge en fazla {COMPOSITE_FONTS_MAX} bileşik font tutar +@msg two composite fonts are named `{_1}` iki bileşik fontun adı `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` yüklü bir fontun adı +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2}, bir bileşik font olan `{font}` ile ayarlı +@msg give fonts: [{name, parts}…] fonts verin: [{name, parts}…] +@msg path is empty path boş +@msg fonts must be a list of composite fonts fonts bir bileşik font listesi olmalı +@msg names must be strings names dizeler olmalı +@msg no composite font named `{n}` `{n}` adlı bileşik font yok +@msg names must be a list of names names bir ad listesi olmalı +@msg no composite fonts to export dışa aktarılacak bileşik font yok +@msg not a composite fonts file: {e} bileşik font dosyası değil: {e} +@msg not a composite fonts file: no compositeFonts list bileşik font dosyası değil: compositeFonts listesi yok +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts dosyada {COMPOSITE_FONTS_MAX} taneden fazla bileşik font var +@msg the file is larger than 4 MB dosya 4 MB'tan büyük +@msg dataBase64 is not base64 dataBase64 base64 değil +@msg give one of path, data or dataBase64 path, data veya dataBase64 değerlerinden birini verin +@msg the file holds no composite fonts dosyada bileşik font yok +@msg the file holds two composite fonts named `{_1}` dosyada `{_1}` adlı iki bileşik font var +@msg `{_1}` can't name a composite font `{_1}` bir bileşik fontun adı olamaz +@msg {k}: give a font {k}: bir font verin +@msg {k}: size must be {_1} to {_2}% {k}: size %{_1} ile %{_2} arasında olmalı +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline %{_1} ile %{_2} arasında olmalı +@msg {k}: scale must be {_1} to {_2}% {k}: ölçek %{_1} ile %{_2} arasında olmalı +@msg {k}: only kana, roman and numerals can be scaled {k}: yalnızca kana, roman ve numerals ölçeklenebilir +@msg {k}: only kana can be scaled at the center {k}: merkezden yalnızca kana ölçeklenebilir +@msg no composite font bileşik font yok Delete Font Fontu Sil Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 5a36512db0..361401931f 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3677,6 +3677,42 @@ effect Points Точки Composite Fonts Складені шрифти Export Composite Fonts Експорт складених шрифтів Import Composite Fonts Імпорт складених шрифтів +@msg each font must be {name, parts} кожен шрифт має бути у вигляді {name, parts} +@msg unknown key `{k}`; a font takes name and parts невідомий ключ `{k}`; шрифт приймає name і parts +@msg each font needs a name кожен шрифт повинен мати назву +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` не може бути назвою складеного шрифту (від 1 до {COMPOSITE_NAME_MAX} символів, без керівних символів) +@msg `{name}`: parts must be an object `{name}`: parts має бути об’єктом +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: невідомий клас `{k}`; класи: kanji, kana, punctuation, symbols, roman і numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} має бути об’єктом +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: невідомий ключ `{k}` у {_1} +@msg `{name}`: give the kanji part `{name}`: вкажіть частину kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts документ містить щонайбільше {COMPOSITE_FONTS_MAX} складених шрифтів +@msg two composite fonts are named `{_1}` два складені шрифти мають назву `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` є назвою встановленого шрифту +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} використовує `{font}`, а це складений шрифт +@msg give fonts: [{name, parts}…] вкажіть fonts: [{name, parts}…] +@msg path is empty path порожній +@msg fonts must be a list of composite fonts fonts має бути списком складених шрифтів +@msg names must be strings names мають бути рядками +@msg no composite font named `{n}` немає складеного шрифту з назвою `{n}` +@msg names must be a list of names names має бути списком назв +@msg no composite fonts to export немає складених шрифтів для експорту +@msg not a composite fonts file: {e} це не файл складених шрифтів: {e} +@msg not a composite fonts file: no compositeFonts list це не файл складених шрифтів: немає списку compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts у файлі понад {COMPOSITE_FONTS_MAX} складених шрифтів +@msg the file is larger than 4 MB файл більший за 4 МБ +@msg dataBase64 is not base64 dataBase64 не у форматі base64 +@msg give one of path, data or dataBase64 вкажіть path, data або dataBase64 +@msg the file holds no composite fonts у файлі немає складених шрифтів +@msg the file holds two composite fonts named `{_1}` у файлі два складені шрифти з назвою `{_1}` +@msg `{_1}` can't name a composite font `{_1}` не може бути назвою складеного шрифту +@msg {k}: give a font {k}: вкажіть шрифт +@msg {k}: size must be {_1} to {_2}% {k}: size має бути від {_1} до {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline має бути від {_1} до {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: масштаб має бути від {_1} до {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: масштабувати можна лише kana, roman і numerals +@msg {k}: only kana can be scaled at the center {k}: масштабувати від центру можна лише kana +@msg no composite font немає складеного шрифту Delete Font Видалити шрифт Kanji Кандзі Kana Кана diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 839f5c7405..0a7d8e8776 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -4022,6 +4022,42 @@ mark-style Japanese Kiểu Nhật Composite Fonts Phông chữ tổ hợp Export Composite Fonts Xuất phông chữ tổ hợp Import Composite Fonts Nhập phông chữ tổ hợp +@msg each font must be {name, parts} mỗi phông chữ phải là {name, parts} +@msg unknown key `{k}`; a font takes name and parts khóa không xác định `{k}`; một phông chữ nhận name và parts +@msg each font needs a name mỗi phông chữ cần có tên +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` không thể là tên phông chữ tổ hợp (từ 1 đến {COMPOSITE_NAME_MAX} ký tự, không có ký tự điều khiển) +@msg `{name}`: parts must be an object `{name}`: parts phải là một đối tượng +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: lớp không xác định `{k}`; các lớp là kanji, kana, punctuation, symbols, roman và numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} phải là một đối tượng +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: khóa không xác định `{k}` trong {_1} +@msg `{name}`: give the kanji part `{name}`: hãy cung cấp phần kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts một tài liệu chứa tối đa {COMPOSITE_FONTS_MAX} phông chữ tổ hợp +@msg two composite fonts are named `{_1}` có hai phông chữ tổ hợp cùng tên `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` là tên của một phông chữ đã cài đặt +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} dùng `{font}`, một phông chữ tổ hợp +@msg give fonts: [{name, parts}…] hãy cung cấp fonts: [{name, parts}…] +@msg path is empty path trống +@msg fonts must be a list of composite fonts fonts phải là danh sách phông chữ tổ hợp +@msg names must be strings names phải là chuỗi +@msg no composite font named `{n}` không có phông chữ tổ hợp nào tên `{n}` +@msg names must be a list of names names phải là danh sách tên +@msg no composite fonts to export không có phông chữ tổ hợp nào để xuất +@msg not a composite fonts file: {e} không phải tệp phông chữ tổ hợp: {e} +@msg not a composite fonts file: no compositeFonts list không phải tệp phông chữ tổ hợp: không có danh sách compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts tệp chứa hơn {COMPOSITE_FONTS_MAX} phông chữ tổ hợp +@msg the file is larger than 4 MB tệp lớn hơn 4 MB +@msg dataBase64 is not base64 dataBase64 không phải base64 +@msg give one of path, data or dataBase64 hãy cung cấp path, data hoặc dataBase64 +@msg the file holds no composite fonts tệp không chứa phông chữ tổ hợp nào +@msg the file holds two composite fonts named `{_1}` tệp chứa hai phông chữ tổ hợp cùng tên `{_1}` +@msg `{_1}` can't name a composite font `{_1}` không thể là tên phông chữ tổ hợp +@msg {k}: give a font {k}: hãy cung cấp một phông chữ +@msg {k}: size must be {_1} to {_2}% {k}: size phải từ {_1} đến {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline phải từ {_1} đến {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: tỷ lệ phải từ {_1} đến {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: chỉ kana, roman và numerals mới co giãn được +@msg {k}: only kana can be scaled at the center {k}: chỉ kana mới co giãn từ tâm được +@msg no composite font không có phông chữ tổ hợp Delete Font Xóa phông chữ Kanji Kanji Kana Kana diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index b0d6001e32..2a2c0356e8 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -3499,6 +3499,42 @@ digits Malayalam 马拉雅拉姆数字 Composite Fonts 复合字体 Export Composite Fonts 导出复合字体 Import Composite Fonts 导入复合字体 +@msg each font must be {name, parts} 每个字体都必须是 {name, parts} +@msg unknown key `{k}`; a font takes name and parts 未知键 `{k}`;字体可用的键为 name 和 parts +@msg each font needs a name 每个字体都需要名称 +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` 不能用作复合字体的名称(1 到 {COMPOSITE_NAME_MAX} 个字符,不含控制字符) +@msg `{name}`: parts must be an object `{name}`:parts 必须是对象 +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`:未知类别 `{k}`;类别为 kanji、kana、punctuation、symbols、roman 和 numerals +@msg `{name}`: {_1} must be an object `{name}`:{_1} 必须是对象 +@msg `{name}`: unknown key `{k}` in {_1} `{name}`:{_1} 中有未知键 `{k}` +@msg `{name}`: give the kanji part `{name}`:请指定 kanji 部分 +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts 一个文档最多保存 {COMPOSITE_FONTS_MAX} 个复合字体 +@msg two composite fonts are named `{_1}` 有两个复合字体都名为 `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` 是已安装字体的名称 +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`:{_2} 使用了复合字体 `{font}` +@msg give fonts: [{name, parts}…] 请指定 fonts:[{name, parts}…] +@msg path is empty path 为空 +@msg fonts must be a list of composite fonts fonts 必须是复合字体列表 +@msg names must be strings names 必须是字符串 +@msg no composite font named `{n}` 没有名为 `{n}` 的复合字体 +@msg names must be a list of names names 必须是名称列表 +@msg no composite fonts to export 没有可导出的复合字体 +@msg not a composite fonts file: {e} 不是复合字体文件:{e} +@msg not a composite fonts file: no compositeFonts list 不是复合字体文件:没有 compositeFonts 列表 +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts 文件包含超过 {COMPOSITE_FONTS_MAX} 个复合字体 +@msg the file is larger than 4 MB 文件大于 4 MB +@msg dataBase64 is not base64 dataBase64 不是 base64 +@msg give one of path, data or dataBase64 请指定 path、data 或 dataBase64 之一 +@msg the file holds no composite fonts 文件不含复合字体 +@msg the file holds two composite fonts named `{_1}` 文件中有两个复合字体都名为 `{_1}` +@msg `{_1}` can't name a composite font `{_1}` 不能用作复合字体的名称 +@msg {k}: give a font {k}:请指定字体 +@msg {k}: size must be {_1} to {_2}% {k}:size 必须为 {_1}% 到 {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}:baseline 必须为 {_1}% 到 {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}:缩放必须为 {_1}% 到 {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}:只有 kana、roman 和 numerals 可以缩放 +@msg {k}: only kana can be scaled at the center {k}:只有 kana 可以从中心缩放 +@msg no composite font 没有复合字体 Delete Font 删除字体 Kanji 汉字 Kana 假名 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index c24ae37609..5d7fd456ed 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -4738,6 +4738,42 @@ digits Malayalam 馬來亞拉姆數字 Composite Fonts 複合字體 Export Composite Fonts 匯出複合字體 Import Composite Fonts 匯入複合字體 +@msg each font must be {name, parts} 每個字體都必須是 {name, parts} +@msg unknown key `{k}`; a font takes name and parts 未知的鍵 `{k}`;字體可用的鍵為 name 和 parts +@msg each font needs a name 每個字體都需要名稱 +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` 不能作為複合字體的名稱(1 到 {COMPOSITE_NAME_MAX} 個字元,不含控制字元) +@msg `{name}`: parts must be an object `{name}`:parts 必須是物件 +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`:未知的類別 `{k}`;類別為 kanji、kana、punctuation、symbols、roman 和 numerals +@msg `{name}`: {_1} must be an object `{name}`:{_1} 必須是物件 +@msg `{name}`: unknown key `{k}` in {_1} `{name}`:{_1} 中有未知的鍵 `{k}` +@msg `{name}`: give the kanji part `{name}`:請指定 kanji 部分 +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts 一份文件最多保存 {COMPOSITE_FONTS_MAX} 個複合字體 +@msg two composite fonts are named `{_1}` 有兩個複合字體都名為 `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` 是已安裝字體的名稱 +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`:{_2} 使用了複合字體 `{font}` +@msg give fonts: [{name, parts}…] 請指定 fonts:[{name, parts}…] +@msg path is empty path 為空 +@msg fonts must be a list of composite fonts fonts 必須是複合字體清單 +@msg names must be strings names 必須是字串 +@msg no composite font named `{n}` 沒有名為 `{n}` 的複合字體 +@msg names must be a list of names names 必須是名稱清單 +@msg no composite fonts to export 沒有可匯出的複合字體 +@msg not a composite fonts file: {e} 不是複合字體檔案:{e} +@msg not a composite fonts file: no compositeFonts list 不是複合字體檔案:沒有 compositeFonts 清單 +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts 檔案包含超過 {COMPOSITE_FONTS_MAX} 個複合字體 +@msg the file is larger than 4 MB 檔案大於 4 MB +@msg dataBase64 is not base64 dataBase64 不是 base64 +@msg give one of path, data or dataBase64 請指定 path、data 或 dataBase64 其中之一 +@msg the file holds no composite fonts 檔案不含複合字體 +@msg the file holds two composite fonts named `{_1}` 檔案中有兩個複合字體都名為 `{_1}` +@msg `{_1}` can't name a composite font `{_1}` 不能作為複合字體的名稱 +@msg {k}: give a font {k}:請指定字體 +@msg {k}: size must be {_1} to {_2}% {k}:size 必須為 {_1}% 到 {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}:baseline 必須為 {_1}% 到 {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}:縮放必須為 {_1}% 到 {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}:只有 kana、roman 和 numerals 可以縮放 +@msg {k}: only kana can be scaled at the center {k}:只有 kana 可以從中心縮放 +@msg no composite font 沒有複合字體 Delete Font 刪除字體 Kanji 漢字 Kana 假名 From 23dc6ac4594ad4844df19142e2d708137ff952f3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 16:06:21 -0800 Subject: [PATCH 02/52] i18n: Russian translates 1,811 more status and error messages The Russian catalog had no row for 1,811 of the status and error messages that the untranslated report finds in the sources, so the status bar showed those messages in English. - ru.tsv gains 1,811 `@msg` rows: the errors of command parameters, the script interpreter's errors, and the notes and errors of file import and export. The translations are VectorCraft's own, written from the English meaning with the feature names the catalog already uses. Placeholders, parameter names, values and command ids stay as the English writes them. - Rows for messages that open pull requests add to ru.tsv are left to those pull requests. - Two of the messages have two placeholders in a row. The status bar cannot match such a row, so it does not use those two rows. - The row for `{k} has control characters{_1}` does not match the message for a multi-line File Info field, where the last placeholder is empty. - A test reads nine of the messages back in Russian. - The Russian row of docs/localization-parity.md gives the catalog's current counts. Docs: docs/target-app-parity.md, docs/localization-parity.md. --- crates/ui-egui/src/i18n/ru.tsv | 1820 ++++++++++++++++++++++++++++++ crates/ui-egui/src/i18n/tests.rs | 21 + docs/localization-parity.md | 2 +- docs/target-app-parity.md | 1 + 4 files changed, 1843 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index f878461da5..13b597880e 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -7577,3 +7577,1823 @@ shape Open Открытый Grommets Люверсы Grommet Inset Отступ люверсов от края Diameter Диаметр + +# Status and error messages (`@msg`) of commands, scripts, and file import and export, sorted by +# their English text. Messages that begin with a feature name. +@msg 'caller', 'callee' and 'arguments' cannot be used on strict mode functions 'caller', 'callee' и 'arguments' нельзя использовать с функциями строгого режима +@msg A profile supports one Revolve effect. Edit the existing effect's options instead. Профиль поддерживает один эффект «Вращение». Измените параметры существующего эффекта. +@msg Add Points at Crossings: a path went missing Добавить точки на пересечениях: контур пропал +@msg Alignment must be one of the choices Выравнивание должно быть одним из предложенных вариантов +@msg Boolean.prototype.{name} was called on a value that is not a Boolean Boolean.prototype.{name} вызван для значения, которое не является Boolean +@msg CMYK images whose samples couldn't be read in CMYK were imported in RGB изображения CMYK, отсчёты которых не удалось прочитать в CMYK, импортированы в RGB +@msg CSS options: {e} Параметры CSS: {e} +@msg CSV has a header but no data rows в CSV есть заголовок, но нет строк данных +@msg CSV holds NUL bytes: save it as UTF-8, or as UTF-16 with a byte-order mark CSV содержит байты NUL: сохраните его в UTF-8 или в UTF-16 с меткой порядка байтов +@msg CSV is empty CSV пуст +@msg CSV is larger than {MAX_CSV_BYTES} bytes CSV больше {MAX_CSV_BYTES} байт +@msg CSV is not UTF-16 CSV не в кодировке UTF-16 +@msg CSV is not UTF-8 CSV не в кодировке UTF-8 +@msg CSV would be larger than {MAX_CSV_BYTES} bytes CSV был бы больше {MAX_CSV_BYTES} байт +@msg Cannot write to the location of “{name}”; choose where to save it Невозможно записать в расположение «{name}»; выберите, куда сохранить файл +@msg Choose original artwork, not a dimension's generated paths Выберите исходную графику, а не контуры, созданные размером +@msg Contour: select paths or shapes Эквидистанта: выделите контуры или фигуры +@msg Contour: the Offset Path effect is not available Эквидистанта: эффект «Смещение контура» недоступен +@msg Create needs fills, strokes or both Для создания нужны заливки, обводки или и то и другое +@msg DCS files can only be placed linked: use File › Place with Link on Файлы DCS можно помещать только как связанные: используйте «Файл › Поместить» с включённым параметром «Связать» +@msg DXF options: {e} Параметры DXF: {e} +@msg DXF scale must be a positive number up to {_1}, not {scale} Масштаб DXF должен быть положительным числом не больше {_1}, а не {scale} +@msg DXF {field} `{s}`: {allowed} DXF, {field} `{s}`: {allowed} +@msg Date.prototype method called on a value that is not a Date object метод Date.prototype вызван для значения, которое не является объектом Date +@msg Dimension is locked or hidden Размер заблокирован или скрыт +@msg Dimension mode does not match its source Режим размера не соответствует его источнику +@msg Draw Inside needs exactly one selected path, compound path or text Для режима «Рисовать внутри» нужен ровно один выделенный контур, составной контур или текст +@msg EPS Save writes all artwork: use document.export for selected-only EPS Сохранение в EPS записывает всю графику: чтобы записать в EPS только выделенное, используйте document.export +@msg EPS flattener: {e} Объединение EPS: {e} +@msg EPS options: {e} Параметры EPS: {e} +@msg EPS {field} `{s}`: {allowed} EPS, {field} `{s}`: {allowed} +@msg Error.prototype.toString was called on a value that is not an object Error.prototype.toString вызван для значения, которое не является объектом +@msg Export for Screens writes png, png8, jpg, webp, gif, tiff, bmp, tga, psd, svg, svgz, pdf, eps, ai or vectorcraft «Экспортировать для экранов» записывает png, png8, jpg, webp, gif, tiff, bmp, tga, psd, svg, svgz, pdf, eps, ai или vectorcraft +@msg Flare click coordinates must be finite numbers Координаты щелчка для блика должны быть конечными числами +@msg Function.prototype.toString was called on a value that is not a function Function.prototype.toString вызван для значения, которое не является функцией +@msg HTML Text applies to object slices of type only «Текст HTML» применяется только к фрагментам текстовых объектов +@msg Identify Objects By is XML ID: the name must be a valid XML ID (start with a letter, underscore or colon; no spaces) Для параметра «Определять объекты по» выбрано XML ID: имя должно быть допустимым XML ID (начинается с буквы, подчёркивания или двоеточия; без пробелов) +@msg Image Trace failed: internal error: its thread stopped (please report this bug) Трассировка изображения не выполнена: внутренняя ошибка: её поток остановился (сообщите об этой ошибке) +@msg Image Trace failed: {e} Трассировка изображения не выполнена: {e} +@msg Image Trace finished, but its document was closed Трассировка изображения завершена, но её документ был закрыт +@msg Image Trace finished, but the image or its settings changed meanwhile: trace it again Трассировка изображения завершена, но изображение или его настройки за это время изменились: выполните трассировку снова +@msg Import SVG Filter reads SVG files, not SVGZ Импорт фильтра SVG читает файлы SVG, а не SVGZ +@msg Invalid dimension offset Недопустимое смещение размера +@msg Invalid point Недопустимая точка +@msg JSON.parse: {why} (at offset {at}) JSON.parse: {why} (смещение {at}) +@msg JSON.stringify cannot write a structure that contains itself JSON.stringify не может записать структуру, которая содержит саму себя +@msg Join: a subpath went missing Соединить: вложенный контур пропал +@msg Line Gap must be a number Интервал между строками должен быть числом +@msg Lock Workspace is not available in VectorCraft Закрепление рабочей среды недоступно в VectorCraft +@msg Move Panel to New Window is not available: floating panels stay in the main window Перемещение панели в новое окно недоступно: плавающие панели остаются в главном окне +@msg Namespace.prototype.toString needs a Namespace для Namespace.prototype.toString нужен Namespace +@msg New Document profiles need the preferences folder, which this run doesn't have Профилям нового документа нужна папка настроек, которой нет у этого запуска +@msg Number.prototype.{name} was called on a value that is not a number Number.prototype.{name} вызван для значения, которое не является числом +@msg Object.create's prototype must be an object or null прототип для Object.create должен быть объектом или null +@msg Object.{function} was given a value that is not an object в Object.{function} передано значение, которое не является объектом +@msg Offset Path: the path is too complex to offset Смещение контура: контур слишком сложен для смещения +@msg Offset Path: {e} Смещение контура: {e} +@msg PDF content is incomplete or exceeds the reader's limits; no document was imported Содержимое PDF неполно или превышает ограничения чтения; документ не импортирован +@msg PDF flattener: {e} Объединение PDF: {e} +@msg PDF options: {e} Параметры PDF: {e} +@msg QName.prototype.toString needs a QName для QName.prototype.toString нужен QName +@msg Recolor Artwork is no longer open Окно «Перекрасить рисунок» больше не открыто +@msg RegExp.prototype.{name} was called on a value that is not a RegExp object RegExp.prototype.{name} вызван для значения, которое не является объектом RegExp +@msg SVG is not UTF-8, UTF-16 or ISO 8859-1 SVG не в кодировке UTF-8, UTF-16 или ISO 8859-1 +@msg Save writes one artboard: name one, or export several with document.export Сохранение записывает одну монтажную область: укажите одну или экспортируйте несколько через document.export +@msg Select a dimension first Сначала выделите размер +@msg Select dimensions to update Выделите размеры для обновления +@msg Select only dimensions Выделите только размеры +@msg Select two or more objects, or a group Выделите два или более объекта либо группу +@msg Shaper needs 1–64 source paths Для Shaper нужно от 1 до 64 исходных контуров +@msg Stencil Bridges: the selected art is too large or too detailed to bridge Мостики трафарета: выделенная графика слишком велика или слишком детальна для мостиков +@msg String.prototype.toString was called on a value that is not a string String.prototype.toString вызван для значения, которое не является строкой +@msg Switch x/y is for scatter graphs «Поменять x/y» применяется к точечным диаграммам +@msg Text options: {e} Параметры текста: {e} +@msg The {name} profile could not be read, so the new document has the default settings: {reason} Профиль {name} не удалось прочитать, поэтому у нового документа настройки по умолчанию: {reason} +@msg Trap: more than {_1} pairs of objects lie close enough to trap, or too many objects share a horizontal range; trap fewer objects at a time Треппинг: больше {_1} пар объектов расположены достаточно близко для треппинга, или слишком много объектов занимают один горизонтальный диапазон; применяйте треппинг к меньшему числу объектов за раз +@msg Weed Box and Lines: no weeding line fits outside the art, and the weed box is off Рамка и линии выборки: ни одна линия выборки не помещается за пределами графики, а рамка выборки отключена +@msg \\ at end of pattern \\ в конце шаблона +# Messages that begin with a parameter name. +@msg `alignOn` cannot be empty `alignOn` не может быть пустым +@msg `alignOn` must be a string `alignOn` должно быть строкой +@msg `align` is start, center or end `align` принимает start, center или end +@msg `align` must be a string `align` должно быть строкой +@msg `anchors` must be an array of [subpath, anchor] pairs `anchors` должно быть массивом пар [subpath, anchor] +@msg `anchors` must list anchor indices (0, 1, 2…), not {k} `anchors` должно содержать индексы опорных точек (0, 1, 2…), а не {k} +@msg `anchors` must list anchor indices (0, 1, 2…), not {v} `anchors` должно содержать индексы опорных точек (0, 1, 2…), а не {v} +@msg `answer` for this {kind} dialog must be one of: {_1} `answer` для этого диалогового окна {kind} должно быть одним из: {_1} +@msg `answers` has more than {MAX_ANSWERS} answers в `answers` больше {MAX_ANSWERS} ответов +@msg `answers` is larger than 1 MiB `answers` больше 1 MiB +@msg `answers` must be a list of answers `answers` должно быть списком ответов +@msg `artboard` must be the index of an artboard of the document `artboard` должно быть индексом монтажной области документа +@msg `artboardsAt` must be [x, y] `artboardsAt` должно быть [x, y] +@msg `artboards` must be a list of artboard indices `artboards` должно быть списком индексов монтажных областей +@msg `artboards` names an artboard the document does not have `artboards` указывает монтажную область, которой нет в документе +@msg `artboards` names an artboard twice `artboards` указывает одну монтажную область дважды +@msg `asset` is the asset id (see assets.list) `asset` — идентификатор ресурса (см. assets.list) +@msg `at` must be [x, y] (got {at}) `at` должно быть [x, y] (получено {at}) +@msg `at` must be a byte offset `at` должно быть смещением в байтах +@msg `at` must be a point [x, y] `at` должно быть точкой [x, y] +@msg `autoLeading` must be a number `autoLeading` должно быть числом +@msg `background` must be "", "matte" or #rrggbb `background` должно быть "", "matte" или #rrggbb +@msg `beside` needs `side` для `beside` нужно `side` +@msg `burasagari` must be "none", "standard" or "forced" `burasagari` должно быть "none", "standard" или "forced" +@msg `center` must be [x, y] `center` должно быть [x, y] +@msg `charAlign` must be "romanBaseline", "emBoxTop", "emBoxCenter", "emBoxBottom", "icfTop" or "icfBottom" `charAlign` должно быть "romanBaseline", "emBoxTop", "emBoxCenter", "emBoxBottom", "icfTop" или "icfBottom" +@msg `charDirection` must be "default", "leftToRight" or "rightToLeft" `charDirection` должно быть "default", "leftToRight" или "rightToLeft" +@msg `clearStroke` requires `stroke: false`, `ids: []` and no `stop` для `clearStroke` нужны `stroke: false`, `ids: []` и отсутствие `stop` +@msg `clear` must be a list of type object ids, not {v} `clear` должно быть списком идентификаторов текстовых объектов, а не {v} +@msg `clear` must list type objects; {_1} is not one `clear` должно содержать текстовые объекты; {_1} не является текстовым объектом +@msg `clear` must not list `id` `clear` не должно содержать `id` +@msg `code` must be a whole number `code` должно быть целым числом +@msg `colorMode` must be one of rgb, cmyk `colorMode` должно быть одним из: rgb, cmyk +@msg `color` needs a `rule` to make the theme from для `color` нужно `rule`, по которому создаётся тема +@msg `colors` does not apply to the {name} reduction `colors` не применяется к редукции {name} +@msg `colors` is empty `colors` пусто +@msg `colors` must be a whole number from 2 to 256 `colors` должно быть целым числом от 2 до 256 +@msg `colors` must be at least 9 for the uniform reduction `colors` должно быть не меньше 9 для редукции uniform +@msg `colors` must be between 1 and {MAX_THEME_COLORS} (got {n}) `colors` должно быть от 1 до {MAX_THEME_COLORS} (получено {n}) +@msg `columnType` is vertical, uniform, repeating or sliding `columnType` принимает vertical, uniform, repeating или sliding +@msg `columns` must be a whole number 1..50 `columns` должно быть целым числом 1..50 +@msg `commands` must not be empty `commands` не должно быть пустым +@msg `contents` goes with `to` `contents` указывается вместе с `to` +@msg `corners` must be sharp, round or square, not `{other}` `corners` должно быть sharp, round или square, а не `{other}` +@msg `corners` must list anchor indices (0, 1, 2…), not {v} `corners` должно содержать индексы опорных точек (0, 1, 2…), а не {v} +@msg `count` must be a whole number from 0 to {MAX_COUNT} `count` должно быть целым числом от 0 до {MAX_COUNT} +@msg `count` must be a whole number from 1 to 100 `count` должно быть целым числом от 1 до 100 +@msg `dataBase64` is larger than the module limit `dataBase64` больше ограничения для модуля +@msg `dataBase64` is not valid base64 `dataBase64` не является допустимым base64 +@msg `defaultsOnly` cannot be combined with `ids`, `reverse` or `append` `defaultsOnly` нельзя сочетать с `ids`, `reverse` или `append` +@msg `depth` and `childLimit` slice the summary: pass `summary: true` `depth` и `childLimit` ограничивают сводку: передайте `summary: true` +@msg `design` is a design name, or null for plain columns `design` — имя дизайна или null для обычных столбцов +@msg `design` is a design name, or null for the default marker `design` — имя дизайна или null для маркера по умолчанию +@msg `destinationFolder` is required when destination is `folder` `destinationFolder` обязательно, когда destination равно `folder` +@msg `destination` must be `none`, `saveAndClose` or `folder` `destination` должно быть `none`, `saveAndClose` или `folder` +@msg `diameter` must be from 0.1 to 2500 pt `diameter` должно быть от 0.1 до 2500 pt +@msg `digits` must be one of {_1} `digits` должно быть одним из: {_1} +@msg `dimImages` is a percentage or false `dimImages` — процент или false +@msg `direction` must be "auto", "leftToRight" or "rightToLeft" `direction` должно быть "auto", "leftToRight" или "rightToLeft" +@msg `ditherAmount` must be a number from 0 to 100 `ditherAmount` должно быть числом от 0 до 100 +@msg `each` is the value one design stands for, more than 0 `each` — значение, которое обозначает один дизайн, больше 0 +@msg `end` must be "start" or "end" `end` должно быть "start" или "end" +@msg `ends` applies to joining exactly two paths `ends` применяется при соединении ровно двух контуров +@msg `event` must be one of {_1} `event` должно быть одним из: {_1} +@msg `every` must be "all", "odd" or "even", not {v} `every` должно быть "all", "odd" или "even", а не {v} +@msg `expand` must be true or false `expand` должно быть true или false +@msg `fidelity` must be from {lo} to {hi} pt `fidelity` должно быть от {lo} до {hi} pt +@msg `files` must be 1 to 1000 paths of font files the last text.findFontFiles search found `files` должно содержать от 1 до 1000 путей к файлам шрифтов, которые нашёл последний поиск text.findFontFiles +@msg `focal` and `radius` cannot be used together `focal` и `radius` нельзя использовать вместе +@msg `focal` must be an array of [subpath, anchor] pairs `focal` должно быть массивом пар [subpath, anchor] +@msg `focal` names [{si}, {ai}], which is not an anchor of the path `focal` указывает [{si}, {ai}], а это не опорная точка контура +@msg `folder` must be an absolute folder path `folder` должно быть абсолютным путём к папке +@msg `fontAxes` must be an object of axis tags and values, such as {"wght"} `fontAxes` должно быть объектом из тегов осей и значений, например {"wght"} +@msg `format` must be a string `format` должно быть строкой +@msg `format` must be one of {_1} `format` должно быть одним из: {_1} +@msg `fractions` is chop or scale `fractions` принимает chop или scale +@msg `from` and `to` must differ `from` и `to` должны различаться +@msg `from` has an empty frame у `from` пустая рамка +@msg `from` must be a non-negative integer `from` должно быть неотрицательным целым числом +@msg `from` must be area type or type on a path `from` должно быть текстом в области или текстом по контуру +@msg `gid` must be a glyph id, not {v} `gid` должно быть идентификатором глифа, а не {v} +@msg `glyphAlternate` belongs to one character, not to a character style (text.setGlyphAlternate sets it) `glyphAlternate` относится к одному символу, а не к стилю символов (его задаёт text.setGlyphAlternate) +@msg `glyphAlternate` takes only null, which takes a glyph choice away (text.setGlyphAlternate makes one) `glyphAlternate` принимает только null, что отменяет выбор глифа (выбор делает text.setGlyphAlternate) +@msg `group` must be one of {_1} `group` должно быть одним из: {_1} +@msg `group` must be the Objects on Path group of `member` and `target` `group` должно быть группой «Объекты на контуре», в которую входят `member` и `target` +@msg `guide` must be a guide index (guide.list) `guide` должно быть индексом направляющей (guide.list) +@msg `hAlign` must be default, left, center or right `hAlign` должно быть default, left, center или right +@msg `id` is an object id, not {v} `id` — идентификатор объекта, а не {v} +@msg `id` must be a node id `id` должно быть идентификатором узла +@msg `id` must be an object id, not {v} `id` должно быть идентификатором объекта, а не {v} +@msg `ids` must name Objects on Path groups or objects in them `ids` должно указывать группы «Объекты на контуре» или объекты в них +@msg `ids` takes at most {MAX_INSPECT_IDS} ids `ids` принимает не более {MAX_INSPECT_IDS} идентификаторов +@msg `imageMap` must be none, rectangle or polygon `imageMap` должно быть none, rectangle или polygon +@msg `includeArtboardFill` must be true or false `includeArtboardFill` должно быть true или false +@msg `includeSubdirs` must be true or false `includeSubdirs` должно быть true или false +@msg `index` must be a point index `index` должно быть индексом точки +@msg `index` must be a whole number or null `index` должно быть целым числом или null +@msg `indices` must be a non-empty array of item indices `indices` должно быть непустым массивом индексов элементов +@msg `item` needs `index` для `item` нужно `index` +@msg `items` is a list of {kind, item} `items` — список {kind, item} +@msg `items` is empty `items` пусто +@msg `items` must be a list of {id, points} `items` должно быть списком {id, points} +@msg `items` must be a list of {{id, anchors?}}, not {v} `items` должно быть списком {{id, anchors?}}, а не {v} +@msg `items` must be an array of {id, anchors} `items` должно быть массивом {id, anchors} +@msg `items` must be an array of {{id, corners?}}, not {v} `items` должно быть массивом {{id, corners?}}, а не {v} +@msg `kashida` must be "none", "short", "medium", "long" or "stylistic" `kashida` должно быть "none", "short", "medium", "long" или "stylistic" +@msg `kerningBefore` belongs to a line's first character, not to a character style (text.setRangeStyle sets it) `kerningBefore` относится к первому символу строки, а не к стилю символов (его задаёт text.setRangeStyle) +@msg `kind` is one of {_1} `kind` — одно из: {_1} +@msg `kind` must be "round", "invertedRound" or "chamfer", not {v} `kind` должно быть "round", "invertedRound" или "chamfer", а не {v} +@msg `kind` must be `text`, `visibility`, `image` or `graph` `kind` должно быть `text`, `visibility`, `image` или `graph` +@msg `kind` must be a string `kind` должно быть строкой +@msg `kind` must be image, noImage or htmlText `kind` должно быть image, noImage или htmlText +@msg `kinsokuType` must be "pushInFirst", "pushOutFirst" or "pushOutOnly" `kinsokuType` должно быть "pushInFirst", "pushOutFirst" или "pushOutOnly" +@msg `kinsoku` must be "none", "hard" or "soft" `kinsoku` должно быть "none", "hard" или "soft" +@msg `label` must be a non-empty name of at most 200 characters `label` должно быть непустым именем длиной не более 200 символов +@msg `language` must be a language name or tag, such as "Turkish" or "tr" `language` должно быть названием или тегом языка, например "Turkish" или "tr" +@msg `leader` must be a string `leader` должно быть строкой +@msg `leadingModel` must be "romanBaseline" or "emBoxTop" `leadingModel` должно быть "romanBaseline" или "emBoxTop" +@msg `leading` must be from 0.1 to 5000, or null for Auto `leading` должно быть от 0.1 до 5000 или null для значения «Авто» +@msg `length` must be a number of at most 1000000 pt either way `length` должно быть числом не больше 1000000 pt в любую сторону +@msg `line` must be true or false `line` должно быть true или false +@msg `max` must be 1 to {MAX_SUGGESTIONS} `max` должно быть от 1 до {MAX_SUGGESTIONS} +@msg `minAngle` ({min_angle}°) can't be more than `maxAngle` ({max_angle}°) `minAngle` ({min_angle}°) не может быть больше `maxAngle` ({max_angle}°) +@msg `mode` must be "handles", "straight" or "smooth" `mode` должно быть "handles", "straight" или "smooth" +@msg `mode` must be "straight", "bezier" or "arc" `mode` должно быть "straight", "bezier" или "arc" +@msg `mode` must be one of {_1} `mode` должно быть одним из: {_1} +@msg `mojikumi` must be "none", "yakumonoHankaku", "gyomatsuYakumonoHankaku", "gyomatsuYakumonoZenkaku", "yakumonoZenkaku" or "lineEndHalf" `mojikumi` должно быть "none", "yakumonoHankaku", "gyomatsuYakumonoHankaku", "gyomatsuYakumonoZenkaku", "yakumonoZenkaku" или "lineEndHalf" +@msg `name` must be a name that is not empty `name` должно быть непустым именем +@msg `name` must not be empty `name` не должно быть пустым +@msg `names` is a list of preset names `names` — список имён наборов +@msg `names` lists preset names `names` перечисляет имена наборов +@msg `names` must be a list of names `names` должно быть списком имён +@msg `names` must be a list of swatch names `names` должно быть списком имён образцов +@msg `names` must be an array of style names `names` должно быть массивом имён стилей +@msg `new` is a design name, or true `new` — имя дизайна или true +@msg `origin` must be [x, y] in points `origin` должно быть [x, y] в пунктах +@msg `path` must be a folder `path` должно быть папкой +@msg `path` must be a path object `path` должно быть объектом-контуром +@msg `picks` must be an array (got {v}) `picks` должно быть массивом (получено {v}) +@msg `picks` must hold 1 to {MAX_PICKS} picks (got {_1}) `picks` должно содержать от 1 до {MAX_PICKS} выборов (получено {_1}) +@msg `pivot` must be a whole number from 0 to 8 `pivot` должно быть целым числом от 0 до 8 +@msg `points` must be a list of [x, y] points `points` должно быть списком точек [x, y] +@msg `points` must be a list of point indexes `points` должно быть списком индексов точек +@msg `points` must be an array of point indices `points` должно быть массивом индексов точек +@msg `points` must be point indexes `points` должно содержать индексы точек +@msg `points` must hold from 2 to 100000 points `points` должно содержать от 2 до 100000 точек +@msg `port` must be "in" or "out" `port` должно быть "in" или "out" +@msg `position` is above or below `position` принимает above или below +@msg `preset` must be a string `preset` должно быть строкой +@msg `radius` must be 0 or more `radius` должно быть 0 или больше +@msg `ratio` must be from 0.1 to 0.5 `ratio` должно быть от 0.1 до 0.5 +@msg `rect` must be [x, y, width, height] `rect` должно быть [x, y, width, height] +@msg `rect` must be [x, y, width, height] with a positive size `rect` должно быть [x, y, width, height] с положительным размером +@msg `rect` must be [x0, y0, x1, y1] (got {r}) `rect` должно быть [x0, y0, x1, y1] (получено {r}) +@msg `relation` must be overlap, inside or outside `relation` должно быть overlap, inside или outside +@msg `replace` must be a string `replace` должно быть строкой +@msg `reversed` must be true or false `reversed` должно быть true или false +@msg `rotate` must be a finite number `rotate` должно быть конечным числом +@msg `rows` must be lists of numbers or nulls, not {r} `rows` должно состоять из списков чисел или значений null, а не {r} +@msg `rule` must be nonZero or evenOdd `rule` должно быть nonZero или evenOdd +@msg `scale` must be a number from 0.001 to 1000 `scale` должно быть числом от 0.001 до 1000 +@msg `scale` must be a number in (0, 100] `scale` должно быть числом в диапазоне (0, 100] +@msg `scope.{key}` must be a non-empty array `scope.{key}` должно быть непустым массивом +@msg `scope` must be "document", {artboards} or {layers} `scope` должно быть "document", {artboards} или {layers} +@msg `scope` must be "selection" or "document", not {other} `scope` должно быть "selection" или "document", а не {other} +@msg `script` must be a string `script` должно быть строкой +@msg `seriesIndexes` is a non-empty list of series indexes `seriesIndexes` — непустой список индексов рядов +@msg `seriesIndexes` needs a `type` or a `valueAxis` для `seriesIndexes` нужно `type` или `valueAxis` +@msg `shift` must be a number of points `shift` должно быть числом в пунктах +@msg `showCenter` must be true or false `showCenter` должно быть true или false +@msg `side` must be "left", "right", "top" or "bottom" `side` должно быть "left", "right", "top" или "bottom" +@msg `side` places the artboard: leave out x, y, width and height `side` определяет положение монтажной области: не указывайте x, y, width и height +@msg `singleWordJustification` must be "fullJustify", "alignLeft", "alignCenter" or "alignRight" `singleWordJustification` должно быть "fullJustify", "alignLeft", "alignCenter" или "alignRight" +@msg `size` is a percentage of the base text's size, 1 to 100 `size` — процент от размера основного текста, от 1 до 100 +@msg `source` and `target` are the same object `source` и `target` — один и тот же объект +@msg `source` is the only path in series group `target` `source` — единственный контур в группе серии `target` +@msg `source` must be `folder` or `datasets` `source` должно быть `folder` или `datasets` +@msg `spacing` makes more than {MAX_COUNT} lines across the box `spacing` даёт больше {MAX_COUNT} линий поперёк рамки +@msg `spacing` must be a number `spacing` должно быть числом +@msg `spacing` must be a number of points, 0 or more, or "auto" `spacing` должно быть числом в пунктах, 0 или больше, либо "auto" +@msg `spacing` must be more than 0 and at most {MAX_DISTANCE} pt `spacing` должно быть больше 0 и не больше {MAX_DISTANCE} pt +@msg `start` must be a finite number `start` должно быть конечным числом +@msg `starts` must be an array of anchor indices (or nulls) `starts` должно быть массивом индексов опорных точек (или значений null) +@msg `status` must be linked, embedded, missing or modified, or a list of them `status` должно быть linked, embedded, missing или modified либо их списком +@msg `stop` must be a stop index `stop` должно быть индексом точки перехода +@msg `story` styles the whole story: give no `start` or `end` `story` задаёт стиль всего материала: не указывайте `start` и `end` +@msg `story` takes the whole story: give no `start` or `end` `story` охватывает весь материал: не указывайте `start` и `end` +@msg `strokeMode` applies to strokes (stroke: true) `strokeMode` применяется к обводкам (stroke: true) +@msg `style` must be roman or japanese `style` должно быть roman или japanese +@msg `subpaths` must be two integer indices `subpaths` должно быть двумя целочисленными индексами +@msg `symbol` must be a symbol name `symbol` должно быть именем символа +@msg `target` must be "object" or "contents", not {v} `target` должно быть "object" или "contents", а не {v} +@msg `target` must be an object of the same Objects on Path group as `member` `target` должно быть объектом той же группы «Объекты на контуре», что и `member` +@msg `tint` applies to global and spot colours `tint` применяется к глобальным и плашечным цветам +@msg `tint` goes with a global or spot `swatch` `tint` указывается вместе с глобальным или плашечным `swatch` +@msg `tint` must be a number (%) `tint` должно быть числом (%) +@msg `tint` needs a global or spot colour для `tint` нужен глобальный или плашечный цвет +@msg `to` is already threaded `to` уже входит в связанный текст +@msg `to` is the design's new name `to` — новое имя дизайна +@msg `to` must be [x, y] `to` должно быть [x, y] +@msg `to` must be a closed path, area type or type on a path other than `from` `to` должно быть замкнутым контуром, текстом в области или текстом по контуру, отличным от `from` +@msg `to` must be a whole number `to` должно быть целым числом +@msg `to` takes the rows of one object's stack, not aligned rows `to` принимает строки стопки одного объекта, а не выровненные строки +@msg `tolerance` must be from 0 to 100 pt `tolerance` должно быть от 0 до 100 pt +@msg `useLab` must be true or false `useLab` должно быть true или false +@msg `vAlign` must be default, top, middle, baseline or bottom `vAlign` должно быть default, top, middle, baseline или bottom +@msg `values` must be a list `values` должно быть списком +@msg `values` must be an object `values` должно быть объектом +@msg `values` must name hex, rgb, cmyk, lab or gray `values` должно указывать hex, rgb, cmyk, lab или gray +@msg `values` names a kind twice `values` указывает один вид дважды +@msg `version` must be 0 or {_1} `version` должно быть 0 или {_1} +@msg `version` must be 0 or {newest} `version` должно быть 0 или {newest} +@msg `warichuAlign` must be one of {_1} `warichuAlign` должно быть одним из: {_1} +@msg `warichuLines` must be a whole number from {_1} to {_2} `warichuLines` должно быть целым числом от {_1} до {_2} +@msg `weight` must be from 0.01 to 1000 pt `weight` должно быть от 0.01 до 1000 pt +@msg `weights` must be a list of {_1} numbers, one per row (got {v}) `weights` должно быть списком чисел по одному на строку, всего чисел: {_1} (получено {v}) +@msg `xml` must be a string `xml` должно быть строкой +@msg `{KEY}` entry {n} gives the paragraph at byte {start} of {_1} other indents than an entry before it `{KEY}`, запись {n}: задаёт абзацу с байта {start} объекта {_1} другие отступы, чем предыдущая запись +@msg `{KEY}` entry {n} must be an object `{KEY}`, запись {n}: должна быть объектом +@msg `{KEY}` entry {n} sets neither `leftIndent` nor `firstLineIndent` `{KEY}`, запись {n}: не задаёт ни `leftIndent`, ни `firstLineIndent` +@msg `{KEY}` entry {n}: `id` must be an object id `{KEY}`, запись {n}: `id` должно быть идентификатором объекта +@msg `{KEY}` entry {n}: `start` must be a byte offset `{KEY}`, запись {n}: `start` должно быть смещением в байтах +@msg `{KEY}` entry {n}: `{k}` must be a number from -{MAX_PARA} to {MAX_PARA} pt `{KEY}`, запись {n}: `{k}` должно быть числом от -{MAX_PARA} до {MAX_PARA} pt +@msg `{KEY}` entry {n}: no paragraph of {_1} starts at byte {start} `{KEY}`, запись {n}: ни один абзац объекта {_1} не начинается с байта {start} +@msg `{KEY}` entry {n}: unknown key `{k}` `{KEY}`, запись {n}: неизвестный ключ `{k}` +@msg `{KEY}` entry {n}: {_1} is not a type object `{KEY}`, запись {n}: {_1} не является текстовым объектом +@msg `{KEY}` is empty `{KEY}` пусто +@msg `{KEY}` must be a list `{KEY}` должно быть списком +@msg `{KEY}` takes at most {MAX_PARAGRAPH_INDENTS} entries (got {_1}) `{KEY}` принимает не более {MAX_PARAGRAPH_INDENTS} записей (получено {_1}) +@msg `{KEY}` takes no `{other}` beside it `{KEY}` не допускает `{other}` рядом с собой +@msg `{_1}` can't be edited or removed `{_1}` нельзя изменить или удалить +@msg `{_1}` is built in and always listed `{_1}` встроен и всегда есть в списке +@msg `{_1}` is not a font file the last text.findFontFiles search found `{_1}` не является файлом шрифта, который нашёл последний поиск text.findFontFiles +@msg `{_1}` would be overwritten by the package: choose a different folder or name пакет перезаписал бы `{_1}`: выберите другую папку или имя +@msg `{base}` is larger than {_1} MB `{base}` больше {_1} МБ +@msg `{base}` is not in the DCS file's folder `{base}` нет в папке файла DCS +@msg `{file}` has no art to place в `{file}` нет графики для помещения +@msg `{file}` is over {_1} MB `{file}` больше {_1} МБ +@msg `{f}` belongs to a VectorCraft that is running `{f}` принадлежит запущенному экземпляру VectorCraft +@msg `{f}` is the copy of a document open now `{f}` — копия документа, открытого сейчас +@msg `{id}` is no writable format (see document.formats) `{id}` не является форматом для записи (см. document.formats) +@msg `{id}` isn't a loaded library `{id}` не является загруженной библиотекой +@msg `{key}` has no colours в `{key}` нет цветов +@msg `{key}` holds more than {MAX_EDIT_WORDS} words `{key}` содержит больше {MAX_EDIT_WORDS} слов +@msg `{key}` is a design name `{key}` — имя дизайна +@msg `{key}` is a design name or a list of them `{key}` — имя дизайна или список таких имён +@msg `{key}` is longer than {MAX_NAME} characters `{key}` длиннее {MAX_NAME} символов +@msg `{key}` is out of range `{key}` вне диапазона +@msg `{key}` must be 0 or more `{key}` должно быть 0 или больше +@msg `{key}` must be [min, desired, max] or {{min?, desired?, max?}}, in percent `{key}` должно быть [min, desired, max] или {{min?, desired?, max?}}, в процентах +@msg `{key}` must be [x, y] numbers `{key}` должно быть числами [x, y] +@msg `{key}` must be a list of words `{key}` должно быть списком слов +@msg `{key}` must be a list, not {v} `{key}` должно быть списком, а не {v} +@msg `{key}` must be a non-negative integer `{key}` должно быть неотрицательным целым числом +@msg `{key}` must be a number or null, not {v} `{key}` должно быть числом или null, а не {v} +@msg `{key}` must be a number {_1}..{_2} `{key}` должно быть числом {_1}..{_2} +@msg `{key}` must be a whole number of 0 or more `{key}` должно быть целым числом, 0 или больше +@msg `{key}` must be a whole number of at least 0, not {n} `{key}` должно быть целым числом не меньше 0, а не {n} +@msg `{key}` must be an appearance item index (paint order) or null `{key}` должно быть индексом элемента оформления (в порядке отрисовки) или null +@msg `{key}` must be an array of asset ids (see assets.list) `{key}` должно быть массивом идентификаторов ресурсов (см. assets.list) +@msg `{key}` must be from 0 to 180 degrees, not {a} `{key}` должно быть от 0 до 180 градусов, а не {a} +@msg `{key}` must be from 0 to {MAX_DISTANCE} pt `{key}` должно быть от 0 до {MAX_DISTANCE} pt +@msg `{key}` must be from 0.01 to 1000 pt `{key}` должно быть от 0.01 до 1000 pt +@msg `{key}` must be from {_1} to {shift_max} `{key}` должно быть от {_1} до {shift_max} +@msg `{key}` must be from {lo} to {hi}, not {v} `{key}` должно быть от {lo} до {hi}, а не {v} +@msg `{key}` must be one of auto, always, never `{key}` должно быть одним из: auto, always, never +@msg `{key}` must be one of miter, round, bevel `{key}` должно быть одним из: miter, round, bevel +@msg `{key}` must be one word of at most {_1} characters `{key}` должно быть одним словом длиной не более {_1} символов +@msg `{key}` must hold single words of at most {_1} characters `{key}` должно содержать отдельные слова длиной не более {_1} символов +@msg `{key}` must name an object attached to the path of an Objects on Path group `{key}` должно указывать объект, прикреплённый к контуру группы «Объекты на контуре» +@msg `{key}` names an object that is hidden or locked `{key}` указывает скрытый или заблокированный объект +@msg `{key}`: not a colour: {v} `{key}`: не цвет: {v} +@msg `{k}.family` is required `{k}.family` обязательно +@msg `{k}` is a number 0..1 `{k}` — число 0..1 +@msg `{k}` is true or false `{k}` принимает true или false +@msg `{k}` isn't an export setting: {_1} `{k}` не является параметром экспорта: {_1} +@msg `{k}` must be a byte offset `{k}` должно быть смещением в байтах +@msg `{k}` must be a number `{k}` должно быть числом +@msg `{k}` must be a number of points `{k}` должно быть числом в пунктах +@msg `{k}` must be a string `{k}` должно быть строкой +@msg `{k}` must be a whole number `{k}` должно быть целым числом +@msg `{k}` must be from {lo} to {hi} for {key} `{k}` должно быть от {lo} до {hi} для {key} +@msg `{k}` must be {what}, not {v} `{k}` должно быть {what}, а не {v} +@msg `{l}` isn't a global or spot colour `{l}` не является глобальным или плашечным цветом +@msg `{m}` isn't a bitmap: use clipboard.importSvg, importPdf or importText `{m}` не является растровым изображением: используйте clipboard.importSvg, importPdf или importText +@msg `{name}` can't be deleted `{name}` нельзя удалить +@msg `{name}` can't be duplicated `{name}` нельзя дублировать +@msg `{name}` can't be edited `{name}` нельзя изменить +@msg `{name}` can't be edited this way `{name}` нельзя изменить таким способом +@msg `{name}` can't be renamed `{name}` нельзя переименовать +@msg `{name}` can't name a folder `{name}` не может быть именем папки +@msg `{name}` has no art to place в `{name}` нет графики для помещения +@msg `{name}` has no text to place в `{name}` нет текста для помещения +@msg `{name}` in the Word document is not UTF-8 or UTF-16 text `{name}` в документе Word не является текстом UTF-8 или UTF-16 +@msg `{name}` in the Word document is not well-formed XML: {e} `{name}` в документе Word не является корректным XML: {e} +@msg `{name}` in the Word document nests elements more than {MAX_NESTING} deep в `{name}` в документе Word элементы вложены глубже {MAX_NESTING} уровней +@msg `{name}` is a built-in preset and is read-only: save it under another name `{name}` — встроенный набор, доступный только для чтения: сохраните его под другим именем +@msg `{name}` is a built-in preset: save under another name `{name}` — встроенный набор: сохраните под другим именем +@msg `{name}` is a built-in profile and stays `{name}` — встроенный профиль, он не удаляется +@msg `{name}` is a file of its own, which can only be found next to the DCS file's path `{name}` — отдельный файл, который можно найти только рядом с файлом DCS +@msg `{name}` is a tint of `{base}`: edit `{base}` (a tint swatch only takes a new name) `{name}` — оттенок `{base}`: изменяйте `{base}` (образцу оттенка можно задать только новое имя) +@msg `{name}` is a working space: choose another with edit.colorSettings first `{name}` — рабочее пространство: сначала выберите другое через edit.colorSettings +@msg `{name}` is built in and stays `{name}` встроен и не удаляется +@msg `{name}` takes a paint of its own kind (colour, gradient or pattern) `{name}` принимает краску только своего вида (цвет, градиент или узор) +@msg `{name}`: {_1}: {e} `{name}`: {_1}: {e} +@msg `{n}` can't be deleted `{n}` нельзя удалить +@msg `{n}` can't be merged `{n}` нельзя объединить +@msg `{n}` can't be moved `{n}` нельзя переместить +@msg `{n}` is not a colour swatch `{n}` не является цветовым образцом +@msg `{n}` isn't a solid colour `{n}` не является сплошным цветом +@msg `{n}`: colour groups hold solid colours only `{n}`: цветовые группы содержат только сплошные цвета +@msg `{other}` doesn't trace an image `{other}` не трассирует изображение +@msg `{s}`: the step's references copy in more than {_1} MB of values `{s}`: ссылки шага копируют больше {_1} МБ значений +@msg `{tag}` is not an axis tag: a tag is four characters, such as "wght" `{tag}` не является тегом оси: тег состоит из четырёх символов, например "wght" +@msg `{to}` is empty or already used `{to}` пусто или уже используется +@msg `{u}` is no Unicode character `{u}` не является символом Unicode +@msg `{what}` is longer than {MAX_TEXT} bytes `{what}` длиннее {MAX_TEXT} байт +@msg `{what}` must be text `{what}` должно быть текстом +@msg `{word}` isn't in the custom dictionary `{word}` нет в пользовательском словаре +# Messages that begin with a lowercase word, a to c. +@msg a CMap has too many mappings в CMap слишком много сопоставлений +@msg a DXF drawing has one origin: pass useArtboards: true for one drawing per artboard у чертежа DXF одно начало координат: передайте useArtboards: true, чтобы получить по одному чертежу на монтажную область +@msg a PDF presets file with over {_1} presets файл наборов PDF, в котором больше {_1} наборов +@msg a \\u escape needs four hexadecimal digits после \\u нужны четыре шестнадцатеричные цифры +@msg a batch preview cannot switch documents предварительный просмотр пакета не может переключать документы +@msg a brush named `{nn}` exists кисть с именем `{nn}` уже существует +@msg a comma in an XPath expression must separate function arguments запятая в выражении XPath должна разделять аргументы функции +@msg a container of the listed objects is gone контейнер перечисленных объектов больше не существует +@msg a content stream can't be read поток содержимого невозможно прочитать +@msg a content stream isn't a stream поток содержимого не является потоком +@msg a design holds at most {_1} objects дизайн содержит не более {_1} объектов +@msg a design needs a name дизайну нужно имя +@msg a dictionary grew too large словарь стал слишком большим +@msg a document holds at most {_1} SVG filters документ содержит не более {_1} фильтров SVG +@msg a document keeps at most {_1} graph designs документ хранит не более {_1} дизайнов диаграмм +@msg a document keeps at most {_1} saved selections документ хранит не более {_1} сохранённых выделений +@msg a document keeps at most {_1} views документ хранит не более {_1} видов +@msg a document links at most {MAX_SVG_SCRIPTS} JavaScript files документ связывает не более {MAX_SVG_SCRIPTS} файлов JavaScript +@msg a document with unsaved changes has no recovery copy у документа с несохранёнными изменениями нет копии для восстановления +@msg a feConvolveMatrix filter's order is {x}×{y}, which overflows the kernel-size multiply usvg makes порядок фильтра feConvolveMatrix равен {x}×{y}, что переполняет произведение размеров ядра, которое вычисляет usvg +@msg a font's data is too large данные шрифта слишком велики +@msg a font's subroutines are too large подпрограммы шрифта слишком велики +@msg a function declaration without a name объявление функции без имени +@msg a gradient preset is already called {n} набор градиента с именем {n} уже существует +@msg a graph has at most {_1} series, so it transposes with at most that many categories в диаграмме не более {_1} рядов, поэтому при транспонировании допускается не больше стольких же категорий +@msg a host value has too many entries в значении хоста слишком много записей +@msg a host value is nested too deep значение хоста вложено слишком глубоко +@msg a layer can't be merged into its own sublayer слой нельзя объединить с его собственным подслоем +@msg a layer's form box isn't an array рамка формы слоя не является массивом +@msg a layer's form can't be read форму слоя невозможно прочитать +@msg a layer's form has no box у формы слоя нет рамки +@msg a layer's form has no dictionary у формы слоя нет словаря +@msg a legend draws at most {MAX_CHIPS} swatches легенда рисует не более {MAX_CHIPS} образцов +@msg a name names one asset: give multiple: false, or one object имя обозначает один ресурс: укажите multiple: false или один объект +@msg a namespace declaration uses a reserved prefix or URI объявление пространства имён использует зарезервированный префикс или URI +@msg a namespace qualifier is undefined квалификатор пространства имён не определён +@msg a namespace with an empty URI cannot have a prefix у пространства имён с пустым URI не может быть префикса +@msg a number has no digits в числе нет цифр +@msg a number's exponent has no digits в показателе степени числа нет цифр +@msg a number's fraction has no digits в дробной части числа нет цифр +@msg a page can't be read страницу невозможно прочитать +@msg a page object is used by something else объект страницы используется чем-то ещё +@msg a page thumbnail must be RGB pixels, 1 to {THUMBNAIL_SIZE} a side (got {w} × {h}) миниатюра страницы должна состоять из пикселей RGB, от 1 до {THUMBNAIL_SIZE} по стороне (получено {w} × {h}) +@msg a pattern layer doesn't end what it starts слой узора не завершает то, что начинает +@msg a pattern layer's colors hold something else цвета слоя узора содержат что-то другое +@msg a pattern named `{n}` exists узор с именем `{n}` уже существует +@msg a plug-in with id {_1} is already installed модуль с идентификатором {_1} уже установлен +@msg a preset named `{n}` exists набор с именем `{n}` уже существует +@msg a print presets file with over {_1} presets файл наборов печати, в котором больше {_1} наборов +@msg a profile is already called {n} профиль с именем {n} уже существует +@msg a property descriptor cannot have both a value or writable and a get or set дескриптор свойства не может одновременно содержать value или writable и get или set +@msg a property descriptor must be an object дескриптор свойства должен быть объектом +@msg a property's {name} must be a function or undefined {name} свойства должно быть функцией или undefined +@msg a row can't go into itself строку нельзя поместить в саму себя +@msg a series goes on the left or the right value axis ряд размещается на левой или правой оси значений +@msg a start must be an anchor index ≥ 0 or null начало должно быть индексом опорной точки ≥ 0 или null +@msg a stream in it would decode to more than 256 MB, or its decode parameters can't be applied поток в нём при декодировании занял бы больше 256 МБ, или его параметры декодирования невозможно применить +@msg a string holds a control character строка содержит управляющий символ +@msg a string holds an escape sequence JSON does not have строка содержит escape-последовательность, которой нет в JSON +@msg a string is not closed строка не закрыта +@msg a style named `{name}` already exists стиль с именем `{name}` уже существует +@msg a style named `{to}` already exists стиль с именем `{to}` уже существует +@msg a swatch needs a colour, gradient or pattern образцу нужен цвет, градиент или узор +@msg a symbol named `{n}` already exists символ с именем `{n}` уже существует +@msg a theme has 1 to {THEME_SIZE} colours в теме от 1 до {THEME_SIZE} цветов +@msg a theme is already called {name} (replace: "{name}" overwrites it) тема с именем {name} уже существует (replace: "{name}" перезапишет её) +@msg a toolbar name has at most {MAX_NAME} characters имя панели инструментов содержит не более {MAX_NAME} символов +@msg a view named `{_1}` exists вид с именем `{_1}` уже существует +@msg a view named `{name}` exists вид с именем `{name}` уже существует +@msg a workspace keeps at most {MAX} toolbars рабочая среда хранит не более {MAX} панелей инструментов +@msg a {_1} series can't go in a {_2} graph ряд типа {_1} нельзя поместить в диаграмму типа {_2} +@msg aiVersion {v}: "pdf" (PDF-compatible, the default) or "7" (legacy .ai, version 7) aiVersion {v}: "pdf" (совместимый с PDF, по умолчанию) или "7" (устаревший .ai, версия 7) +@msg already editing an opacity mask непрозрачная маска уже редактируется +@msg already editing another object's opacity mask уже редактируется непрозрачная маска другого объекта +@msg already in pattern editing mode режим редактирования узора уже включён +@msg an SVG filter is named by its id: give `xml` with `name` фильтр SVG называется по своему id: укажите `xml` вместе с `name` +@msg an XML element has two attributes with the same name у элемента XML два атрибута с одинаковым именем +@msg an XML value cannot be inserted into itself or its descendants значение XML нельзя вставить в само себя или в его потомков +@msg an XML value's children cannot be assigned by position дочерние элементы значения XML нельзя присваивать по позиции +@msg an XML value's children cannot be deleted by position дочерние элементы значения XML нельзя удалять по позиции +@msg an XMLList converts to XML only when it has one item XMLList преобразуется в XML, только когда содержит один элемент +@msg an XPath node test is missing отсутствует проверка узла XPath +@msg an XPath operand is missing отсутствует операнд XPath +@msg an XPath operator is missing отсутствует оператор XPath +@msg an XPath predicate or step cannot follow here предикат или шаг XPath здесь недопустим +@msg an XPath predicate or step follows a value that is not a node-set предикат или шаг XPath следует за значением, которое не является набором узлов +@msg an XPath step is missing отсутствует шаг XPath +@msg an artboard is listed twice монтажная область указана дважды +@msg an empty artboard has no width or height to scale to у пустой монтажной области нет ширины или высоты для масштабирования +@msg an image couldn't be decoded and is missing from the picture изображение не удалось декодировать, и его нет на рисунке +@msg an image is too large for DXF and was left out изображение слишком велико для DXF и пропущено +@msg an image of {_1} MB, at most {_2} MB изображение размером {_1} МБ при допустимых {_2} МБ +@msg an image of {declared_w} × {declared_h} pixels is too large to draw изображение размером {declared_w} × {declared_h} пикселей слишком велико для отрисовки +@msg an image of {width} × {height} pixels is too large to draw изображение размером {width} × {height} пикселей слишком велико для отрисовки +@msg an image of {w} × {h} pixels is too large to convert (at most {_1} pixels) изображение размером {w} × {h} пикселей слишком велико для преобразования (не более {_1} пикселей) +@msg an index must be a whole number индекс должен быть целым числом +@msg an inline graphic has no glyphs у встроенной в строку графики нет глифов +@msg an invisible text form can't be read форму невидимого текста невозможно прочитать +@msg an object is missing объект отсутствует +@msg an object's header is missing отсутствует заголовок объекта +@msg an overprinting form can't be read форму с наложением невозможно прочитать +@msg an unread object has no readable bounds у непрочитанного объекта нет читаемых границ +@msg an unread object holds a frame of threaded type непрочитанный объект содержит рамку связанного текста +@msg an unread object is missing from its layer непрочитанный объект отсутствует в своём слое +@msg anchor `smooth` must be true or false `smooth` опорной точки должно быть true или false +@msg anchor `{key}` must be [x, y] `{key}` опорной точки должно быть [x, y] +@msg anchor `{key}` must be a number `{key}` опорной точки должно быть числом +@msg angle and roundness must be finite angle и roundness должны быть конечными +@msg angles must be a list as long as pins (degrees or null) angles должно быть списком той же длины, что и pins (градусы или null) +@msg appearance must be flat|center|edge appearance должно быть flat|center|edge +@msg apply is "fill" or "stroke", not `{other}` apply принимает "fill" или "stroke", а не `{other}` +@msg apply was called on a value that is not a function apply вызван для значения, которое не является функцией +@msg area must be a closed polygon of 3 to 100000 [x, y] points area должно быть замкнутым многоугольником из 3–100000 точек [x, y] +@msg area type in a thread cannot use Dynamic Text: {frames} текст в области в связанном тексте не может использовать динамический текст: {frames} +@msg area type needs a path that encloses an area тексту в области нужен контур, охватывающий область +@msg area type {_1} is named twice текст в области {_1} указан дважды +@msg array literal too long литерал массива слишком длинный +@msg arrowAlign must be extend|tip, got {o} arrowAlign должно быть extend|tip, получено {o} +@msg arrowScale must be [start, end] arrowScale должно быть [start, end] +@msg artboard is a 0-based index artboard — индекс, отсчитываемый от 0 +@msg artboard must be a 0-based index artboard должно быть индексом, отсчитываемым от 0 +@msg artboard {i} doesn't print монтажная область {i} не печатается +@msg artboardLayout must be {layout?, columns?, spacing?, rightToLeft?} artboardLayout должно быть {layout?, columns?, spacing?, rightToLeft?} +@msg artboardLayout.columns must be 1 or more artboardLayout.columns должно быть 1 или больше +@msg artboardLayout.layout must be gridByRow, gridByColumn, row or column artboardLayout.layout должно быть gridByRow, gridByColumn, row или column +@msg artboardLayout.rightToLeft must be true or false artboardLayout.rightToLeft должно быть true или false +@msg artboardLayout.spacing must be 0–{MAX_SPACING} pt artboardLayout.spacing должно быть 0–{MAX_SPACING} pt +@msg artboards must be a non-empty list artboards должно быть непустым списком +@msg artboards must be a number artboards должно быть числом +@msg asset `{_1}` has no art to export в ресурсе `{_1}` нет графики для экспорта +@msg assignment to a constant binding присваивание константной привязке +@msg at least one row that isn't excluded needs a weight above 0 хотя бы одной неисключённой строке нужен вес больше 0 +@msg at most {MAX_KEYWORDS} keywords не более {MAX_KEYWORDS} ключевых слов +@msg at most {MAX_MATCHES} matches are kept сохраняется не более {MAX_MATCHES} совпадений +@msg at most {MAX_POINTS} points не более {MAX_POINTS} точек +@msg at most {MAX_QUEUE} files не более {MAX_QUEUE} файлов +@msg at must be [x, y] at должно быть [x, y] +@msg at/rect lie outside the canvas at/rect находятся за пределами холста +@msg attribute must be size|leading|tracking|kerning|baselineShift attribute должно быть size|leading|tracking|kerning|baselineShift +@msg attrs must be an object attrs должно быть объектом +@msg automation path rejected: the folder's name isn't valid text путь автоматизации отклонён: имя папки не является допустимым текстом +@msg automation path rejected: {_1} isn't valid text путь автоматизации отклонён: {_1} не является допустимым текстом +@msg automation path rejected: {why}: {path} путь автоматизации отклонён: {why}: {path} +@msg axis must be "vertical", "horizontal" or an angle in degrees, not `{given}` axis должно быть "vertical", "horizontal" или углом в градусах, а не `{given}` +@msg backgroundContents must be transparent or white backgroundContents должно быть transparent или white +@msg bad AES key недопустимый ключ AES +@msg bad `runs`: {e} недопустимое `runs`: {e} +@msg bad arrowScale недопустимое arrowScale +@msg bad base64 недопустимый base64 +@msg bad color {c} недопустимый цвет {c} +@msg bad colour недопустимый цвет +@msg bad colour in `colors` недопустимый цвет в `colors` +@msg bad colour {v} недопустимый цвет {v} +@msg bad colour {v} in groupColors недопустимый цвет {v} в groupColors +@msg bad cross-reference entry недопустимая запись перекрёстных ссылок +@msg bad cross-reference table недопустимая таблица перекрёстных ссылок +@msg bad current colour {v} недопустимый текущий цвет {v} +@msg bad dataBase64 недопустимое dataBase64 +@msg bad edit недопустимая правка +@msg bad fill {v} недопустимая заливка {v} +@msg bad fit: {e} недопустимое fit: {e} +@msg bad model {other} (keep, new or document) недопустимая модель {other} (keep, new или document) +@msg bad new colour {v} недопустимый новый цвет {v} +@msg bad object недопустимый объект +@msg bad object number недопустимый номер объекта +@msg bad offset недопустимое смещение +@msg bad path data: {e} недопустимые данные контура: {e} +@msg bad point {v}: expected [x, y] недопустимая точка {v}: ожидается [x, y] +@msg bad point {v}: expected [x, y] or [x, y, pressure] недопустимая точка {v}: ожидается [x, y] или [x, y, pressure] +@msg bad reference недопустимая ссылка +@msg bad trailer size недопустимый размер в трейлере +@msg bad {k} colour недопустимый цвет {k} +@msg batches cannot nest пакеты нельзя вкладывать друг в друга +@msg bind something to a variable first сначала привяжите что-нибудь к переменной +@msg bleed must be 0–{MAX_BLEED} pt: a number, [top, bottom, left, right] or {{top, bottom, left, right}} bleed должно быть 0–{MAX_BLEED} pt: число, [top, bottom, left, right] или {{top, bottom, left, right}} +@msg blend must be a mode name blend должно быть названием режима +@msg both sides of an XPath | must select nodes обе стороны оператора | в XPath должны выбирать узлы +@msg brush must be a name or null brush должно быть именем или null +@msg by must be a number by должно быть числом +@msg can't add page thumbnails: {why} невозможно добавить миниатюры страниц: {why} +@msg can't add the editing data for other apps: {why} невозможно добавить данные редактирования для других приложений: {why} +@msg can't edit the written PDF: {why} невозможно изменить записанный PDF: {why} +@msg can't encrypt the PDF: {why} невозможно зашифровать PDF: {why} +@msg can't linearise the PDF: {why} невозможно линеаризовать PDF: {why} +@msg can't open `{_1}`: {_2} невозможно открыть `{_1}`: {_2} +@msg can't open `{_1}`: {e} невозможно открыть `{_1}`: {e} +@msg can't open `{name}`: not a format VectorCraft reads (see document.formats) невозможно открыть `{name}`: VectorCraft не читает этот формат (см. document.formats) +@msg can't place `{name}`: not a format VectorCraft reads (see document.formats) невозможно поместить `{name}`: VectorCraft не читает этот формат (см. document.formats) +@msg can't read back the written PDF: {e} невозможно прочитать записанный PDF: {e} +@msg can't read this Word document: {why} невозможно прочитать этот документ Word: {why} +@msg can't write .{e} images: use .png, .jpg, .gif, .webp, .tif or .bmp невозможно записать изображения .{e}: используйте .png, .jpg, .gif, .webp, .tif или .bmp +@msg can't write PDF layers, overprint or invisible text: {why} невозможно записать слои PDF, наложение или невидимый текст: {why} +@msg can't write the file's copyright: {why} невозможно записать сведения об авторских правах файла: {why} +@msg can't write the file's modification date: {why} невозможно записать дату изменения файла: {why} +@msg can't write the pages' user units: {why} невозможно записать пользовательские единицы страниц: {why} +@msg canceled отменено +@msg cannot convert the object to a primitive value объект невозможно преобразовать в примитивное значение +@msg cannot convert undefined or null to an object undefined или null невозможно преобразовать в объект +@msg cannot distort a zero-size or non-finite bounding box невозможно исказить ограничивающую рамку нулевого или неконечного размера +@msg cannot move an object into itself объект нельзя переместить в самого себя +@msg case must be upper|lower|title|sentence case должно быть upper|lower|title|sentence +@msg category `{c}`: one of {_1} категория `{c}`: одно из: {_1} +@msg center must be [x, y] center должно быть [x, y] +@msg character dimensions cannot be represented with the source text transform размеры символов невозможно представить с трансформацией исходного текста +@msg character dimensions cannot be represented with the target text transform размеры символов невозможно представить с трансформацией целевого текста +@msg choose at least one artboard выберите хотя бы одну монтажную область +@msg choose at least one status выберите хотя бы одно состояние +@msg clip must be true or false clip должно быть true или false +@msg clippingMask must be true or false clippingMask должно быть true или false +@msg closed must be a boolean closed должно быть логическим значением +@msg collapsed must be true or false collapsed должно быть true или false +@msg color.profile: no RGB or CMYK profile is called “{profile}” color.profile: нет профиля RGB или CMYK с именем «{profile}» +@msg colorMode must be rgb or cmyk, not `{m}` colorMode должно быть rgb или cmyk, а не `{m}` +@msg colorModel must be {own} (the document's mode), grayscale or bitmap colorModel должно быть {own} (режим документа), grayscale или bitmap +@msg colour groups can't go into colour groups цветовые группы нельзя помещать в цветовые группы +@msg colour, mode and spot apply to solid-colour swatches only colour, mode и spot применяются только к образцам сплошного цвета +@msg column {column}: `{cell}` is a `%` column of graph data files, which are not read столбец {column}: `{cell}` — столбец `%` из файлов данных диаграмм, которые не читаются +@msg column {column}: `{cell}` names `{name}`, which is a {_1} variable столбец {column}: `{cell}` указывает `{name}`, а это переменная типа {_1} +@msg column {column}: `{cell}` names no variable столбец {column}: `{cell}` не указывает ни одной переменной +@msg column {column}: the variable name is longer than {MAX_NAME} characters столбец {column}: имя переменной длиннее {MAX_NAME} символов +@msg column: true floats the whole column and takes no onto, above or below column: true делает плавающим весь столбец и не принимает onto, above или below +@msg command must be a shape.* command command должно быть командой shape.* +@msg commands[{i}]: missing `command` commands[{i}]: отсутствует `command` +@msg composer must be "singleLine" or "everyLine" composer должно быть "singleLine" или "everyLine" +@msg compound shapes take paths, compound paths, groups, compound shapes, type, blends and envelopes составные фигуры принимают контуры, составные контуры, группы, составные фигуры, текст, переходы и оболочки +@msg compound {_1} must contain exactly one open path to join составной объект {_1} должен содержать ровно один открытый контур для соединения +@msg connect end must be "start" or "end" end для connect должно быть "start" или "end" +@msg connect needs a path other than the one extended для connect нужен контур, отличный от продлеваемого +@msg connect needs id для connect нужен id +@msg connect path has no open end у контура для connect нет открытого конца +@msg continuation must be an array of path chunks continuation должно быть массивом фрагментов контура +@msg continuation requires points для continuation нужны points +@msg copy needs path: the file to copy into the document's folder для copy нужен path: файл, который копируется в папку документа +@msg copy takes images only: relink placed documents where their files are copy принимает только изображения: восстанавливайте связь помещённых документов там, где находятся их файлы +@msg copying a file isn't available on the web копирование файла недоступно в веб-версии +@msg copyrightStatus must be unknown, copyrighted or publicDomain copyrightStatus должно быть unknown, copyrighted или publicDomain +@msg copyrightUrl must be a URL (no spaces, at most 2048 characters) copyrightUrl должно быть URL-адресом (без пробелов, не более 2048 символов) +@msg corners must be 4 [x, y] points (TL, TR, BR, BL) corners должно быть 4 точками [x, y] (TL, TR, BR, BL) +@msg counterPer `{c}`: item or file counterPer `{c}`: item или file +@msg crop `{_1}`: only PDF pages have art, trim, bleed and media boxes; use "crop" or "bounding" crop `{_1}`: рамки art, trim, bleed и media есть только у страниц PDF; используйте "crop" или "bounding" +@msg crop rectangle doesn't overlap the image прямоугольник обрезки не пересекается с изображением +@msg cross-reference and object streams aren't supported потоки перекрёстных ссылок и потоки объектов не поддерживаются +# Messages that begin with a lowercase word, d to m. +@msg damaged compressed data: {e} повреждённые сжатые данные: {e} +@msg dash lengths must be numbers, got {v} длины штрихов должны быть числами, получено {v} +@msg dash must be a list of lengths or null, got {v} dash должно быть списком длин или null, получено {v} +@msg data key `{k}`: letters, digits, -, _ and . (not name or vc-…) ключ данных `{k}`: буквы, цифры, -, _ и . (но не name и не vc-…) +@msg data must be an object of key: value, not {v} data должно быть объектом из пар key: value, а не {v} +@msg data set `{name}` holds a value for `{var}`, which the library doesn't declare набор данных `{name}` содержит значение для `{var}`, а библиотека не объявляет эту переменную +@msg data set `{name}` holds two values for `{var}` набор данных `{name}` содержит два значения для `{var}` +@msg data set `{name}` is declared twice набор данных `{name}` объявлен дважды +@msg data takes at most {MAX_DATA} keys at once data принимает не более {MAX_DATA} ключей за раз +@msg dataset `{name}` already exists набор данных `{name}` уже существует +@msg dataset `{to}` already exists набор данных `{to}` уже существует +@msg date `{d}`: YYYY-MM-DD дата `{d}`: YYYY-MM-DD +@msg decoded data is too large декодированные данные слишком велики +@msg define a variable first сначала определите переменную +@msg detect must be true or false detect должно быть true или false +@msg direct-select anchor points of a path выделите прямым выделением опорные точки контура +@msg distance must be > 0 distance должно быть > 0 +@msg dx and dy give the arrow's direction dx и dy задают направление стрелки +@msg dx and dy must be numbers dx и dy должны быть числами +@msg dxf fitTo must be [width, height], positive dxf fitTo должно быть [width, height] с положительными значениями +@msg dxf must be an object of DXF import options dxf должно быть объектом с параметрами импорта DXF +@msg dxf scale must be a positive number up to {_1}, not {s} dxf scale должно быть положительным числом не больше {_1}, а не {s} +@msg dxf unit `{u}`: a unit such as mm, cm, in or pt dxf unit `{u}`: единица, например mm, cm, in или pt +@msg dxf: {e} dxf: {e} +@msg each format is an object {format, scale?, suffix?} каждый формат — объект {format, scale?, suffix?} +@msg each item needs an id каждому элементу нужен id +@msg each match needs `kind` каждому совпадению нужно `kind` +@msg each match needs a `name` каждому совпадению нужно `name` +@msg each of `fonts` is {family, style?}; 1 to 1000 of them каждый элемент `fonts` — {family, style?}; от 1 до 1000 элементов +@msg each of `items` is {kind, item} каждый элемент `items` — {kind, item} +@msg each of `items` is {{id, corners?}} with an object id, not {it} каждый элемент `items` — {{id, corners?}} с идентификатором объекта, а не {it} +@msg each path chunk must contain 1 to 4096 points каждый фрагмент контура должен содержать от 1 до 4096 точек +@msg each pick is {{at: [x, y]}} or {{rect: [x0, y0, x1, y1]}} (got {v}) каждый выбор — {{at: [x, y]}} или {{rect: [x0, y0, x1, y1]}} (получено {v}) +@msg each row needs `from` каждой строке нужно `from` +@msg each stop needs a position каждой точке перехода нужно положение +@msg each subpath needs an anchors array каждому вложенному контуру нужен массив anchors +@msg each weight must be a number of 0 or more (got {v}) каждый вес должен быть числом, 0 или больше (получено {v}) +@msg easingType must be easeIn, easeOut, easeInOut or easeOutIn easingType должно быть easeIn, easeOut, easeInOut или easeOutIn +@msg editingData must be true or false editingData должно быть true или false +@msg editingData must be true, false or "always" editingData должно быть true, false или "always" +@msg edits overlap правки перекрываются +@msg effects of objects whose appearances differ can't be moved together эффекты объектов с разным оформлением нельзя перемещать вместе +@msg empty header in column {_1} пустой заголовок в столбце {_1} +@msg encoding `{_1}`: utf8 or utf16 кодировка `{_1}`: utf8 или utf16 +@msg ends must be two of "first" and "last" ends должно быть двумя значениями из "first" и "last" +@msg every numbered name for the result is taken все нумерованные имена для результата заняты +@msg expanded SVG styles exceed the import size limit развёрнутые стили SVG превышают ограничение размера импорта +@msg export presets file is larger than {MAX_PRESET_FILE_BYTES} bytes файл наборов настроек экспорта больше {MAX_PRESET_FILE_BYTES} байт +@msg exportText must be editable or appearance exportText должно быть editable или appearance +@msg exportType must be movieClip or graphic, not `{s}` exportType должно быть movieClip или graphic, а не `{s}` +@msg extend needs id для extend нужен id +@msg featureChanges lists at most {MAX_FEATURE_CHANGES} tags featureChanges содержит не более {MAX_FEATURE_CHANGES} тегов +@msg featureChanges must be a list of tags featureChanges должно быть списком тегов +@msg features must be a list of tags features должно быть списком тегов +@msg fidelity must be 0..100 fidelity должно быть 0..100 +@msg files must be {name, dataBase64} files должно быть {name, dataBase64} +@msg finally table {t} out of range таблица finally {t} вне диапазона +@msg fit must be none|autoHeight|shrinkText|block, got {id} fit должно быть none|autoHeight|shrinkText|block, получено {id} +@msg flags cannot be given with a RegExp object флаги нельзя указывать вместе с объектом RegExp +@msg flattener: {e} объединение: {e} +@msg flattenerPreset `{name}`: high, medium, low or a saved one (see flattener.presets.list) flattenerPreset `{name}`: high, medium, low или сохранённый набор (см. flattener.presets.list) +@msg flipProfile must be along|across, got {o} flipProfile должно быть along|across, получено {o} +@msg folders `{f}`: none, rows, format, item or itemFormat folders `{f}`: none, rows, format, item или itemFormat +@msg folders deeper than {MAX_BATCH_DEPTH} levels папки глубже {MAX_BATCH_DEPTH} уровней +@msg folders deeper than {MAX_DEPTH} levels папки глубже {MAX_DEPTH} уровней +@msg font family `{family}` is not available семейство шрифтов `{family}` недоступно +@msg font family `{tf}` is not available семейство шрифтов `{tf}` недоступно +@msg format `{f}`: pdf or postscript формат `{f}`: pdf или postscript +@msg format `{f}`: text or json формат `{f}`: text или json +@msg format is `{format}` формат: `{format}` +@msg formats must be an array of rows, not {v} formats должно быть массивом строк, а не {v} +@msg frequency must be between 1 and 300 lines per inch frequency должно быть от 1 до 300 линий на дюйм +@msg from and to must be finite from и to должны быть конечными +@msg from must be [x0, y0, x1, y1] from должно быть [x0, y0, x1, y1] +@msg function declaration index out of range индекс объявления функции вне диапазона +@msg give `before` or `after`, not both укажите `before` или `after`, но не оба +@msg give `char`, `text`, `code` or `unicode` укажите `char`, `text`, `code` или `unicode` +@msg give `colors`, or `color` and `rule` укажите `colors` либо `color` и `rule` +@msg give `count` or `spacing`, not both укажите `count` или `spacing`, но не оба +@msg give `event`, such as onclick укажите `event`, например onclick +@msg give `file`, the JavaScript file's path or URL укажите `file` (путь или URL файла JavaScript) +@msg give `fill` and/or `stroke` укажите `fill` и/или `stroke` +@msg give `fill`, `stroke` or both укажите `fill`, `stroke` или оба +@msg give `folder` укажите `folder` +@msg give `fonts`, or open a document укажите `fonts` или откройте документ +@msg give `from` or `indices`, not both укажите `from` или `indices`, но не оба +@msg give `id` (no text is being edited) укажите `id` (текст сейчас не редактируется) +@msg give `id` and `anchors`, or `items`, not both укажите `id` и `anchors` либо `items`, но не то и другое +@msg give `id` or `guide`, not both укажите `id` или `guide`, но не оба +@msg give `length` or `to` укажите `length` или `to` +@msg give `matches`: [{kind, name, target}] укажите `matches`: [{kind, name, target}] +@msg give `name` (or edit a pattern) укажите `name` (или редактируйте узор) +@msg give `name` or `names` укажите `name` или `names` +@msg give `name`, an SVG filter's name укажите `name` (имя фильтра SVG) +@msg give `path` (a .wasm file) or `dataBase64` (the module) укажите `path` (файл .wasm) или `dataBase64` (модуль) +@msg give `path`, `data` or `dataBase64` укажите `path`, `data` или `dataBase64` +@msg give `path`, `data`, `dataBase64` or `csv` укажите `path`, `data`, `dataBase64` или `csv` +@msg give `path`, `xml` or `dataBase64` укажите `path`, `xml` или `dataBase64` +@msg give `path`, an SVG file, or `svg`, SVG text укажите `path` (файл SVG) или `svg` (текст SVG) +@msg give `script`, the JavaScript the event runs ("" removes the event) укажите `script` (код JavaScript, который выполняет событие; "" удаляет событие) +@msg give `text` (the reading) or `remove` укажите `text` (чтение) или `remove` +@msg give `x` and `y` (and a `tolerance` of 0 or more) укажите `x` и `y` (и `tolerance`, 0 или больше) +@msg give `xml`, one SVG element укажите `xml` (один элемент SVG ) +@msg give a mode or r/g/b, c/m/y/k, gray or tint adjustments укажите режим или коррекции r/g/b, c/m/y/k, gray или tint +@msg give a name, or paint the active proxy with a saved preset укажите имя или закрасьте активный индикатор сохранённым набором +@msg give a name, or select a stroke with a saved profile укажите имя или выделите обводку с сохранённым профилем +@msg give a pattern name or select an object painted with a pattern укажите имя узора или выделите объект, закрашенный узором +@msg give at least one of clip, invert, disabled, linked укажите хотя бы одно из: clip, invert, disabled, linked +@msg give color, none, swatch or gradient укажите color, none, swatch или gradient +@msg give dataBase64 укажите dataBase64 +@msg give either at (a click) or area (a path drawn around the overlaps) укажите либо at (щелчок), либо area (контур, нарисованный вокруг перекрытий) +@msg give exactly one of `at`, `rect` and `points` укажите ровно одно из: `at`, `rect` и `points` +@msg give exactly one of `path`, `data` and `dataBase64` укажите ровно одно из: `path`, `data` и `dataBase64` +@msg give formats or a preset, not both укажите formats или набор, но не оба +@msg give index or indexes, not both укажите index или indexes, но не оба +@msg give newName or delete укажите newName или delete +@msg give offset or by укажите offset или by +@msg give one element укажите один элемент +@msg give one of `to`, `rect` or `at` укажите одно из: `to`, `rect` или `at` +@msg give one of assets, layers, selection or fullDocument укажите одно из: assets, layers, selection или fullDocument +@msg give only one of onto, above, below, icon and a column place укажите только одно из: onto, above, below, icon и место в столбце +@msg give opacity or blend укажите opacity или blend +@msg give origin: [x, y], or reset: true укажите origin: [x, y] или reset: true +@msg give overprintFill, overprintStroke, showCenter, imageMap, url or note укажите overprintFill, overprintStroke, showCenter, imageMap, url или note +@msg give path (a file) or folder укажите path (файл) или folder +@msg give path, or name and dataBase64 укажите path либо name и dataBase64 +@msg give paths or files укажите paths или files +@msg give rows, rowHeight, columns or columnWidth укажите rows, rowHeight, columns или columnWidth +@msg give svg, or dataBase64 of an SVG or SVGZ file укажите svg или dataBase64 файла SVG или SVGZ +@msg give text укажите text +@msg give the asset a name дайте ресурсу имя +@msg give the preset a `name` укажите `name` набора +@msg give the preset a name дайте набору имя +@msg give the preset a name (1–64 characters) дайте набору имя (от 1 до 64 символов) +@msg give the settings to change, e.g. {"formats"}]} укажите изменяемые настройки, например {"formats"}]} +@msg give the style a name дайте стилю имя +@msg give two or more style `names` укажите в `names` два или более стиля +@msg give two or more swatches укажите два или более образца +@msg give x, y, or a handle's length or angle укажите x, y либо длину или угол маркера +@msg give {key, value} or {values} укажите {key, value} или {values} +@msg global must be true or false global должно быть true или false +@msg glyph {_1} is not drawn for {ch} with the character's style (such as All Caps, Small Caps or a numeral system) глиф {_1} не рисуется для {ch} при стиле этого символа (например, «Все прописные», «Капитель» или система счисления) +@msg glyph {g} is not an alternate of {ch} in {_1} {_2} глиф {g} не является альтернативой для {ch} в {_1} {_2} +@msg gradient must be "objects" or "mesh" gradient должно быть "objects" или "mesh" +@msg grays must be "profile" or "black", not `{g}` grays должно быть "profile" или "black", а не `{g}` +@msg gridColors must be a preset name or two colours gridColors должно быть именем набора или двумя цветами +@msg gridSize must be small, medium or large gridSize должно быть small, medium или large +@msg guide {g} is not selected направляющая {g} не выделена +@msg handle must be 0..3 handle должно быть 0..3 +@msg handler at {_1} expects {_2} values but its range starts with {d} обработчик по адресу {_1} ожидает значений: {_2}, но его диапазон начинается с {d} +@msg handler depth too large глубина обработчика слишком велика +@msg handler range {_1}..{_2} out of range диапазон обработчика {_1}..{_2} вне допустимых пределов +@msg hiddenLayers must be true or false hiddenLayers должно быть true или false +@msg hiddenObjects {v}: "layer" (the default), "omit" or "visible" hiddenObjects {v}: "layer" (по умолчанию), "omit" или "visible" +@msg highlight a layer to merge into выделите строку слоя, в который нужно объединить +@msg highlight two or more rows in one layer or group выделите две или более строки в одном слое или группе +@msg highlight two or more rows to merge выделите две или более строки для объединения +@msg hvcC hvcC +@msg icon docks a panel in the icon column: use window.panel.dock icon прикрепляет панель в столбце значков: используйте window.panel.dock +@msg id must be a dimension id id должно быть идентификатором размера +@msg image has no bounds у изображения нет границ +@msg image {_1} is linked already изображение {_1} уже связано +@msg imageMap `{m}`: none, client or server imageMap `{m}`: none, client или server +@msg images in a spot ink whose samples couldn't be read were imported in RGB изображения в плашечной краске, отсчёты которых не удалось прочитать, импортированы в RGB +@msg images past the most pixels one file may hold were left out изображения сверх наибольшего числа пикселей, допустимого для одного файла, пропущены +@msg images too large to read were left out изображения, слишком большие для чтения, пропущены +@msg index out of range индекс вне диапазона +@msg indexes may hold at most {MAX_GUIDE_INDEXES} entries indexes может содержать не более {MAX_GUIDE_INDEXES} записей +@msg indexes must be an array of guide indexes indexes должно быть массивом индексов направляющих +@msg instances must be 1..1000 instances должно быть 1..1000 +@msg instruction out of range инструкция вне диапазона +@msg instruction {pc} ({op}) pops below the stack инструкция {pc} ({op}) извлекает значения из пустого стека +@msg instruction {pc} reached with stack depths {seen} and {d} инструкция {pc} достигается с глубинами стека {seen} и {d} +@msg invalid `color` недопустимое `color` +@msg invalid anchor index {v}: expected a non-negative integer недопустимый индекс опорной точки {v}: ожидается неотрицательное целое число +@msg invalid anchor reference {v}: expected [subpath, anchor] недопустимая ссылка на опорную точку {v}: ожидается [subpath, anchor] +@msg invalid angle недопустимый угол +@msg invalid array length недопустимая длина массива +@msg invalid brush: {e} недопустимая кисть: {e} +@msg invalid color недопустимый цвет +@msg invalid colour {c} недопустимый цвет {c} +@msg invalid delta недопустимое приращение +@msg invalid group недопустимая группа +@msg invalid object id {v}: expected a non-negative integer недопустимый идентификатор объекта {v}: ожидается неотрицательное целое число +@msg invalid point недопустимая точка +@msg invalid regular expression flag '{_1}' недопустимый флаг регулярного выражения '{_1}' +@msg invalid regular expression: {m} недопустимое регулярное выражение: {m} +@msg invalid size недопустимый размер +@msg invalid t недопустимое t +@msg invalid time value недопустимое значение времени +@msg invalid tolerance недопустимый допуск +@msg is a confirm's answer, whose `value` must be true or false является ответом для confirm, `value` которого должно быть true или false +@msg is a prompt's answer, whose `value` must be a string or null является ответом для prompt, `value` которого должно быть строкой или null +@msg is an alert's answer, whose `value` must be "ok" является ответом для alert, `value` которого должно быть "ok" +@msg is longer than 16 KiB длиннее 16 KiB +@msg it draws its image through a clipping path он рисует своё изображение через контур обрезки +@msg it draws no image он не рисует изображения +@msg it is larger than {MAX_DICTIONARY_FILE_BYTES} bytes он больше {MAX_DICTIONARY_FILE_BYTES} байт +@msg it isn't a file это не файл +@msg it names {_1} plates, and at most {MAX_PLATES} are read в нём указано пластин: {_1}, а читается не более {MAX_PLATES} +@msg its art is too long or too detailed for a head его графика слишком длинна или слишком детальна для наконечника +@msg its art paints nothing его графика ничего не закрашивает +@msg its artboards all lie beyond the canvas (more than {_1} pt from the origin) все его монтажные области находятся за пределами холста (дальше {_1} pt от начала координат) +@msg its clipping masks are nested too deeply его маски обрезки вложены слишком глубоко +@msg its image is too large to read его изображение слишком велико для чтения +@msg its metadata has no description в его метаданных нет описания +@msg its metadata has no direct length у его метаданных нет прямо заданной длины +@msg its plates are too large: more than {MAX_SAMPLES} pixels together его пластины слишком велики: вместе больше {MAX_SAMPLES} пикселей +@msg its plates are too large: {_1} plates of {w} × {h} pixels его пластины слишком велики: пластин {_1}, размер каждой {w} × {h} пикселей +@msg its plates can't be kept together его пластины невозможно сохранить вместе +@msg its shapes could not be combined into one его фигуры не удалось объединить в одну +@msg join two different paths соедините два разных контура +@msg jump to {pc}, past the end переход к {pc}, за конец кода +@msg justify must be auto|left|center|right|justifyAll justify должно быть auto|left|center|right|justifyAll +@msg kbps must be a positive number, not {kbps} kbps должно быть положительным числом, а не {kbps} +@msg keywords must be a list of words or a comma-separated string keywords должно быть списком слов или строкой со словами через запятую +@msg keywords must be at most {MAX_KEYWORD} characters, without control characters каждое слово в keywords должно быть не длиннее {MAX_KEYWORD} символов и без управляющих символов +@msg kind must be 1, 2 or 3, or give a preset `name` (see perspective.presets.list) kind должно быть 1, 2 или 3, либо укажите `name` набора (см. perspective.presets.list) +@msg kind must be graphic, fillColor, strokeColor, fillGradient, strokeGradient, fillPattern, strokePattern, charStyle or paraStyle kind должно быть graphic, fillColor, strokeColor, fillGradient, strokeGradient, fillPattern, strokePattern, charStyle или paraStyle +@msg knockout must be "on", "off", "neutral" or a bool, not {v} knockout должно быть "on", "off", "neutral" или логическим значением, а не {v} +@msg layer `{name}` has no art to export в слое `{name}` нет графики для экспорта +@msg layer must name a layer or sublayer layer должно указывать слой или подслой +@msg layers can't be intertwined: select the objects in them слои нельзя переплести: выделите объекты в них +@msg layers go only at the top level or in layers, objects in layers and groups слои могут находиться только на верхнем уровне или в слоях, а объекты — в слоях и группах +@msg layers must be true or false layers должно быть true или false +@msg layout must be gridByRow, gridByColumn, row or column layout должно быть gridByRow, gridByColumn, row или column +@msg leading must be a number or "auto" leading должно быть числом или "auto" +@msg left/right must be non-negative widths left/right должны быть неотрицательными значениями ширины +@msg legacyNameEncoding must be one of {_1} legacyNameEncoding должно быть одним из: {_1} +@msg level `{t}`: 2 or 3 уровень `{t}`: 2 или 3 +@msg line {line}: more than {MAX_CSV_COLS} columns строка {line}: больше {MAX_CSV_COLS} столбцов +@msg line {line}: unclosed quote строка {line}: незакрытая кавычка +@msg line {line}: value for `{var}` must match its variable kind строка {line}: значение `{var}` должно соответствовать типу переменной +@msg lineEndings `{other}`: lf or crlf lineEndings `{other}`: lf или crlf +@msg loading profiles from disk isn't available in the browser загрузка профилей с диска недоступна в браузере +@msg localize: the first argument must be a localization object or a string localize: первый аргумент должен быть объектом локализации или строкой +@msg margin: a {m} pt margin leaves no imageable area on the paper margin: поле {m} pt не оставляет на бумаге области печати +@msg matrix must be finite and invertible, depth finite matrix должно быть конечной и обратимой матрицей, а depth — конечным +@msg matte: {e} matte: {e} +@msg member is for order front, forward, backward or back member используется для order front, forward, backward или back +@msg missing `artboards` отсутствует `artboards` +@msg missing `at` [x, y] отсутствует `at` [x, y] +@msg missing `attrs` отсутствует `attrs` +@msg missing `color` or `opacity` отсутствует `color` или `opacity` +@msg missing `colors` отсутствует `colors` +@msg missing `commands` отсутствует `commands` +@msg missing `destinationFolder` отсутствует `destinationFolder` +@msg missing `effect` id отсутствует идентификатор `effect` +@msg missing `family` отсутствует `family` +@msg missing `find` отсутствует `find` +@msg missing `gid` (a glyph id, or null for the default glyph) отсутствует `gid` (идентификатор глифа или null для глифа по умолчанию) +@msg missing `group` отсутствует `group` +@msg missing `id` отсутствует `id` +@msg missing `id`: give one, or select one type object отсутствует `id`: укажите его или выделите один текстовый объект +@msg missing `index` (a point index, or null to clear) отсутствует `index` (индекс точки или null для сброса) +@msg missing `index` (a stop index, or null to clear) отсутствует `index` (индекс точки перехода или null для сброса) +@msg missing `index` (an item index or null) отсутствует `index` (индекс элемента или null) +@msg missing `item` отсутствует `item` +@msg missing `library` отсутствует `library` +@msg missing `library` (see graphicStyle.libraries) отсутствует `library` (см. graphicStyle.libraries) +@msg missing `library` (see swatch.library.list) отсутствует `library` (см. swatch.library.list) +@msg missing `map` (rows [{from, to}] or {current}) отсутствует `map` (строки [{from, to}] или {current}) +@msg missing `matrix` [a,b,c,d,e,f] отсутствует `matrix` [a,b,c,d,e,f] +@msg missing `name` (see gradient.presets.list) отсутствует `name` (см. gradient.presets.list) +@msg missing `offset` (a distance in points) отсутствует `offset` (расстояние в пунктах) +@msg missing `path` отсутствует `path` +@msg missing `path` (a path object id) отсутствует `path` (идентификатор объекта-контура) +@msg missing `picks` отсутствует `picks` +@msg missing `rule` отсутствует `rule` +@msg missing `source` id отсутствует идентификатор `source` +@msg missing `start` (the byte offset of a character) отсутствует `start` (смещение символа в байтах) +@msg missing `status`: linked, embedded, missing or modified отсутствует `status`: linked, embedded, missing или modified +@msg missing `target` id отсутствует идентификатор `target` +@msg missing `text` отсутствует `text` +@msg missing `to` отсутствует `to` +@msg missing `to` (an index) отсутствует `to` (индекс) +@msg missing `to`: a non-negative integer отсутствует `to`: неотрицательное целое число +@msg missing `type` отсутствует `type` +@msg missing `value` отсутствует `value` +@msg missing `word` отсутствует `word` +@msg missing `{key}` отсутствует `{key}` +@msg missing `{k}` отсутствует `{k}` +@msg missing anchor отсутствует anchor +@msg missing anchors отсутствует anchors +@msg missing anchors [[subpath, anchor]…] отсутствует anchors [[subpath, anchor]…] +@msg missing array `{key}` отсутствует массив `{key}` +@msg missing case отсутствует case +@msg missing color отсутствует color +@msg missing commands отсутствует commands +@msg missing destination folder отсутствует папка назначения +@msg missing from отсутствует from +@msg missing group отсутствует group +@msg missing id or ids отсутствует id или ids +@msg missing ids отсутствует ids +@msg missing indexes отсутствует indexes +@msg missing matrix [a,b,c,d,e,f] отсутствует matrix [a,b,c,d,e,f] +@msg missing name отсутствует name +@msg missing op отсутствует op +@msg missing or invalid `color` `color` отсутствует или недопустимо +@msg missing or unknown `tool` `tool` отсутствует или неизвестно +@msg missing point отсутствует point +@msg missing point [x,y] отсутствует point [x,y] +@msg missing point `{key}` ([x, y]) отсутствует точка `{key}` ([x, y]) +@msg missing points отсутствует points +@msg missing points [[x,y]…] отсутствует points [[x,y]…] +@msg missing segment отсутствует segment +@msg missing stops отсутствует stops +@msg missing subpaths отсутствует subpaths +@msg missing target отсутствует target +@msg missing to отсутствует to +@msg missing x, y отсутствуют x, y +@msg mode is set, add or toggle, not `{other}` mode принимает set, add или toggle, а не `{other}` +@msg mode must be "cmyk" or "rgb" mode должно быть "cmyk" или "rgb" +@msg mode must be area|onPath, got {o} mode должно быть area|onPath, получено {o} +@msg more than 10000 linked files: package dependencies in smaller parts больше 10000 связанных файлов: упаковывайте зависимости меньшими частями +@msg more than 256 commands больше 256 команд +@msg more than {MAX_BATCH_FILES} data sets больше {MAX_BATCH_FILES} наборов данных +@msg more than {MAX_BATCH_FILES} files больше {MAX_BATCH_FILES} файлов +@msg more than {MAX_CSV_ROWS} data rows больше {MAX_CSV_ROWS} строк данных +@msg more than {MAX_FILES} images больше {MAX_FILES} изображений +@msg more than {MAX_IMPORT} presets больше {MAX_IMPORT} наборов +@msg moved must be [[x,y]…] moved должно быть [[x,y]…] +@msg must be an object with `kind` and `value` должен быть объектом с `kind` и `value` +@msg must have `kind` alert, confirm or prompt должен иметь `kind` alert, confirm или prompt +@msg must have exactly `kind` and `value` должен содержать только `kind` и `value` +# Messages that begin with a lowercase word, n to s. +@msg name (a toolbar's name) is required требуется name (имя панели инструментов) +@msg name (a toolbar's name) must be a string name (имя панели инструментов) должно быть строкой +@msg name must be a toolbar's name name должно быть именем панели инструментов +@msg names is empty names пусто +@msg names must be an array of symbol names names должно быть массивом имён символов +@msg need `anchor` or `segment` + `t` нужно `anchor` или `segment` + `t` +@msg need at least one anchor нужна хотя бы одна опорная точка +@msg need at least one point нужна хотя бы одна точка +@msg need at least two points нужны хотя бы две точки +@msg needs a closing quote after the name нужна закрывающая кавычка после имени +@msg needs a name нужно имя +@msg needs a name of at most 64 bytes нужно имя длиной не более 64 байт +@msg needs a name of letters, digits and _, or a quoted name нужно имя из букв, цифр и _ либо имя в кавычках +@msg needs a name without control characters нужно имя без управляющих символов +@msg needs points нужны points +@msg nesting too deep слишком глубокая вложенность +@msg nineSlice must be true or false nineSlice должно быть true или false +@msg nineSliceGuides must be [left, top, right, bottom], each -16..16, with left + right < 1 and top + bottom < 1 nineSliceGuides должно быть [left, top, right, bottom], каждое значение -16..16, при этом left + right < 1 и top + bottom < 1 +@msg no HP-GL format нет формата HP-GL +@msg no New Document profile called `{shown}` ({_1}) нет профиля нового документа с именем `{shown}` ({_1}) +@msg no PDF preset named `{n}` нет набора PDF с именем `{n}` +@msg no SVG filter at index {k} нет фильтра SVG с индексом {k} +@msg no action set is current нет текущего набора действий +@msg no active data set нет активного набора данных +@msg no appearance item {index} нет элемента оформления {index} +@msg no arrowheads file here здесь нет файла стрелок +@msg no artboard {_1} нет монтажной области {_1} +@msg no artboard {artboard} (0-based; the document has {_1}) нет монтажной области {artboard} (отсчёт от 0; всего в документе: {_1}) +@msg no asset {id} нет ресурса {id} +@msg no asset {id} (see assets.list) нет ресурса {id} (см. assets.list) +@msg no assets to export нет ресурсов для экспорта +@msg no assets yet: collect art for export first (assets.add) ресурсов пока нет: сначала соберите графику для экспорта (assets.add) +@msg no brush named `{n}` нет кисти с именем `{n}` +@msg no character at byte {start} нет символа по байту {start} +@msg no character has code {code} нет символа с кодом {code} +@msg no colour нет цвета +@msg no colour group `{group}` нет цветовой группы `{group}` +@msg no colour group `{name}` нет цветовой группы `{name}` +@msg no custom arrowhead {name} (see stroke.arrowheads.list) нет пользовательской стрелки {name} (см. stroke.arrowheads.list) +@msg no data sets нет наборов данных +@msg no dataset named `{from}` нет набора данных с именем `{from}` +@msg no dataset named `{name}` нет набора данных с именем `{name}` +@msg no datasets нет наборов данных +@msg no design named `{name}` нет дизайна с именем `{name}` +@msg no design named `{n}` нет дизайна с именем `{n}` +@msg no design named `{old}` нет дизайна с именем `{old}` +@msg no encoder for {_1} yet кодировщика для {_1} пока нет +@msg no export preset `{name}` (see document.exportPresets.list) нет набора настроек экспорта `{name}` (см. document.exportPresets.list) +@msg no file to open нет файла для открытия +@msg no folder: pass `path` or set Preferences › Plug-ins & Scratch Disks › Additional Plug-ins Folder нет папки: передайте `path` или задайте «Настройки › Модули & Рабочие диски › Папка дополнительных модулей» +@msg no fonts to look for: they are all available нет шрифтов для поиска: все они доступны +@msg no formats to export нет форматов для экспорта +@msg no gradient preset `{name}` (see gradient.presets.list) нет набора градиента `{name}` (см. gradient.presets.list) +@msg no graphic style `{n}` in `{_1}` нет графического стиля `{n}` в `{_1}` +@msg no graphic style library `{key}` (see graphicStyle.libraries) нет библиотеки графических стилей `{key}` (см. graphicStyle.libraries) +@msg no guide selected направляющая не выделена +@msg no guide selected (or give an index) направляющая не выделена (или укажите индекс) +@msg no guide {i} нет направляющей {i} +@msg no images in the folder в папке нет изображений +@msg no instructions нет инструкций +@msg no item at index {_1} нет элемента с индексом {_1} +@msg no item at index {from} нет элемента с индексом {from} +@msg no item at one of the indices {idx} нет элемента по одному из индексов {idx} +@msg no layer нет слоя +@msg no layer to rename нет слоя для переименования +@msg no layer {id} (see layer.list) нет слоя {id} (см. layer.list) +@msg no layers to export нет слоёв для экспорта +@msg no library `{key}` нет библиотеки `{key}` +@msg no metafile format нет формата метафайла +@msg no object {_1} нет объекта {_1} +@msg no objects нет объектов +@msg no parent layer нет родительского слоя +@msg no perspective grid preset named `{b}` (see perspective.presets.list) нет набора сетки перспективы с именем `{b}` (см. perspective.presets.list) +@msg no perspective grid preset named `{n}` нет набора сетки перспективы с именем `{n}` +@msg no point selected (give `index`) точка не выделена (укажите `index`) +@msg no preset called `{from}` (see file.newPresets) нет набора с именем `{from}` (см. file.newPresets) +@msg no preset called `{name}` (see file.newPresets) нет набора с именем `{name}` (см. file.newPresets) +@msg no preset named `{n}` нет набора с именем `{n}` +@msg no print preset named `{b}` (see print.presets.list) нет набора печати с именем `{b}` (см. print.presets.list) +@msg no print preset named `{name}` (presets: {_1}) нет набора печати с именем `{name}` (наборы: {_1}) +@msg no print preset named `{n}` нет набора печати с именем `{n}` +@msg no profile named `{name}` нет профиля с именем `{name}` +@msg no random numbers ({e}) нет случайных чисел ({e}) +@msg no readable files in the folder в папке нет читаемых файлов +@msg no recovery copy `{f}` (see file.recovery.list) нет копии восстановления `{f}` (см. file.recovery.list) +@msg no rows нет строк +@msg no saved PDF preset named `{name}` нет сохранённого набора PDF с именем `{name}` +@msg no saved export preset `{name}` нет сохранённого набора настроек экспорта `{name}` +@msg no saved gradient preset called {name} нет сохранённого набора градиента с именем {name} +@msg no saved gradient presets нет сохранённых наборов градиента +@msg no saved preset called `{name}` нет сохранённого набора с именем `{name}` +@msg no saved presets to export (name [Default] in `names` to export it) нет сохранённых наборов для экспорта (укажите [Default] в `names`, чтобы экспортировать его) +@msg no saved presets to export (name built-in ones in `names`) нет сохранённых наборов для экспорта (встроенные укажите в `names`) +@msg no saved print preset named `{name}` нет сохранённого набора печати с именем `{name}` +@msg no saved profile called {name} нет сохранённого профиля с именем {name} +@msg no saved selection `{name}` нет сохранённого выделения `{name}` +@msg no saved theme called {name} (see colorTheme.list) нет сохранённой темы с именем {name} (см. colorTheme.list) +@msg no saved views нет сохранённых видов +@msg no selected or given object has a visible 3D effect ни у одного выделенного или указанного объекта нет видимого 3D-эффекта +@msg no series {i} нет ряда {i} +@msg no slice {n} in the image (see slice.list) в изображении нет фрагмента {n} (см. slice.list) +@msg no source art нет исходной графики +@msg no stop {i} (the gradient has {n}) нет точки перехода {i} (всего в градиенте: {n}) +@msg no style `{name}` нет стиля `{name}` +@msg no such artboard {v} монтажная область {v} не существует +@msg no such assets (see assets.list) таких ресурсов нет (см. assets.list) +@msg no such frame anchor, or the frame would reach past the canvas такой опорной точки рамки нет, или рамка вышла бы за пределы холста +@msg no such objects таких объектов нет +@msg no such path anchor, or the path would reach past the canvas такой опорной точки контура нет, или контур вышел бы за пределы холста +@msg no such rows таких строк нет +@msg no swatch `{keep}` нет образца `{keep}` +@msg no swatch `{n}` нет образца `{n}` +@msg no swatch `{n}` (swatches and colour groups move separately) нет образца `{n}` (образцы и цветовые группы перемещаются отдельно) +@msg no swatch library `{key}` (see swatch.library.list) нет библиотеки образцов `{key}` (см. swatch.library.list) +@msg no swatch library `{key}` (see swatch.library.list; "document": the document's swatches) нет библиотеки образцов `{key}` (см. swatch.library.list; "document": образцы документа) +@msg no swatch library `{key}` (see swatch.library.list; "{DOCUMENT_SWATCHES}": the document's swatches) нет библиотеки образцов `{key}` (см. swatch.library.list; "{DOCUMENT_SWATCHES}": образцы документа) +@msg no swatch named `{n}` нет образца с именем `{n}` +@msg no swatch or colour group `{n}` нет образца или цветовой группы `{n}` +@msg no swatch or colour group `{n}` in `{_1}` нет образца или цветовой группы `{n}` в `{_1}` +@msg no symbol named `{_1}` нет символа с именем `{_1}` +@msg no symbol named `{name}` нет символа с именем `{name}` +@msg no text objects selected текстовые объекты не выделены +@msg no toolbar named `{_1}` нет панели инструментов с именем `{_1}` +@msg no toolbar named `{name}` нет панели инструментов с именем `{name}` +@msg no tracing preset `{preset}` (see imageTrace.presets) нет набора трассировки `{preset}` (см. imageTrace.presets) +@msg no user library folder here (save with a path, or without one to get the data) здесь нет папки пользовательских библиотек (сохраните с путём или без пути, чтобы получить данные) +@msg no variable named `{from}` нет переменной с именем `{from}` +@msg no variable named `{name}` нет переменной с именем `{name}` +@msg no variable named `{var}` нет переменной с именем `{var}` +@msg no variable named `{v}` нет переменной с именем `{v}` +@msg no view named `{name}` нет вида с именем `{name}` +@msg node {_1} already has the text variable `{_2}` у узла {_1} уже есть текстовая переменная `{_2}` +@msg node {_1} is not a graph узел {_1} не является диаграммой +@msg node {_1} is not an image узел {_1} не является изображением +@msg node {_1} is not type узел {_1} не является текстом +@msg not a DCS file не файл DCS +@msg not a PDF presets file (format `{_1}`) не файл наборов PDF (формат `{_1}`) +@msg not a PDF presets file: {e} не файл наборов PDF: {e} +@msg not a RegExp object не объект RegExp +@msg not a Word document: its WordDocument stream doesn't start with a file information block не документ Word: его поток WordDocument не начинается с блока сведений о файле +@msg not a Word document: its compound file has no WordDocument stream не документ Word: в его составном файле нет потока WordDocument +@msg not a Word document: its main part is not a WordprocessingML document не документ Word: его основная часть не является документом WordprocessingML +@msg not a Word document: its package has no main document part не документ Word: в его пакете нет основной части документа +@msg not a closed path не замкнутый контур +@msg not a flattener presets file (format `{_1}`) не файл наборов объединения (формат `{_1}`) +@msg not a flattener presets file: {e} не файл наборов объединения: {e} +@msg not a layer or group не слой и не группа +@msg not a library file: {e} не файл библиотеки: {e} +@msg not a mesh envelope point не точка сетки оболочки +@msg not a perspective grid presets file (format `{_1}`) не файл наборов сетки перспективы (формат `{_1}`) +@msg not a perspective grid presets file: {e} не файл наборов сетки перспективы: {e} +@msg not a print presets file (format `{_1}`) не файл наборов печати (формат `{_1}`) +@msg not a print presets file: {e} не файл наборов печати: {e} +@msg not a regular expression не регулярное выражение +@msg not a stored or deflated central record центральная запись не сохранена без сжатия и не сжата методом deflate +@msg not a valid SVGZ file: {e} недопустимый файл SVGZ: {e} +@msg not an action set: the text doesn't start with /version and a number не набор действий: текст не начинается с /version и числа +@msg not an image VectorCraft reads (see document.formats) не изображение, которое читает VectorCraft (см. document.formats) +@msg not area type (text in a frame) outside perspective не текст в области (текст в рамке) вне перспективы +@msg not editing an opacity mask непрозрачная маска не редактируется +@msg not type on a path outside perspective не текст по контуру вне перспективы +@msg nothing prints ничего не печатается +@msg nothing to bind нечего привязывать +@msg nothing to change нечего изменять +@msg nothing to change: give dx, dy, hScale, vScale or rotation нечего изменять: укажите dx, dy, hScale, vScale или rotation +@msg nothing to crop нечего обрезать +@msg nothing to export нечего экспортировать +@msg nothing to export: the document has no visible art нечего экспортировать: в документе нет видимой графики +@msg nothing to mark нечего отмечать +@msg nothing to print: every artboard picked is blank нечего печатать: все выбранные монтажные области пусты +@msg nothing to print: the document has no art that prints нечего печатать: в документе нет печатаемой графики +@msg nothing to repeat нечего повторять +@msg numbers out of order in {_1} quantifier числа в квантификаторе {_1} идут в неверном порядке +@msg object is not a path объект не является контуром +@msg object transparency cannot be sampled onto highlighted characters; disable Transparency in Eyedropper Options or select the whole object прозрачность объекта нельзя перенести на выделенные символы; отключите «Прозрачность» в окне «Параметры пипетки» или выделите объект целиком +@msg object {_1} can't be set as point type объект {_1} нельзя преобразовать в текст из точки +@msg object {_1} has lost its file's contents: relink it объект {_1} потерял содержимое своего файла: восстановите связь +@msg object {_1} has no path у объекта {_1} нет контура +@msg object {_1} has no size у объекта {_1} нет размера +@msg object {_1} is hidden or locked, or on a locked artboard объект {_1} скрыт или заблокирован либо находится на заблокированной монтажной области +@msg object {_1} is not a placed document объект {_1} не является помещённым документом +@msg object {_1} is not an Intertwine group объект {_1} не является группой переплетения +@msg object {_1} is not an image объект {_1} не является изображением +@msg object {_1} is not an image or a linked file объект {_1} не является изображением или связанным файлом +@msg object {_1} is not an image or a placed document объект {_1} не является изображением или помещённым документом +@msg object {_1} is not in this Intertwine group объект {_1} не входит в эту группу переплетения +@msg object {_1} needs a 3D effect объекту {_1} нужен 3D-эффект +@msg object {_1} needs a 3D effect at index {index} объекту {_1} нужен 3D-эффект с индексом {index} +@msg object {_1}: a hollow Extrude & Bevel has no caps: turn on Cap to map a graphic объект {_1}: у полого эффекта «Выдавливание и фаска» нет торцов: включите «Окончание», чтобы наложить графику +@msg object {_1}: with a depth of 0 the object has one face: map its graphics onto the front объект {_1}: при глубине 0 у объекта одна грань: наложите его графику на переднюю сторону +@msg object {_1}: {_2} объект {_1}: {_2} +@msg object {_1}: {e} объект {_1}: {e} +@msg object {_1}: {name} at index {index} has no lighting presets; set its lights with effect.setParams объект {_1}: у {name} с индексом {index} нет наборов освещения; задайте источники света через effect.setParams +@msg object {id} has anchors 0–{_1} for `corners`, not {past} у объекта {id} для `corners` есть опорные точки 0–{_1}, а не {past} +@msg object {id} has {n} anchors, so no anchor {past} у объекта {id} опорных точек: {n}, поэтому опорной точки {past} нет +@msg objects must be none, move or copy objects должно быть none, move или copy +@msg objects were left out объекты пропущены +@msg offset out of range смещение вне диапазона +@msg on must be true or false on должно быть true или false +@msg only groups, layers, type and images have a Contents (Characters) row строка «Содержимое» («Символы») есть только у групп, слоёв, текста и изображений +@msg only interior mesh lines can be deleted удалять можно только внутренние линии сетки +@msg only solid colours can be added (not gradients or patterns) добавлять можно только сплошные цвета (не градиенты и не узоры) +@msg only solid-colour swatches can be spot colours плашечными цветами могут быть только образцы сплошного цвета +@msg only this Affinity file's embedded preview could be read: use File › Open to see it with its warning, or export SVG or PDF from Affinity first удалось прочитать только встроенный предпросмотр этого файла Affinity: используйте «Файл › Открыть», чтобы увидеть его с предупреждением, или сначала экспортируйте SVG или PDF из Affinity +@msg only this Affinity file's embedded preview could be read; use File › Open to see it with its warning удалось прочитать только встроенный предпросмотр этого файла Affinity; используйте «Файл › Открыть», чтобы увидеть его с предупреждением +@msg onto, above, below, icon and a column place belong to window.panel.float and window.panel.dock onto, above, below, icon и место в столбце относятся к window.panel.float и window.panel.dock +@msg onto, above, below, icon and a column place take no anchor, side, zone or before onto, above, below, icon и место в столбце не сочетаются с anchor, side, zone и before +@msg onto, above, below, icon and a column place take no x, y, width or height onto, above, below, icon и место в столбце не сочетаются с x, y, width и height +@msg opacity must be a number opacity должно быть числом +@msg open a document to look for its linked files откройте документ, чтобы искать его связанные файлы +@msg operand too large операнд слишком велик +@msg options must be an object (see file.formatOptions) options должно быть объектом (см. file.formatOptions) +@msg order is a whole number from 0 to {others}, not `{v}` order — целое число от 0 до {others}, а не `{v}` +@msg order must be leftToRight or rightToLeft order должно быть leftToRight или rightToLeft +@msg orientation must be portrait or landscape, not `{o}` orientation должно быть portrait или landscape, а не `{o}` +@msg outlineText {v}: true or false outlineText {v}: true или false +@msg output intent profile: {e} профиль назначения вывода: {e} +@msg output.destination: no RGB or CMYK profile is called “{name}” output.destination: нет профиля RGB или CMYK с именем «{name}» +@msg output.destination: {_1} files are CMYK, and “{name}” is an RGB profile output.destination: файлы {_1} используют CMYK, а «{name}» — профиль RGB +@msg output.destination: {e} output.destination: {e} +@msg output.inks: no ink is set to print output.inks: ни одна краска не назначена для печати +@msg output.outputIntent: no profile is called “{name}”, and a {std} output intent embeds its profile output.outputIntent: нет профиля с именем «{name}», а назначение вывода {std} внедряет свой профиль +@msg output.outputIntent: no profile is called “{name}”: a {std} output intent embeds a profile, or names a registered printing condition (outputConditionId and registry) output.outputIntent: нет профиля с именем «{name}»: назначение вывода {std} внедряет профиль или указывает зарегистрированное условие печати (outputConditionId и registry) +@msg output.outputIntent: {std} files print in CMYK, and “{name}” is an RGB profile output.outputIntent: файлы {std} печатаются в CMYK, а «{name}» — профиль RGB +@msg output.outputIntent: “{name}” is a grey profile, which can't be a {std} output intent output.outputIntent: «{name}» — профиль оттенков серого, он не может быть назначением вывода {std} +@msg overlap: {o} pt is half a tile or more overlap: {o} pt составляет половину плитки или больше +@msg overlapping Shaper paths must be in the same layer or group перекрывающиеся контуры Shaper должны находиться в одном слое или группе +@msg overlapping edits перекрывающиеся правки +@msg page art conflicts with image data for {key} графика страницы конфликтует с данными изображения для {key} +@msg page art conflicts with pattern {name} графика страницы конфликтует с узором {name} +@msg page art conflicts with swatch {name} графика страницы конфликтует с образцом {name} +@msg page art is missing image data for {key} в графике страницы отсутствуют данные изображения для {key} +@msg page art is missing pattern {name} в графике страницы отсутствует узор {name} +@msg page art is missing swatch {name} в графике страницы отсутствует образец {name} +@msg page must be a whole number from 1 page должно быть целым числом от 1 +@msg page thumbnail: {e} миниатюра страницы: {e} +@msg page {page} of the PDF has no objects на странице {page} файла PDF нет объектов +@msg page {page}: `{file}` has {n} {artboards} страница {page}: в `{file}` {n} {artboards} +@msg page {page}: `{name}` has {n} {pages} страница {page}: в `{name}` {n} {pages} +@msg pages must be a range such as "2-3" or a page number, not {v} pages должно быть диапазоном, например "2-3", или номером страницы, а не {v} +@msg pages: {e} pages: {e} +@msg panel position must be finite положение панели должно быть конечным +@msg parameters must be an object параметры должны быть объектом +@msg params must be an object params должно быть объектом +@msg passwords can have up to {MAX_PASSWORD} bytes пароли могут содержать до {MAX_PASSWORD} байт +@msg path chunks must share their boundary point фрагменты контура должны иметь общую граничную точку +@msg path has no open end у контура нет открытого конца +@msg paths must be strings paths должно состоять из строк +@msg pdfCompatible: false needs every artboard to keep the editable artwork pdfCompatible: false требует все монтажные области, чтобы сохранить редактируемую графику +@msg pdfCompatible: false needs the artboards to keep the editable artwork when useArtboards is false когда useArtboards равно false, pdfCompatible: false требует монтажные области, чтобы сохранить редактируемую графику +@msg pdfs `{m}`: single or multiple pdfs `{m}`: single или multiple +@msg pickColorFrom is "artwork" or "swatches", not {v} pickColorFrom принимает "artwork" или "swatches", а не {v} +@msg pins and moved must be non-empty lists of the same length pins и moved должны быть непустыми списками одинаковой длины +@msg pins must be [[x,y]…] pins должно быть [[x,y]…] +@msg pins must be finite pins должны быть конечными +@msg place is above, below or inside, not `{other}` place принимает above, below или inside, а не `{other}` +@msg plane must be left|right|ground plane должно быть left|right|ground +@msg plane must be left|right|ground|none plane должно быть left|right|ground|none +@msg point is outside the mesh точка находится за пределами сетки +@msg point x must be a number x точки должно быть числом +@msg point y must be a number y точки должно быть числом +@msg points must be [t, left, right] with non-negative widths points должно быть [t, left, right] с неотрицательной шириной +@msg points must be [x,y] pairs points должно состоять из пар [x,y] +@msg points must be a non-empty [[x,y,pressure?]…] list points должно быть непустым списком [[x,y,pressure?]…] +@msg points must be a non-empty list of finite [x,y] points должно быть непустым списком конечных [x,y] +@msg points must be an array or null points должно быть массивом или null +@msg points must be finite points должны быть конечными +@msg points must be finite [x,y] pairs points должно состоять из конечных пар [x,y] +@msg points must be finite canvas points points должно состоять из конечных точек холста +@msg points must contain 1–4096 coordinates points должно содержать от 1 до 4096 координат +@msg position must be normal, superscript or subscript position должно быть normal, superscript или subscript +@msg position must be topLeft, topRight, bottomLeft or bottomRight position должно быть topLeft, topRight, bottomLeft или bottomRight +@msg positions must be between 0 and 100000 pt positions должны быть от 0 до 100000 pt +@msg ppi must be a positive number, not {ppi} ppi должно быть положительным числом, а не {ppi} +@msg ppi must be between 1 and 2400 ppi должно быть от 1 до 2400 +@msg preserve `{v}` is not transforms|bounds|fileDimensions|fit|fill preserve `{v}` не является одним из transforms|bounds|fileDimensions|fit|fill +@msg preserveShape must be clippingMask|transparency preserveShape должно быть clippingMask|transparency +@msg preset `{id}`: mobile or density набор `{id}`: mobile или density +@msg preset must be standard, diffuse, topLeft or right preset должно быть standard, diffuse, topLeft или right +@msg preset must be the name of a print preset preset должно быть именем набора печати +@msg previewMode must be default, pixel or overprint previewMode должно быть default, pixel или overprint +@msg print settings: {e} параметры печати: {e} +@msg procedures nest too deeply процедуры вложены слишком глубоко +@msg procedures nested too deeply вложенность процедур слишком глубока +@msg quotes must be {double?, single?} quotes должно быть {double?, single?} +@msg quotes.{k} must be an opening and a closing quote, e.g. "“”" quotes.{k} должно быть открывающей и закрывающей кавычками, например "“”" +@msg range out of order in character class диапазон в классе символов задан в неверном порядке +@msg rasterEffectsPpi must be 1–2400 (72 screen, 150 medium, 300 high) rasterEffectsPpi должно быть 1–2400 (72 для экрана, 150 для среднего, 300 для высокого) +@msg rating must be a whole number from 0 to {MAX_RATING} rating должно быть целым числом от 0 до {MAX_RATING} +@msg rect and {k} contradict each other: give the area or the artboards rect и {k} противоречат друг другу: укажите область или монтажные области +@msg rect applies to raster formats, not {_1} rect применяется к растровым форматам, а не к {_1} +@msg rect is [x, y, width, height] in points rect — это [x, y, width, height] в пунктах +@msg rect must be [x, y, width, height] rect должно быть [x, y, width, height] +@msg rect must be [x, y, width, height] with a positive width and height rect должно быть [x, y, width, height] с положительными шириной и высотой +@msg rect needs finite numbers and a positive width and height для rect нужны конечные числа и положительные ширина и высота +@msg redraw needs id для redraw нужен id +@msg redraw within must be a finite distance of 0 or more within для redraw должно быть конечным расстоянием, 0 или больше +@msg reduce of an empty array with no initial value reduce для пустого массива без начального значения +@msg registration must be 0..8 registration должно быть 0..8 +@msg regular expression flag '{_1}' given twice флаг регулярного выражения '{_1}' указан дважды +@msg release a layer or a group распределять по слоям можно слой или группу +@msg replace keeps the replaced object's place and transform: drop template, at and rect replace сохраняет положение и трансформацию заменяемого объекта: уберите template, at и rect +@msg replace: select the one object to replace replace: выделите один объект для замены +@msg resolution must be a number or screen|medium|high resolution должно быть числом или screen|medium|high +@msg resolution must be between 1 and 2400 ppi resolution должно быть от 1 до 2400 ppi +@msg rotation must be a number of degrees rotation должно быть числом в градусах +@msg rotation must be finite rotation должно быть конечным +@msg rows and cols must be 1..50 rows и cols должны быть 1..50 +@msg rows and columns must be 1..500 rows и columns должны быть 1..500 +@msg rows of objects whose appearances differ can't be reordered together строки объектов с разным оформлением нельзя переупорядочивать вместе +@msg sampled text would exceed the canvas (coordinates out of range) текст с перенесёнными атрибутами превысил бы холст (координаты вне диапазона) +@msg save the document first: Package collects a saved document сначала сохраните документ: «Упаковать» собирает сохранённый документ +@msg save the document first: copy puts the file in its folder сначала сохраните документ: copy помещает файл в его папку +@msg savedPreset: {e} savedPreset: {e} +@msg scale `{s}`: a factor such as 2x, a width (100w), a height (100h) or a resolution (72ppi) scale `{s}`: коэффициент, например 2x, ширина (100w), высота (100h) или разрешение (72ppi) +@msg scale must be a number above 0, at most 64 scale должно быть числом больше 0 и не больше 64 +@msg scale must be non-zero scale не должно быть нулём +@msg scope must be selection or all (got {other}) scope должно быть selection или all (получено {other}) +@msg scribble is too long каракули слишком длинные +@msg segment does not exist сегмент не существует +@msg select a Shaper group выделите группу Shaper +@msg select a blend to set easing or color shift выделите переход, чтобы задать сглаживание или сдвиг цвета +@msg select a graph выделите диаграмму +@msg select a group or layer with visible, unlocked members выделите группу или слой с видимыми незаблокированными элементами +@msg select a layer выделите слой +@msg select a text object выделите текстовый объект +@msg select an SVG filter выделите фильтр SVG +@msg select an image (or an Image Trace group) выделите изображение (или группу трассировки изображения) +@msg select an image, or pass id выделите изображение или передайте id +@msg select an object (or pass `id`) выделите объект (или передайте `id`) +@msg select an object with a 3D effect выделите объект с 3D-эффектом +@msg select an object with a 3D effect, or give its id in ids выделите объект с 3D-эффектом или укажите его идентификатор в ids +@msg select an object with a freeform gradient выделите объект с произвольным градиентом +@msg select an object with an opacity mask выделите объект с непрозрачной маской +@msg select area type выделите текст в области +@msg select area type (text in a frame) выделите текст в области (текст в рамке) +@msg select area type and closed paths (at least one area type object) выделите текст в области и замкнутые контуры (хотя бы один объект текста в области) +@msg select area type whose first line can fit its frame выделите текст в области, первая строка которого может поместиться в рамку +@msg select artwork to add its colours выделите рисунок, чтобы добавить его цвета +@msg select artwork to make a group of its colours выделите рисунок, чтобы создать группу из его цветов +@msg select artwork to recolour, or give a colour `group` выделите рисунок для перекрашивания или укажите цветовую группу в `group` +@msg select exactly two path ends to join выделите ровно два конца контуров для соединения +@msg select objects or give ids выделите объекты или укажите ids +@msg select objects to align to the guide выделите объекты для выравнивания по направляющей +@msg select one Intertwine group выделите одну группу переплетения +@msg select one image or pass id выделите одно изображение или передайте id +@msg select one layer, group or object to rename выделите один слой, группу или объект для переименования +@msg select paths выделите контуры +@msg select paths or compound paths выделите контуры или составные контуры +@msg select rows or objects to collect выделите строки или объекты для сбора +@msg select something to export выделите что-нибудь для экспорта +@msg select something to export (or turn off selectedOnly) выделите что-нибудь для экспорта (или отключите selectedOnly) +@msg select text to redefine the style from выделите текст, по которому нужно переопределить стиль +@msg select the art and, on top of it, the mask object выделите графику и расположенный поверх неё объект маски +@msg select the art for the design выделите графику для дизайна +@msg select the art for the pattern tile выделите графику для плитки узора +@msg select the art to add first сначала выделите добавляемую графику +@msg select the art to collect (or give its ids) выделите графику для сбора (или укажите её ids) +@msg select the art to weed выделите графику для выборки +@msg select the banner, or mark every artboard выделите баннер или разметьте все монтажные области +@msg select the content and a path on top выделите содержимое и контур поверх него +@msg select the images to relink, or pass ids выделите изображения для восстановления связи или передайте ids +@msg select the images, or pass ids выделите изображения или передайте ids +@msg select the linked images or placed documents, or pass ids выделите связанные изображения или помещённые документы либо передайте ids +@msg select the object to copy from выделите объект, с которого нужно копировать +@msg select the objects (or give their ids) выделите объекты (или укажите их ids) +@msg select the objects to attach to the path выделите объекты для прикрепления к контуру +@msg select the objects to bind выделите объекты для привязки +@msg select two or more objects to intertwine выделите два или более объекта для переплетения +@msg select two or more slices to combine выделите два или более фрагмента для объединения +@msg select type on a path выделите текст по контуру +@msg select type on a path or area type выделите текст по контуру или текст в области +@msg selection `{m}`: one or each selection `{m}`: one или each +@msg settings is an object of document.exportForScreens params settings — объект с параметрами document.exportForScreens +@msg settings must be an object settings должно быть объектом +@msg show `{show}`: all, missing, modified or embedded show `{show}`: all, missing, modified или embedded +@msg show must be true or false show должно быть true или false +@msg side is left or right, not `{v}` side принимает left или right, а не `{v}` +@msg size must be "small", "medium", "large" or a number of points over 0 up to {_1} size должно быть "small", "medium", "large" или числом в пунктах больше 0 и не больше {_1} +@msg size must be positive size должно быть положительным +@msg sizeMode is "fixed" or "pressure", not `{other}` sizeMode принимает "fixed" или "pressure", а не `{other}` +@msg sizeMode is "fixed" or "pressure", not {other} sizeMode принимает "fixed" или "pressure", а не {other} +@msg sizeVariation must be 0 or more sizeVariation должно быть 0 или больше +@msg smallCaps must be true or false smallCaps должно быть true или false +@msg sort `{x}`: name, kind or status sort `{x}`: name, kind или status +@msg source paths are too large for Shaper исходные контуры слишком велики для Shaper +@msg source text transform is collapsed or unrepresentable трансформация исходного текста вырождена или непредставима +@msg spot, mode and group apply to solid colours only spot, mode и group применяются только к сплошным цветам +@msg status `{s}`: linked, embedded, missing or modified status `{s}`: linked, embedded, missing или modified +@msg steps must be 1..1000 steps должно быть 1..1000 +@msg steps must be 1..{MAX_STEPS} steps должно быть 1..{MAX_STEPS} +@msg stop {i}: `plates` must be four numbers from 0 to 1 (C, M, Y, K) точка перехода {i}: `plates` должно быть четырьмя числами от 0 до 1 (C, M, Y, K) +@msg stopped before the archive was finished остановлено до завершения архива +@msg strokeMode must be within|along|across, got {m} strokeMode должно быть within|along|across, получено {m} +@msg strokeOptions must be an object of stroke.set options strokeOptions должно быть объектом с параметрами stroke.set +@msg strokeWidth must be a positive number of pixels strokeWidth должно быть положительным числом пикселей +@msg subpath {si} is not an open subpath вложенный контур {si} не является открытым +@msg subpaths required when joining the same path при соединении одного и того же контура требуется subpaths +@msg swatchConflict must be "merge" or "add", not {v} swatchConflict должно быть "merge" или "add", а не {v} +# Messages that begin with a lowercase word, t to z. +@msg table must be true or false table должно быть true или false +@msg takes one name принимает одно имя +@msg target text transform is collapsed or unrepresentable трансформация целевого текста вырождена или непредставима +@msg text must be {characterSet?, platform?, removeLineReturns?, removeParagraphReturns?, replaceSpaces?} text должно быть {characterSet?, platform?, removeLineReturns?, removeParagraphReturns?, replaceSpaces?} +@msg text transform is collapsed or unrepresentable трансформация текста вырождена или непредставима +@msg text.replaceSpaces must be a whole number from 2 to 100 text.replaceSpaces должно быть целым числом от 2 до 100 +@msg text.{key} `{v}`: use "{_1}" or "{_2}" text.{key} `{v}`: используйте "{_1}" или "{_2}" +@msg textureImage: give {path} or {name, dataBase64} of an image file, or a texture as effect.list gives it textureImage: укажите {path} или {name, dataBase64} файла изображения либо текстуру в том виде, в каком её выдаёт effect.list +@msg textureImage: {e} textureImage: {e} +@msg that makes more than {MAX_PIECES} slices так получится больше {MAX_PIECES} фрагментов +@msg that makes too many pieces (at most 100000) or dash steps: simplify the dash pattern or make the dashes longer так получится слишком много частей (не более 100000) или шагов штриха: упростите шаблон штрихов или удлините штрихи +@msg that object is not in the overlap этого объекта нет в перекрытии +@msg the Affinity document has no page with a size в документе Affinity нет страницы с заданным размером +@msg the CMYK image couldn't be written изображение CMYK не удалось записать +@msg the Layers panel is not shown панель «Слои» не показана +@msg the Layers panel's search, filter or Show Layers Only hides its row поиск, фильтр или параметр «Показывать только слои» в панели «Слои» скрывает его строку +@msg the Objects on Path group is hidden or locked группа «Объекты на контуре» скрыта или заблокирована +@msg the PDF security settings were saved without their passwords: give openPassword or permissionsPassword again, or security without passwordRequired to export unprotected параметры безопасности PDF сохранены без паролей: снова укажите openPassword или permissionsPassword либо security без passwordRequired, чтобы экспортировать без защиты +@msg the RTF file has too many paragraphs or formatting changes to place as type (at most {MAX_PARAGRAPHS} paragraphs and {MAX_RUNS} runs) в файле RTF слишком много абзацев или изменений форматирования, чтобы поместить его как текст (не более {MAX_PARAGRAPHS} абзацев и {MAX_RUNS} фрагментов форматирования) +@msg the RTF file is too large to place as type (at most {_1} MB) файл RTF слишком велик, чтобы поместить его как текст (не более {_1} МБ) +@msg the SVG expands to more than {0} nested SVG images SVG разворачивается более чем в {0} вложенных изображений SVG +@msg the SVG expands to more than {0} objects SVG разворачивается более чем в {0} объектов +@msg the SVG file is larger than {MAX_IMPORT_BYTES} bytes файл SVG больше {MAX_IMPORT_BYTES} байт +@msg the SVG has no drawable objects в SVG нет отображаемых объектов +@msg the SVGZ file unpacks to more than {_1} MB файл SVGZ распаковывается более чем в {_1} МБ +@msg the Word document has more than {MAX_PAGES} pages of properties, too many to place в документе Word больше {MAX_PAGES} страниц свойств, это слишком много для помещения +@msg the Word document has more than {MAX_RUNS} runs of character or paragraph properties, too many to place в документе Word больше {MAX_RUNS} фрагментов свойств символов или абзацев, это слишком много для помещения +@msg the Word document has more than {_1} MB of formatting properties, too many to place в документе Word больше {_1} МБ свойств форматирования, это слишком много для помещения +@msg the Word document has too much text or formatting to place as type (at most {MAX_PARAGRAPHS} paragraphs, {MAX_RUNS} runs and {_1} MB of text) в документе Word слишком много текста или форматирования, чтобы поместить его как текст (не более {MAX_PARAGRAPHS} абзацев, {MAX_RUNS} фрагментов форматирования и {_1} МБ текста) +@msg the Word document has too much text to place as type (at most {_1} MB) в документе Word слишком много текста, чтобы поместить его как текст (не более {_1} МБ) +@msg the Word document is encrypted or protected with a password; save it without one to place it документ Word зашифрован или защищён паролем; сохраните его без пароля, чтобы поместить +@msg the Word document is too large to place (its {name} stream holds more than {_1} MB) документ Word слишком велик для помещения (его поток {name} содержит больше {_1} МБ) +@msg the Word document was last saved with fast save, which VectorCraft doesn't read; save it again with fast save turned off документ Word последний раз сохранён с быстрым сохранением, которое VectorCraft не читает; сохраните его снова, отключив быстрое сохранение +@msg the Word document was saved by Word 6.0 or Word 95, which VectorCraft doesn't read; save it as a Word 97-2003 document документ Word сохранён в Word 6.0 или Word 95, а этот формат VectorCraft не читает; сохраните его как документ Word 97-2003 +@msg the Word document's text is made of more than {MAX_PIECES} pieces, too many to place текст документа Word состоит более чем из {MAX_PIECES} частей, это слишком много для помещения +@msg the XML operation needs an XML or XMLList value для операции XML нужно значение XML или XMLList +@msg the XPath expression does not evaluate to a node-set выражение XPath не даёт набор узлов +@msg the XPath expression ends early выражение XPath обрывается +@msg the XPath expression has an unmatched ) в выражении XPath есть непарная ) +@msg the XPath expression has an unmatched ] в выражении XPath есть непарная ] +@msg the XPath expression has an unmatched closing bracket в выражении XPath есть непарная закрывающая скобка +@msg the XPath expression selects a namespace node, which is not an XML value выражение XPath выбирает узел пространства имён, который не является значением XML +@msg the XPath expression selects the root node, which is not an XML value выражение XPath выбирает корневой узел, который не является значением XML +@msg the XPath function {name} needs a node-set функции XPath {name} нужен набор узлов +@msg the XPath function {name} takes the wrong number of arguments функции XPath {name} передано неверное число аргументов +@msg the XPath name functions need a node-set функциям имён XPath нужен набор узлов +@msg the XPath prefix {shown} is not bound to a namespace префикс XPath {shown} не привязан к пространству имён +@msg the XPath variable ${shown} is not bound переменная XPath ${shown} не привязана +@msg the action set ids are not a list идентификаторы наборов действий не являются списком +@msg the active paint is not a gradient активная краска не является градиентом +@msg the argument list is not an object список аргументов не является объектом +@msg the artboards don't fit on the canvas: fewer artboards, less spacing or a smaller size монтажные области не помещаются на холсте: уменьшите их число, интервал или размер +@msg the artwork is too large for EPS: what follows 256 MB of PostScript was left out графика слишком велика для EPS: всё, что следует после 256 МБ PostScript, пропущено +@msg the banner has no width or height у баннера нет ширины или высоты +@msg the bitmaps hold more pixels than one file may растровые изображения содержат больше пикселей, чем допустимо для одного файла +@msg the character's size can't be measured размер символа невозможно измерить +@msg the code runs past its last instruction код выполняется дальше своей последней инструкции +@msg the compound shape is too complex to expand составная фигура слишком сложна, чтобы её разобрать +@msg the container of the listed objects is gone контейнер перечисленных объектов больше не существует +@msg the copy `{user_id}` can't be read as a library копию `{user_id}` невозможно прочитать как библиотеку +@msg the copy would leave the canvas копия вышла бы за пределы холста +@msg the curve tolerance must be from 0.01 to 10 points допуск кривой должен быть от 0.01 до 10 пунктов +@msg the custom dictionary couldn't be saved to {_1}: {e} пользовательский словарь не удалось сохранить в {_1}: {e} +@msg the custom dictionary {_1} can't be read ({why}), so it is left as it is пользовательский словарь {_1} невозможно прочитать ({why}), поэтому он оставлен без изменений +@msg the cut cannot be made on this art: {e} разрез невозможно выполнить на этой графике: {e} +@msg the data isn't an EMF or WMF picture данные не являются рисунком EMF или WMF +@msg the data isn't an EPS or PostScript picture данные не являются рисунком EPS или PostScript +@msg the deferred paste is no longer available отложенная вставка больше недоступна +@msg the design is too big to draw at every data point of this graph дизайн слишком велик, чтобы рисовать его в каждой точке данных этой диаграммы +@msg the design is too big to draw in every column of this graph дизайн слишком велик, чтобы рисовать его в каждом столбце этой диаграммы +@msg the dialog it was opened over is no longer open диалоговое окно, поверх которого оно было открыто, больше не открыто +@msg the dictionary stack overflowed стек словарей переполнен +@msg the document already has an SVG filter named {name} в документе уже есть фильтр SVG с именем {name} +@msg the document has another SVG filter named {name}: use svgFilter.apply, or svgFilter.define with `replace` to edit it в документе есть другой фильтр SVG с именем {name}: используйте svgFilter.apply или, чтобы изменить его, svgFilter.define с `replace` +@msg the document has no SVG filter named {name} в документе нет фильтра SVG с именем {name} +@msg the document has no SVG filter named {r} в документе нет фильтра SVG с именем {r} +@msg the document has no color swatches в документе нет цветовых образцов +@msg the document's swatches hold {_1} colors; the document reduction takes at most 255 образцы документа содержат цветов: {_1}; редукция document принимает не более 255 +@msg the editing data's hash has no place для хеша данных редактирования нет места +@msg the entities the document declares expand to too much text сущности, объявленные в документе, разворачиваются в слишком большой текст +@msg the envelope's content has no bounds у содержимого оболочки нет границ +@msg the envelope's mesh is malformed сетка оболочки повреждена +@msg the file holds no `variableSets` element в файле нет элемента `variableSets` +@msg the file is larger than {_1} MB файл больше {_1} МБ +@msg the file is too large файл слишком велик +@msg the file isn't valid SVG: {e} файл не является допустимым SVG: {e} +@msg the file names no plate файл не указывает ни одной пластины +@msg the file was updated or encrypted already файл уже обновлён или зашифрован +@msg the first character of a line has no character before it to kern: it moves only up and down (dy) перед первым символом строки нет символа для кернинга: он перемещается только вверх и вниз (dy) +@msg the font {_1} is not available шрифт {_1} недоступен +@msg the format has no file extension у формата нет расширения файла +@msg the function's prototype is not an object прототип функции не является объектом +@msg the graphic can't be read: {e} графику невозможно прочитать: {e} +@msg the graphic is empty графика пуста +@msg the graphic's data is damaged данные графики повреждены +@msg the graphic's document has no artboard в документе графики нет монтажной области +@msg the grommet inset is too large for the banner отступ люверсов слишком велик для баннера +@msg the guide is hidden or locked направляющая скрыта или заблокирована +@msg the header `{cell}` for `{name}` would read back as the variable `{other}`: rename one of them заголовок `{cell}` для `{name}` при чтении дал бы переменную `{other}`: переименуйте одну из них +@msg the hem is too deep for the banner подгиб слишком широк для баннера +@msg the image `{path}` isn't followed: {r} переход к изображению `{path}` не выполняется: {r} +@msg the image has no embedded pixels у изображения нет встроенных пикселей +@msg the image is empty изображение пусто +@msg the image is fully transparent изображение полностью прозрачно +@msg the image is not on an artboard; pass rect изображение не находится на монтажной области; передайте rect +@msg the image's pixels are missing пиксели изображения отсутствуют +@msg the image's pixels aren't in the document пикселей изображения нет в документе +@msg the image's pixels can't be read: {e} пиксели изображения невозможно прочитать: {e} +@msg the image's transparency doesn't fit it прозрачность изображения не соответствует ему +@msg the job would print more than {MAX_PAGES} pages задание напечатало бы больше {MAX_PAGES} страниц +@msg the job would print more than {_1} pages задание напечатало бы больше {_1} страниц +@msg the layers hold no art to mask в слоях нет графики для маски +@msg the layout moved расположение изменилось +@msg the library has a group `{name}` already в библиотеке уже есть группа `{name}` +@msg the library has no group `{name}` в библиотеке нет группы `{name}` +@msg the library has no item `{item}` в библиотеке нет элемента `{item}` +@msg the library has no item `{other}` в библиотеке нет элемента `{other}` +@msg the library holds {MAX_GROUPS} groups already в библиотеке уже наибольшее число групп: {MAX_GROUPS} +@msg the library holds {MAX_ITEMS} items of this kind already в библиотеке уже наибольшее число элементов этого вида: {MAX_ITEMS} +@msg the library's file is outside the read roots файл библиотеки находится вне папок, разрешённых для чтения +@msg the line is too long, or the paths it passes too many, to check линия слишком длинна или пересекает слишком много контуров для проверки +@msg the method needs an XML value методу нужно значение XML +@msg the name is empty имя пусто +@msg the object has no fill, stroke or effect у объекта нет заливки, обводки или эффекта +@msg the object has no graphic style (pass `name`) у объекта нет графического стиля (передайте `name`) +@msg the objects don't match the plan объекты не соответствуют плану +@msg the open and permissions passwords must differ пароль для открытия и пароль прав доступа должны различаться +@msg the operand stack overflowed стек операндов переполнен +@msg the page has no area у страницы нет площади +@msg the page's type in an unread object's box isn't in its page art текста страницы в рамке непрочитанного объекта нет в графике этой страницы +@msg the paint behind the proxy is not a gradient краска за индикатором не является градиентом +@msg the paint is not a freeform gradient (apply one with paint.editGradient {kind}) краска не является произвольным градиентом (примените его через paint.editGradient {kind}) +@msg the parameters or body do not form one function параметры или тело не образуют одну функцию +@msg the parent must be a layer or sublayer родитель должен быть слоем или подслоем +@msg the pasted SVG filter {name} draws differently from the document's filter of that name, and no free name fits it вставленный фильтр SVG {name} рисует иначе, чем фильтр документа с тем же именем, и свободного имени для него не нашлось +@msg the path can't be extended контур невозможно продлить +@msg the path can't be inside one of the objects to attach контур не может находиться внутри одного из прикрепляемых объектов +@msg the path has no segments to measure у контура нет сегментов для измерения +@msg the path is empty контур пуст +@msg the path is too short to shorten that much контур слишком короток, чтобы укоротить его настолько +@msg the paths are too many or too tangled to find where they cross контуров слишком много, или они слишком запутаны, чтобы найти их пересечения +@msg the pen table holds more than 255 pens таблица перьев содержит больше 255 перьев +@msg the picture has no objects в рисунке нет объектов +@msg the plates can't be kept пластины невозможно сохранить +@msg the position table does not match the instructions таблица позиций не соответствует инструкциям +@msg the program runs too long программа выполняется слишком долго +@msg the program uses too much memory программа использует слишком много памяти +@msg the prompt's text is longer than {MAX_PROMPT_BYTES} bytes текст запроса длиннее {MAX_PROMPT_BYTES} байт +@msg the radix must be between 2 and 36 основание системы счисления должно быть от 2 до 36 +@msg the rectangle must have a width and a height у прямоугольника должны быть ширина и высота +@msg the rectangle needs a size and must lie on the canvas прямоугольнику нужен размер, и он должен находиться на холсте +@msg the rectangle or line reaches too many paths to check прямоугольник или линия затрагивает слишком много контуров для проверки +@msg the right side of 'in' is not an object правая часть 'in' не является объектом +@msg the right side of 'instanceof' is not a function правая часть 'instanceof' не является функцией +@msg the selected art has no width у выделенной графики нет ширины +@msg the selected art is nested more than {MAX_DEPTH} levels deep выделенная графика вложена глубже {MAX_DEPTH} уровней +@msg the selected art is too large to measure выделенная графика слишком велика для измерения +@msg the selection draws nothing выделение ничего не рисует +@msg the selection has no area у выделения нет площади +@msg the selection has no art to export в выделении нет графики для экспорта +@msg the selection has no bounds у выделения нет границ +@msg the selection has no graphic style у выделения нет графического стиля +@msg the selection has no outlines to weed around в выделении нет контуров, вокруг которых делается выборка +@msg the slice would leave the canvas фрагмент вышел бы за пределы холста +@msg the spacing makes more than {MAX_GROMMETS} grommets при таком интервале получается больше {MAX_GROMMETS} люверсов +@msg the spot colour couldn't be added плашечный цвет не удалось добавить +@msg the subpath has no ends to extend (it is closed or a single point) у вложенного контура нет концов для продления (он замкнут или состоит из одной точки) +@msg the symbols are nested too deeply to expand their instances символы вложены слишком глубоко, чтобы разобрать их экземпляры +@msg the text file is too large to place as type (at most {_1} MB) текстовый файл слишком велик, чтобы поместить его как текст (не более {_1} МБ) +@msg the text is empty текст пуст +@msg the text is over {_1} MB текст больше {_1} МБ +@msg the top object must be a path верхний объект должен быть контуром +@msg the trace was cancelled трассировка отменена +@msg the trailer has no size в трейлере нет размера +@msg the type object is flattened to nothing после сведения от текстового объекта ничего не остаётся +@msg the value bind was called on is not a function значение, для которого вызван bind, не является функцией +@msg the value is not a constructor значение не является конструктором +@msg the value is not a function значение не является функцией +@msg the value is not a valid XML name значение не является допустимым именем XML +@msg the value is not an XML attribute name значение не является именем атрибута XML +@msg the value is not an XML name значение не является именем XML +@msg the value of axis `{tag}` must be a number or null значение оси `{tag}` должно быть числом или null +@msg the variable library declares more than {MAX_LIBRARY_DATASETS} data sets библиотека переменных объявляет больше {MAX_LIBRARY_DATASETS} наборов данных +@msg the variable library declares more than {MAX_LIBRARY_ENTITIES} entities библиотека переменных объявляет больше {MAX_LIBRARY_ENTITIES} сущностей +@msg the variable library declares more than {MAX_LIBRARY_VARIABLES} variables библиотека переменных объявляет больше {MAX_LIBRARY_VARIABLES} переменных +@msg the variable library declares no variables библиотека переменных не объявляет ни одной переменной +@msg the variable library is larger than {MAX_LIBRARY_BYTES} bytes библиотека переменных больше {MAX_LIBRARY_BYTES} байт +@msg the variable library is not UTF-8 библиотека переменных не в кодировке UTF-8 +@msg the variable library is not well-formed XML: {e} библиотека переменных не является корректным XML: {e} +@msg the variable library nests elements more than {MAX_LIBRARY_NESTING} deep в библиотеке переменных элементы вложены глубже {MAX_LIBRARY_NESTING} уровней +@msg the variable library's document type declaration holds something other than entities of plain text объявление типа документа библиотеки переменных содержит что-то кроме сущностей с простым текстом +@msg the variable library's entities expand to more than {MAX_LIBRARY_BYTES} bytes сущности библиотеки переменных разворачиваются более чем в {MAX_LIBRARY_BYTES} байт +@msg the weeding lines cross the art's outlines too many times to measure; use fewer lines линии выборки пересекают контуры графики слишком много раз для измерения; используйте меньше линий +@msg the weeding lines pass too close to too many outline segments to measure; use fewer lines or a smaller gap линии выборки проходят слишком близко к слишком большому числу сегментов контуров для измерения; используйте меньше линий или меньший зазор +@msg the weeding lines would be more than {max_pieces} pieces линии выборки состояли бы более чем из {max_pieces} частей +@msg the window has no dock у окна нет области прикрепления +@msg the written PDF has no catalog в записанном PDF нет каталога +@msg the written PDF has no cross-reference table в записанном PDF нет таблицы перекрёстных ссылок +@msg the written PDF's metadata can't be edited метаданные записанного PDF невозможно изменить +@msg the {_1} plate lies outside the file пластина {_1} находится за пределами файла +@msg there are no colour swatches to draw нет цветовых образцов для отрисовки +@msg there is already a design named `{name}` дизайн с именем `{name}` уже существует +@msg there is already a design named `{to}` дизайн с именем `{to}` уже существует +@msg there is already a toolbar named `{name}` панель инструментов с именем `{name}` уже существует +@msg there is already a toolbar named `{to}` панель инструментов с именем `{to}` уже существует +@msg there is no banner to mark нет баннера для разметки +@msg there is no library: create one first библиотеки нет: сначала создайте её +@msg these paths are too degenerate for Shaper эти контуры слишком вырождены для Shaper +@msg this is a binary DXF file, which can't be read: save it from the CAD app as an ASCII DXF and open that это двоичный файл DXF, который невозможно прочитать: сохраните его из САПР как ASCII DXF и откройте полученный файл +@msg this warp's points can't be edited: use Reset with Mesh first точки этой деформации нельзя редактировать: сначала используйте «Сбросить с сеткой» +@msg thumbnail: no page {v} (the {what} has {count}) thumbnail: страница {v} не существует ({what}, всего страниц: {count}) +@msg tileRange of {what}: {e} tileRange для {what}: {e} +@msg title can't be empty title не может быть пустым +@msg to (the new name) is required требуется to (новое имя) +@msg to must be fill or stroke to должно быть fill или stroke +@msg to must be smooth or corner to должно быть smooth или corner +@msg toExponential() digits must be between 0 and 20 число цифр для toExponential() должно быть от 0 до 20 +@msg toFixed() digits must be between 0 and 20 число цифр для toFixed() должно быть от 0 до 20 +@msg toISOString is not a function toISOString не является функцией +@msg toPrecision() argument must be between 1 and 21 аргумент toPrecision() должен быть от 1 до 21 +@msg toSource: a getter cannot be written as source toSource: геттер невозможно записать как исходный код +@msg toSource: an array with properties besides its elements, a property that is not enumerable or another prototype cannot be written as source toSource: массив со свойствами помимо элементов, с неперечислимым свойством или с другим прототипом невозможно записать как исходный код +@msg toSource: an object with a property that is not enumerable, or whose prototype is not Object.prototype, cannot be written as source toSource: объект с неперечислимым свойством или с прототипом, отличным от Object.prototype, невозможно записать как исходный код +@msg toSource: the source is too long toSource: исходный код слишком длинный +@msg toSource: the value contains itself toSource: значение содержит само себя +@msg toSource: the value has too many entries toSource: в значении слишком много записей +@msg toSource: the value is nested too deep toSource: значение вложено слишком глубоко +@msg toString is not a function toString не является функцией +@msg too large for a zip archive: package to a folder слишком велико для архива zip: упакуйте в папку +@msg too many Shaper edits слишком много правок Shaper +@msg too many `points` (at most 100000) слишком много `points` (не более 100000) +@msg too many arguments слишком много аргументов +@msg too many characters: at most {MAX_CHARS} слишком много символов: не более {MAX_CHARS} +@msg too many dots for this size: lower the frequency слишком много точек для этого размера: уменьшите частоту +@msg too many filters over one file слишком много фильтров для одного файла +@msg too many overlapping paths for Shaper слишком много перекрывающихся контуров для Shaper +@msg too many quantifiers слишком много квантификаторов +@msg too many saved clips слишком много сохранённых областей обрезки +@msg too many saved graphics states слишком много сохранённых графических состояний +@msg toolbar (a toolbar's name) must be a string toolbar (имя панели инструментов) должно быть строкой +@msg toolbar name can't be empty имя панели инструментов не может быть пустым +@msg transparentImages {v}: "flatten" (the default) or "omit" transparentImages {v}: "flatten" (по умолчанию) или "omit" +@msg turn on at least one side включите хотя бы одну сторону +@msg two saved selections would be named `{_1}` два сохранённых выделения получили бы имя `{_1}` +@msg type dimension cannot be represented with this text transform размер текста невозможно представить с этой трансформацией текста +@msg type dimension must be finite размер текста должен быть конечным +@msg unexpected resources непредвиденные ресурсы +@msg unknown CMYK profile `{name}` неизвестный профиль CMYK `{name}` +@msg unknown File Info field `{k}` неизвестное поле сведений о файле `{k}` +@msg unknown OpenType feature `{t}` (liga, calt, dlig, smcp, frac, onum, tnum, ordn, swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom, aalt; prefix - to turn off; swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom and aalt take an alternate's number as `tag=N` with N from 0 to {_1}, as `salt=2`) неизвестная функция OpenType `{t}` (liga, calt, dlig, smcp, frac, onum, tnum, ordn, swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom, aalt; префикс - отключает функцию; swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom и aalt принимают номер альтернативы в виде `tag=N`, где N от 0 до {_1}, например `salt=2`) +@msg unknown OpenType feature `{t}` in featureChanges (the tags `features` takes) неизвестная функция OpenType `{t}` в featureChanges (допустимы теги, которые принимает `features`) +@msg unknown PDF preset `{name}` (presets: {_1}) неизвестный набор PDF `{name}` (наборы: {_1}) +@msg unknown Warp style неизвестный стиль деформации +@msg unknown alignToPath `{a}` неизвестное значение alignToPath `{a}` +@msg unknown arrowhead {v} неизвестная стрелка {v} +@msg unknown artboardLayout key `{k}` (layout, columns, spacing, rightToLeft) неизвестный ключ artboardLayout `{k}` (layout, columns, spacing, rightToLeft) +@msg unknown attribute `{attribute}` неизвестный атрибут `{attribute}` +@msg unknown attribute `{k}` неизвестный атрибут `{k}` +@msg unknown axis `{other}` (vertical|horizontal|free) неизвестная ось `{other}` (vertical|horizontal|free) +@msg unknown blend mode `{b}` неизвестный режим наложения `{b}` +@msg unknown blend mode {b} неизвестный режим наложения {b} +@msg unknown brush type `{o}` неизвестный тип кисти `{o}` +@msg unknown category `{c}` неизвестная категория `{c}` +@msg unknown category `{c}` ({_1}) неизвестная категория `{c}` ({_1}) +@msg unknown character `{c}` неизвестный символ `{c}` +@msg unknown character style number field неизвестное числовое поле стиля символов +@msg unknown dither `{d}` (diffusion, pattern, noise or none) неизвестный дизеринг `{d}` (diffusion, pattern, noise или none) +@msg unknown effect `{e}` неизвестный эффект `{e}` +@msg unknown end {e} неизвестное значение end {e} +@msg unknown flattenerPreset `{name}` (High Resolution, Medium Resolution, Low Resolution or a saved one: see flattener.presets.list) неизвестный flattenerPreset `{name}` (High Resolution, Medium Resolution, Low Resolution или сохранённый набор: см. flattener.presets.list) +@msg unknown format `{f}` (vcswatches, gpl, ase or css) неизвестный формат `{f}` (vcswatches, gpl, ase или css) +@msg unknown from {f} неизвестное значение from {f} +@msg unknown graph type `{t}` неизвестный тип диаграммы `{t}` +@msg unknown grid colours `{name}` (one of {_1}) неизвестные цвета сетки `{name}` (допустимо одно из: {_1}) +@msg unknown gridType `{t}` неизвестное значение gridType `{t}` +@msg unknown highlight `{v}` неизвестное значение highlight `{v}` +@msg unknown intent `{i}` неизвестное значение intent `{i}` +@msg unknown issue kind {id} неизвестный вид проблемы {id} +@msg unknown issue kind {v} неизвестный вид проблемы {v} +@msg unknown knockout state {k} неизвестное состояние вырезания {k} +@msg unknown language `{language}` (one of {_1}) неизвестный язык `{language}` (допустимо одно из: {_1}) +@msg unknown language `{l}` (one of {_1}) неизвестный язык `{l}` (допустимо одно из: {_1}) +@msg unknown method `{m}` ({_1}) неизвестный метод `{m}` ({_1}) +@msg unknown mode `{other}` (gray, rgb, hsb, lab, cmyk or web) неизвестный режим `{other}` (gray, rgb, hsb, lab, cmyk или web) +@msg unknown mode `{other}` (mono|cmyk) неизвестный режим `{other}` (mono|cmyk) +@msg unknown mode `{other}` (rgb|cmyk|gray|global) неизвестный режим `{other}` (rgb|cmyk|gray|global) +@msg unknown mode `{other}` (set, add, subtract) неизвестный режим `{other}` (set, add, subtract) +@msg unknown mode `{o}` неизвестный режим `{o}` +@msg unknown mode {m} неизвестный режим {m} +@msg unknown model `{other}` неизвестная модель `{other}` +@msg unknown model `{other}` (keep, new or document) неизвестная модель `{other}` (keep, new или document) +@msg unknown op {o} неизвестная операция {o} +@msg unknown order `{o}`: toggle, front, forward, backward or back неизвестный порядок `{o}`: toggle, front, forward, backward или back +@msg unknown overprints `{v}` (preserve, simulate or discard) неизвестное значение overprints `{v}` (preserve, simulate или discard) +@msg unknown panel неизвестная панель +@msg unknown panel `{panel}` неизвестная панель `{panel}` +@msg unknown parameter `{key}` неизвестный параметр `{key}` +@msg unknown parameter `{within}settings.{format}`; {why} неизвестный параметр `{within}settings.{format}`; {why} +@msg unknown parameter `{within}{key}`; {why} неизвестный параметр `{within}{key}`; {why} +@msg unknown pieLegend `{v}` (none, standard or wedges) неизвестное значение pieLegend `{v}` (none, standard или wedges) +@msg unknown piePosition `{v}` (even, ratio or stacked) неизвестное значение piePosition `{v}` (even, ratio или stacked) +@msg unknown pieSort `{v}` (none, all or first) неизвестное значение pieSort `{v}` (none, all или first) +@msg unknown plate `{n}` неизвестная пластина `{n}` +@msg unknown preference `{k}` неизвестная настройка `{k}` +@msg unknown profile {id} (see stroke.widthProfile.list) неизвестный профиль {id} (см. stroke.widthProfile.list) +@msg unknown proof target `{t}` неизвестная цель цветопробы `{t}` +@msg unknown quotes key `{k}` (double, single) неизвестный ключ quotes `{k}` (double, single) +@msg unknown reduction `{reduction}` (selective, perceptual, adaptive, web, gray, blackWhite, uniform or document) неизвестная редукция `{reduction}` (selective, perceptual, adaptive, web, gray, blackWhite, uniform или document) +@msg unknown resolution `{v}` неизвестное разрешение `{v}` +@msg unknown rule `{rule}` ({_1}) неизвестное правило `{rule}` ({_1}) +@msg unknown rule `{r}` (see color.harmony) неизвестное правило `{r}` (см. color.harmony) +@msg unknown setting `{k}` неизвестный параметр настройки `{k}` +@msg unknown shape `{v}` (circle|ellipse|square|diamond|line) неизвестная фигура `{v}` (circle|ellipse|square|diamond|line) +@msg unknown spacing `{o}` (smooth|steps|distance) неизвестный интервал `{o}` (smooth|steps|distance) +@msg unknown tileType `{t}` ({_1}) неизвестное значение tileType `{t}` ({_1}) +@msg unknown units неизвестные единицы +@msg unknown units `{u}` неизвестные единицы `{u}` +@msg unknown value axis `{v}` (left, right or both) неизвестная ось значений `{v}` (left, right или both) +@msg unknown variation `{v}` (tintsShades|warmCool|vividMuted) неизвестный вариант `{v}` (tintsShades|warmCool|vividMuted) +@msg unknown warp style `{s}` неизвестный стиль деформации `{s}` +@msg unknown {key} `{v}` (none, short or full) неизвестное значение {key} `{v}` (none, short или full) +@msg unknown {key} profile `{n}` неизвестный профиль {key} `{n}` +@msg unknown {k} key `{key}` (size, position) неизвестный ключ {k} `{key}` (size, position) +@msg unmatched ')' непарная ')' +@msg unreadable object нечитаемый объект +@msg unsafe destination file name небезопасное имя файла назначения +@msg unterminated character class незавершённый класс символов +@msg unterminated group незавершённая группа +@msg use paths or compound paths используйте контуры или составные контуры +@msg useArtboards must be true or false, not {v} useArtboards должно быть true или false, а не {v} +@msg value for `{var}` must match its variable kind значение `{var}` должно соответствовать типу переменной +@msg variable `{_1}` is already defined переменная `{_1}` уже определена +@msg variable `{name}` has no `trait` у переменной `{name}` нет `trait` +@msg variable `{name}` is already defined переменная `{name}` уже определена +@msg variable `{name}` is declared twice переменная `{name}` объявлена дважды +@msg variable `{to}` already exists переменная `{to}` уже существует +@msg view is required требуется view +@msg view must be one of {_1} view должно быть одним из: {_1} +@msg warpStyle can only edit an applied Warp effect warpStyle может изменять только применённый эффект «Деформация» +@msg width and height must be more than 0 and at most {limit} width и height должны быть больше 0 и не больше {limit} +@msg width factors must be finite коэффициенты ширины должны быть конечными +@msg width must be positive width должно быть положительным +@msg width out of range ширина вне диапазона +@msg width/height must be > 0 width/height должны быть > 0 +@msg with no hem and no grommets there is nothing to mark без подгиба и люверсов размечать нечего +@msg wordGap and lineGap need area type in the selection для wordGap и lineGap в выделении нужен текст в области +@msg x and y must be finite numbers x и y должны быть конечными числами +@msg x and y must be given together x и y нужно указывать вместе +@msg xpath needs its variables as an object для xpath переменные нужны в виде объекта +@msg xpath needs the expression as a string для xpath выражение нужно в виде строки +@msg zone needs an anchor: dock beside a panel with anchor, or in a new dock column with side (Start or End) для zone нужен anchor: прикрепите рядом с панелью через anchor или в новом столбце прикрепления через side (Start или End) +@msg zoom must be positive zoom должно быть положительным +# Messages that begin with a placeholder. +@msg {C}: no effect at index {list} {C}: нет эффекта с индексом {list} +@msg {DEFAULT_PRESET} is protected and stays {DEFAULT_PRESET} защищён и не удаляется +@msg {DEFAULT_PRESET} is protected: save the settings under another name {DEFAULT_PRESET} защищён: сохраните настройки под другим именем +@msg {GRANT_NOT_REMOVED}, and its settings and cache can't be moved back from {_1} to {_2}: {e} {GRANT_NOT_REMOVED}, а его настройки и кэш невозможно переместить обратно из {_1} в {_2}: {e} +@msg {LABEL} produced an empty result {LABEL}: получен пустой результат +@msg {_1} MB of document, at most {_2} MB документ размером {_1} МБ при допустимых {_2} МБ +@msg {_1} MB of images, at most {_2} MB изображения размером {_1} МБ при допустимых {_2} МБ +@msg {_1} bytes of RGBA data for a {width} × {height} image данных RGBA: {_1} байт для изображения {width} × {height} +@msg {_1} can't be read, or changed since it was read: relink or update it first {_1} невозможно прочитать, или файл изменился после чтения: сначала восстановите связь или обновите его +@msg {_1} can't go into {into} {_1} нельзя поместить в {into} +@msg {_1} can't limit printing to low resolution: choose PDF 1.4 or later, or allow high-resolution printing {_1} не может ограничить печать низким разрешением: выберите PDF 1.4 или новее либо разрешите печать с высоким разрешением +@msg {_1} files can't be opened yet файлы {_1} пока нельзя открыть +@msg {_1} files can't be password-protected: remove the passwords or choose no standard файлы {_1} нельзя защитить паролем: уберите пароли или не выбирайте стандарт +@msg {_1} files can't be {_2} файлы {_1} не могут быть {_2} +@msg {_1} files can't carry editing data: turn off preserveEditing файлы {_1} не могут содержать данные редактирования: отключите preserveEditing +@msg {_1} files can't have PDF layers: turn off createLayers файлы {_1} не могут содержать слои PDF: отключите createLayers +@msg {_1} files need a creation date, and this platform has no clock to give one файлам {_1} нужна дата создания, а на этой платформе нет часов, чтобы её получить +@msg {_1} is not a folder: {e} {_1} не является папкой: {e} +@msg {_1} isn't a path {_1} не является контуром +@msg {_1} options: {e} параметры {_1}: {e} +@msg {_1} paints nothing to rasterize {_1} не рисует ничего, что можно растеризовать +@msg {_1} passwords can have up to {MAX_LEGACY_PASSWORD} ASCII characters (PDF 1.7 and later take any) пароли {_1} могут содержать до {MAX_LEGACY_PASSWORD} символов ASCII (PDF 1.7 и новее принимают любые) +@msg {_1} with linked images or an image map writes several files: use document.export {_1} со связанными изображениями или картой изображения записывает несколько файлов: используйте document.export +@msg {_1} writes one file per artboard here: use document.export, or name one artboard здесь {_1} записывает по одному файлу на монтажную область: используйте document.export или укажите одну монтажную область +@msg {_1} × {_2} pixels is too large for {_3} (at most {max} pixels a side): lower the scale {_1} × {_2} пикселей слишком много для {_3} (не более {max} пикселей по стороне): уменьшите масштаб +@msg {_1}: belongs to another account {_1}: принадлежит другой учётной записи +@msg {_1}: not a folder of its own {_1}: не отдельная папка +@msg {_1}: not a plain file {_1}: не обычный файл +@msg {_1}: {_2} and {_3} are in the way {_1}: мешают {_2} и {_3} +@msg {code}: {0} {code}: {0} +@msg {dest}: {e} {dest}: {e} +@msg {dir}: {e} {dir}: {e} +@msg {doc} has no folder у {doc} нет папки +@msg {file} isn't linked {file} не связан +@msg {file} names more than one linked JavaScript file {file} обозначает больше одного связанного файла JavaScript +@msg {folder} is not a package folder {folder} не является папкой пакета +@msg {folder}: more than {max} files and folders {folder}: больше {max} файлов и папок +@msg {folder}: {e} {folder}: {e} +@msg {g} is not a Live Paint group {g} не является группой быстрой заливки +@msg {id} is not a slice {id} не является фрагментом +@msg {key} must be 0–{MAX_ADD_AROUND} pt {key} должно быть 0–{MAX_ADD_AROUND} pt +@msg {key} must be [x,y] {key} должно быть [x,y] +@msg {key} must be a percentage {min}..100 {key} должно быть процентом {min}..100 +@msg {key} must be a positive number, not {n} {key} должно быть положительным числом, а не {n} +@msg {key} must be a positive number, not {v} {key} должно быть положительным числом, а не {v} +@msg {key} must be one of {_1} {key} должно быть одним из: {_1} +@msg {key} must be {_1}, got {s} {key} должно быть {_1}, получено {s} +@msg {key} must name a floating panel {key} должно указывать плавающую панель +@msg {key} must name a panel in another group {key} должно указывать панель в другой группе +@msg {key} must name a panel that shows {key} должно указывать показанную панель +@msg {key} must name a registered panel {key} должно указывать зарегистрированную панель +@msg {kind} files have no transparency, and the file would have {what}: flatten it first (object.flattenTransparency) в файлах {kind} нет прозрачности, а в файле оказалось бы {what}: сначала объедините прозрачность (object.flattenTransparency) +@msg {kind} images can't be opened (see document.formats) изображения {kind} невозможно открыть (см. document.formats) +@msg {k} `{v}` is not one of the choices {k} `{v}` не входит в число допустимых вариантов +@msg {k} has control characters{_1} {k} содержит управляющие символы{_1} +@msg {k} is too long (at most {MAX_TEXT} characters) {k} слишком длинно (не более {MAX_TEXT} символов) +@msg {k} must be > 0 {k} должно быть > 0 +@msg {k} must be a number (pt) or a length such as "210 mm" {k} должно быть числом (pt) или длиной, например "210 mm" +@msg {k} must be a number from {min} to {max} {k} должно быть числом от {min} до {max} +@msg {k} must be a number or "auto" {k} должно быть числом или "auto" +@msg {k} must be a string {k} должно быть строкой +@msg {k} must be text {k} должно быть текстом +@msg {k} must be true or false {k} должно быть true или false +@msg {k} must be {{size?, position?}} {k} должно быть {{size?, position?}} +@msg {k}: a custom arrowhead's path needs an area to fill and at most {most} anchors and {most} subpaths, each anchor within {far} head units of its tip {k}: контуру пользовательской стрелки нужна область для заливки, не более {most} опорных точек и {most} вложенных контуров, причём каждая опорная точка должна быть не дальше {far} единиц наконечника от его острия +@msg {k}: bad custom arrowhead path: {e} {k}: недопустимый контур пользовательской стрелки: {e} +@msg {k}: bad custom arrowhead: {e} {k}: недопустимая пользовательская стрелка: {e} +@msg {k}: can't read `{s}` as a length {k}: `{s}` невозможно прочитать как длину +@msg {k}: custom must be a name {k}: custom должно быть именем +@msg {label} must be a number at most {max} {label} должно быть числом не больше {max} +@msg {label} must be a number from -1296 to 1296 {label} должно быть числом от -1296 до 1296 +@msg {label} must be a number from 1 to 10000 {label} должно быть числом от 1 до 10000 +@msg {name} `{s}`: {ids} {name} `{s}`: {ids} +@msg {name} is built in and can't be deleted {name} встроен, его нельзя удалить +@msg {name} must be a number {name} должно быть числом +@msg {name} must be {lo}–{hi}{unit} (got {v}) {name} должно быть {lo}–{hi}{unit} (получено {v}) +@msg {name}: CRC or size mismatch {name}: несовпадение CRC или размера +@msg {name}: only this Affinity file's embedded preview could be read; use File › Open to see it with its warning, or export SVG or PDF from Affinity before placing {name}: удалось прочитать только встроенный предпросмотр этого файла Affinity; используйте «Файл › Открыть», чтобы увидеть его с предупреждением, или перед помещением экспортируйте SVG или PDF из Affinity +@msg {name}: {e} {name}: {e} +@msg {native}; its embedded preview can't be read either ({e}) {native}; его встроенный предпросмотр тоже невозможно прочитать ({e}) +@msg {path}: copy takes a DCS file only when its plates are inside it; relink to it where its plate files are {path}: copy принимает файл DCS, только когда его пластины находятся внутри него; восстановите связь с ним там, где находятся файлы его пластин +@msg {path}: larger than {_1} MB {path}: больше {_1} МБ +@msg {saving} failed: {e} {saving}: ошибка: {e} +@msg {shown} is not an XPath 1.0 function {shown} не является функцией XPath 1.0 +@msg {std} files are CMYK, and the file would have colours in {_1} файлы {std} используют CMYK, а в файле оказались бы цвета в {_1} +@msg {std} files embed their fonts, and the file would have one that isn't файлы {std} внедряют свои шрифты, а в файле оказался бы невнедрённый шрифт +@msg {target} is the file this document was read from, and reading it left things out ({what}): writing over it would lose them for good. Write another file instead, or pass acknowledgeLoss: true to replace it anyway {target} — файл, из которого прочитан этот документ, и при чтении часть содержимого была пропущена ({what}): при записи поверх него она была бы потеряна навсегда. Запишите другой файл или передайте acknowledgeLoss: true, чтобы всё равно заменить его +@msg {ty} brushes need selected art (or params.{k}) кистям {ty} нужна выделенная графика (или params.{k}) +@msg {v} is not an asset id {v} не является идентификатором ресурса +@msg {v} names no layer or sublayer {v} не указывает ни слой, ни подслой +@msg {what} can't be intertwined {what} нельзя переплести +@msg {what} doesn't fit the paper with its bleed and marks {what} не помещается на бумаге вместе с вылетом и метками +@msg {what} is not a function {what} не является функцией +@msg {what} would print more than {MAX_COPIES_PER_SHEET} copies on a sheet: scale it up для {what} на листе печаталось бы больше {MAX_COPIES_PER_SHEET} копий: увеличьте масштаб +@msg {what} would print on more than {MAX_TILES} tiles: scale it down для {what} потребовалось бы больше {MAX_TILES} плиток: уменьшите масштаб +@msg {what} {i} out of range {what} {i} вне диапазона diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 6c9deb97d0..12cbbb07e0 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -3505,6 +3505,27 @@ fn dataset_import_cell_errors_are_translated() { } } +/// Russian shows command, script and file messages in Russian: a whole message, a message that +/// begins with a feature name, messages with a name, a number or a command id filled in, and the +/// two messages whose catalog rows escape a backslash. +#[test] +fn russian_translates_command_script_and_file_messages() { + let ru = Lang::from_code("ru").expect("registered"); + for (english, russian) in [ + ("CSV is empty", "CSV пуст"), + ("Offset Path: the path is too complex to offset", "Смещение контура: контур слишком сложен для смещения"), + ("no swatch named `Gold`", "нет образца с именем `Gold`"), + ("object 12 is not an Intertwine group", "объект 12 не является группой переплетения"), + ("no slice 4 in the image (see slice.list)", "в изображении нет фрагмента 4 (см. slice.list)"), + ("give origin: [x, y], or reset: true", "укажите origin: [x, y] или reset: true"), + ("`kinsoku` must be \"none\", \"hard\" or \"soft\"", "`kinsoku` должно быть \"none\", \"hard\" или \"soft\""), + ("\\ at end of pattern", "\\ в конце шаблона"), + ("a \\u escape needs four hexadecimal digits", "после \\u нужны четыре шестнадцатеричные цифры"), + ] { + assert_eq!(message(ru, english), russian, "{english}"); + } +} + /// The errors of the parameter checks that many commands share (a number given as text, a missing /// number or index, a fraction for a whole number, `ids` that aren't a list of object ids, an /// `ids` entry or an `id` that is negative, an object id that names no object, a date that isn't diff --git a/docs/localization-parity.md b/docs/localization-parity.md index cd8dc33f30..81d4183b07 100644 --- a/docs/localization-parity.md +++ b/docs/localization-parity.md @@ -53,7 +53,7 @@ plus review. Native-speaker review is human work and isn't in the hours. | Italian | `it` | 4,011 / 4,020 | full | | Dutch | `nl` | 7,299 rows, 1,609 of them `@msg` and 47 `@msgplural` (counted 2026-11-13 on `main` at `9a1a158a3`): in `COMPLETE_MESSAGES`, and the untranslated report lists the same missing messages for it as for German; one/other plurals | full | | Danish | `da` | 5,279 rows, 750 of them `@msg` (counted 2026-10-21): menus and `tl!` literals complete when counted; its messages are partial; one/other plurals | full | -| Russian | `ru` | 4,009 / 4,020 | full | +| Russian | `ru` | 9,259 rows, 3,444 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): in `COMPLETE_MESSAGES`; the untranslated report lists 46 menu strings, 21 `tl!` literals and 11 undo labels as missing | full | | Ukrainian | `uk` | 4,009 / 4,020 (one/few/many plurals) | full | | Hungarian | `hu` | 5,253 rows (counted 2026-10-21): menus, `tl!` literals and messages complete when counted; one plural form | full | | Polish | `pl` | 5,130 rows (counted 2026-10-21): menus, `tl!` literals and messages complete when counted; one/few/many plurals | full; native review pending | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 26681e5b7f..66899f2898 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1355,6 +1355,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur With the Selection tool, the Tabs panel shows the ruler and stops of the first paragraph of the first selected text object, also when the text is inside a selected group or a shape is selected before it; a selection without text shows "No text selected". A stop set on that ruler is set on every selected text object and the text in selected groups, and other objects are left as they were. This is VectorCraft's own rule. Tests `panels::tabs::tests::the_ruler_shows_text_selected_after_an_object_that_is_not_text`, `the_ruler_shows_text_inside_a_selected_group`, `a_stop_added_on_a_mixed_selection_sets_every_selected_text` and `a_selection_without_text_shows_no_ruler`. The Tabs panel menu's Clear All Tabs (`text.tabs.clear`), Delete Tab and Repeat Tab (`text.tabs.set`) can be chosen while the panel's ruler shows tab stops. Delete Tab removes the stop selected on the ruler. Repeat Tab replaces the stops after the selected stop with up to 20 copies of it. The copies are spaced by the selected stop's distance from the stop before it, or from the paragraph's left indent (18 pt further in for each list level past the first) when it is the first stop, and no copy is placed at 2,000 pt or beyond. Clear All Tabs removes every stop, so the default stops every ½ inch apply again. - **Interface languages, vertical type:** Preferences ▸ User Interface (or VectorCraft ▸ Language on macOS) picks Automatic (the system locale) or a registered language, persisted as `interfaceLanguage`. Translations come from per-language catalogs (`i18n/*.tsv`): Traditional and Simplified Chinese, Japanese, German (every `de-*` locale), Spanish (neutral international Spanish, for every `es-*` locale), French (every `fr-*` locale), Italian (every `it-*` locale), Russian (every `ru-*` locale) and Ukrainian (every `uk-*` locale), Catalan (every `ca-*` locale) and Polish (every `pl-*` locale; AI-drafted, native review pending) cover the whole interface, Czech every menu label; Czech, German, Greek, Spanish, French, Hungarian, Italian, Japanese, Korean, Vietnamese, Polish, Brazilian Portuguese, Russian, Simplified Chinese, Traditional Chinese, Swedish, Ukrainian, Finnish and Dutch also translate status-bar and error messages as they are shown (`@msg` templates, every message literal tested; the messages themselves stay English for agents); untranslated text stays English. Japanese and Chinese glyphs come from the craft-fonts build input (release builds) or the installed fonts, Czech, German, Spanish, French, Italian, Russian and Ukrainian ones from the bundled UI fonts. The web app follows the browser's languages (or `?lang=`). The Basic toolbar's Type button holds Vertical Type in its flyout. Vertical Type, Vertical Area Type and Vertical Type on a Path create vertical text (columns right to left, upright CJK glyphs and marks with `vert` alternates, Latin and longer numbers on their side, two- and three-digit numbers set as tate-chu-yoko in one em of the column (kept whole when justified), upright glyphs centred on the column (tracked or justified too), point type's anchor on the first column's centre line; on a vertical path, upright glyphs and tate-chu-yoko blocks face the path's start, and letters on their side are a quarter turn clockwise from them (with Skew, 3D Ribbon and Stair Step only on a path that runs to the right), in one column that Align to Path Baseline or Center centers on the path and that the caret and selection span); kinsoku applies to horizontal and vertical Japanese (Paragraph panel › Kinsoku Set, `text.setFormat {kinsoku}`: Hard, the default, keeps closing marks, iteration marks, the prolonged sound mark and small kana off the line start and opening brackets off its end; Soft lets 々, ー and small kana start a line as JLREQ's level 3 rules do; None turns it off), and justified Japanese lines spread their room between characters (not inside Latin words); Paragraph panel › Mojikumi Set (shown with Preferences › Type › Show East Asian Options, `text.setFormat {mojikumi}`): None or Line-end Punctuation Half Width (new type's default, as in Illustrator; older documents and imported text keep None) shares one half-em space between consecutive punctuation, sets a closing mark ending a line half width and an opening bracket starting a line flush with its start (a paragraph's first line at its first-line indent, JIS X 4051's principle in JLREQ 3.1.5), and puts a quarter em between Japanese and Latin letters or digits; Paragraph panel menu › Top-to-Top / Bottom-to-Bottom Leading measures leading from em box top to top (area type's first line touches the frame) or from baseline to baseline (new type in a Japanese interface starts top to top, with em box centre character alignment, #432); Paragraph panel menu › Burasagari None / Regular / Force (`text.setFormat {burasagari: "none"|"standard"|"forced"}`) hangs an East Asian comma or full stop (、。,.、。) ending an area type line outside it, Regular (new type's default) when it doesn't fit and Force always (the rest of the line then fills the measure; closing brackets and Latin punctuation don't hang); Character panel menu › Character Alignment (with the East Asian options; `text.setFormat` or `text.setRangeStyle {charAlign}`) lines characters smaller than the largest on their line up on the Roman baseline, the em box top/right, centre or bottom/left, or the ICF (ideographic character face) top/right or bottom/left, from the font's BASE table or, without one, the average ink box of some ideographs and kana; Proportional Metrics (the same menu; `{proportionalMetrics}`) sets full-width glyphs on the font's proportional widths (OpenType `palt`) in horizontal type and upright glyphs on its proportional heights (`vpal`, shaped top to bottom; fonts without vertical metrics keep their cells) in vertical type, and Line-end Punctuation Half Width takes nothing more off the punctuation they re-spaced; Type ▸ Type Orientation switches existing text; caret, selection, hit testing and arrow keys follow the writing direction. Vertical text exports to PDF as real text and to SVG as outlines. The interface is available in Polish (`pl`): menus, panels, dialogs and messages, with one/few/many plurals; AI-drafted, native review pending (#1498). + The Russian catalog (`crates/ui-egui/src/i18n/ru.tsv`) has 1,811 more `@msg` rows, for status and error messages of commands, scripts and file import and export, 3,444 `@msg` rows in all counted on 2026-11-13 (`russian_translates_command_script_and_file_messages` in `crates/ui-egui/src/i18n/tests.rs`). Scores and estimates are unchanged. With Line-end Punctuation Half Width, both composers measure a line with its last character set as narrow as Mojikumi sets it ([the help page](https://helpx.adobe.com/illustrator/desktop/design-with-text/edit-format-text/use-mojikumi-for-japanese-text-composition.html)): a closing bracket, comma or full stop that fits at half width ends the line, and the character before it no longer goes to the next line with it. A mark that already lost its half to the punctuation after it and a line that ends in a hyphen take nothing more off, and the quarter em between Japanese and Latin text counts only where the line ends there. Kinsoku Shori Type and Burasagari Regular measure lines the same way; right-to-left lines and Mojikumi None break as before. In a frame that is not a rectangle, or with text wrap, a line's first word is measured as it is set (an opening bracket at its start flush, its last character narrowed) when layout looks for a line wide enough for it, and it ends only where the line may break, so kinsoku keeps an opening bracket with the character after it and a No Break run counts whole (`crates/text/src/layout/wrapping_tests.rs`, `crates/text/src/tests/vertical.rs`). Scores and estimates are unchanged. The Paragraph panel's Mojikumi Set lists the five predefined sets the help page names (None, YakumonoHankaku, GyomatsuYakumonoHankaku, GyomatsuYakumonoZenkaku and YakumonoZenkaku), then Line-end Punctuation Half Width, and `text.setFormat {mojikumi}` takes each of them. YakumonoHankaku sets every bracket, comma and full stop half width and takes a quarter em off each side of a middle dot; GyomatsuYakumonoHankaku keeps punctuation full width inside a line, sets an opening bracket flush at a line's start and a closing mark half width at its end, and takes the quarter em after a middle dot off at a line's end; GyomatsuYakumonoZenkaku keeps punctuation full width and adds a quarter em between Japanese and Latin text; YakumonoZenkaku sets characters as None does. These widths are VectorCraft's own rules, from the help page's one-line description of each set. Both composers and vertical type measure each line as it is set, the sets save with the document and paragraph styles, and a `.ai` save reports the new sets as left out (`crates/text/src/tests/vertical.rs`, `crates/ui-egui/src/panels/paragraph/tests.rs`). Scores and estimates are unchanged. Interface text in characters the interface's fonts lack, drawn in a bundled Japanese, Georgian or Devanagari face or in an installed font that covers them, sits on the baseline of the Latin text beside it, monospace text included (#5816; `crates/ui-egui/src/ui_fonts.rs`, `crates/ui-egui/src/theme.rs`). From 0c3bc39009e0b0a3f6920943da1d2ce9ed822504 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 20:13:21 -0800 Subject: [PATCH 03/52] .ai save: type in an envelope stays editable An envelope whose contents hold type was written to the editing data as its distorted art, so the type opened as outlines. The type is now written as type in the envelope's contents, in the form the .ai reader opens as a live envelope of type (TypedEnvelope in crates/eps/src/import/ai/envelope.rs), with Edit Contents off or on. An envelope whose type is threaded, has text wrap options or is written as its outlines (mirrored type, type in a symbol's art) is still written as its distorted art, with the warning. A record taken back for the object limit or for outlined type also takes its stories out of the text document. The writer charges one more object for each text object in the dictionary's contents, where the reader reads a copy of it. --- crates/eps/src/ai_editing/tests.rs | 191 +++++++++++++++++- crates/eps/src/ai_editing/writer.rs | 27 ++- crates/eps/src/ai_editing/writer/envelopes.rs | 49 ++++- crates/eps/src/ai_editing/writer/texts.rs | 27 +++ crates/eps/src/import.rs | 4 +- docs/target-app-parity.md | 3 +- 6 files changed, 275 insertions(+), 26 deletions(-) diff --git a/crates/eps/src/ai_editing/tests.rs b/crates/eps/src/ai_editing/tests.rs index 967c982ad4..1f47e7276c 100644 --- a/crates/eps/src/ai_editing/tests.rs +++ b/crates/eps/src/ai_editing/tests.rs @@ -9687,7 +9687,8 @@ fn an_envelope_is_written_in_the_order_the_reader_reads_it() { } /// Envelopes the reader would open in another shape, or not at all, are written as their distorted -/// art with a warning, and open as that art: an envelope of type, one in a turned frame, a warp drawn +/// art with a warning, and open as that art: an envelope of type with text wrap options, one of +/// mirrored type (written as its outlines), one in a turned frame, a warp drawn /// without its style's net, a mesh the reader would lay out the other way round, a top object /// whose sides don't pair up, a Fidelity that isn't a whole number and bounds margins kept with /// Distort Appearance off. Other live objects keep their own warning. @@ -9702,10 +9703,24 @@ fn envelopes_the_reader_cannot_open_live_are_written_as_their_art() { f(&mut doc.node_mut(id).unwrap().kind); doc }; - let typed = change(&|k| { + let type_node = |id: u64| { + let t = vectorcraft_doc::TextObject::point(vectorcraft_geom::Point::new(50.0, 50.0), "Type", vectorcraft_doc::CharStyle::default()); + Node::new(vectorcraft_doc::NodeId(id), NodeKind::Text(Box::new(t))) + }; + let wrapped_type = change(&|k| { if let NodeKind::Envelope { content, .. } = k { - let t = vectorcraft_doc::TextObject::point(vectorcraft_geom::Point::new(50.0, 50.0), "Type", vectorcraft_doc::CharStyle::default()); - content.push(Arc::new(Node::new(vectorcraft_doc::NodeId(9_000), NodeKind::Text(Box::new(t))))); + let mut t = type_node(9_000); + t.extras_mut().wrap = Some(vectorcraft_doc::TextWrap { offset: 6.0, invert: false }); + content.push(Arc::new(t)); + } + }); + let mirrored_type = change(&|k| { + if let NodeKind::Envelope { content, .. } = k { + let mut t = type_node(9_001); + if let NodeKind::Text(t) = &mut t.kind { + t.xf = Affine::new([-1.0, 0.0, 0.0, 1.0, 50.0, 50.0]); + } + content.push(Arc::new(t)); } }); let turned = change(&|k| { @@ -9749,7 +9764,8 @@ fn envelopes_the_reader_cannot_open_live_are_written_as_their_art() { } }); let cases = [ - ("type", typed), + ("type with text wrap options", wrapped_type), + ("mirrored type, written as its outlines", mirrored_type), ("turned", turned), ("old warp", old_warp), ("sideways mesh", sideways), @@ -9774,6 +9790,171 @@ fn transpose(points: Vec, rows: usize, cols: usize) -> Vec Node { + let mut envelope = envelope_node(doc, kind, 50.0, editing, vectorcraft_doc::live::EnvelopeOptions::NEW); + let t = vectorcraft_doc::TextObject::point(vectorcraft_geom::Point::new(104.0, 62.0), "Type", style(24.0, Color::rgb(0.0, 0.0, 1.0))); + let text = text_node(doc, t); + let NodeKind::Envelope { content, .. } = &mut envelope.kind else { unreachable_envelope() }; + content.push(Arc::new(text)); + envelope +} + +/// A 200 × 100 document of `envelope` alone. +fn alone(envelope: Node) -> Document { + let mut doc = Document::new(200.0, 100.0); + let layer = doc.layers[0].id; + doc.insert(Some(layer), usize::MAX, envelope).unwrap(); + doc +} + +/// `doc` written, then read back through its editing copy beside a page that draws as `doc` does, +/// its live objects as their art: the objects on its first layer, the writer's warnings and the +/// reader's notes. +fn read_with_page(doc: &Document) -> (Vec>, Vec, Vec) { + let (p, warnings) = private_data(doc, &opts()).unwrap(); + let mut page = doc.clone(); + let ids: Vec = page.layers[0].children().into_iter().flatten().map(|n| n.id).collect(); + for id in ids { + if let Some(n) = page.node_mut(id) { + *n = vectorcraft_effects::expand_live_deep(Some(doc), n); + } + } + let (read, notes, layers) = crate::layered_ai(&p.data, page, vec![], false, false, 1.0); + assert!(layers, "{notes:?}"); + (read.layers[0].children().cloned().unwrap_or_default(), warnings, notes) +} + +/// The type in `nodes` and their groups, with whether it shows. +fn type_in(nodes: &[Arc]) -> Vec<(String, bool)> { + let mut out = vec![]; + for n in nodes { + match &n.kind { + NodeKind::Text(t) => out.push((t.plain_text(), n.visible)), + NodeKind::Group { children, .. } => out.extend(type_in(children)), + _ => {} + } + } + out +} + +/// An envelope whose contents hold type keeps the type as type: a warp, a mesh and a top object +/// envelope, with Edit Contents off and on, open as the same live envelope with the type shown +/// and editable in its contents beside the rest of them, no copy of the type left on the layer, +/// and again when saved as they opened. +#[test] +fn an_envelope_of_type_is_read_back_live_with_its_type() { + for (name, kind) in live_envelope_kinds() { + for editing in [false, true] { + let what = format!("{name}, editing {editing}"); + let mut doc = Document::new(200.0, 100.0); + let mut envelope = typed_envelope_node(&mut doc, kind.clone(), editing); + for round in ["saved", "saved again"] { + doc = alone(envelope); + let (top, warnings, notes) = read_with_page(&doc); + assert!(!warnings.iter().any(|w| w == writer::ENVELOPES || w == writer::TYPE), "{what}, {round}: {warnings:?}"); + assert!( + !notes.iter().any(|n| n == crate::import::ENVELOPE_TYPE_DRAWN || n == crate::import::ENVELOPE_DRAWN), + "{what}, {round}: {notes:?}" + ); + let [back] = top.as_slice() else { panic!("{what}, {round}: {top:#?} {notes:?}") }; + let NodeKind::Envelope { content, kind: got, editing: e, fidelity, .. } = &back.kind else { + panic!("{what}, {round}: {back:#?} {notes:?}") + }; + assert_eq!((*e, *fidelity), (editing, 50.0), "{what}, {round}"); + assert!(same_envelope_kind(&kind, got), "{what}, {round}: {got:?}"); + assert_eq!(back.name.as_deref(), Some("Bent"), "{what}, {round}"); + assert_eq!(type_in(content), [("Type".to_string(), true)], "{what}, {round}"); + let colors: Vec> = + content.iter().filter(|c| !matches!(c.kind, NodeKind::Text(_))).map(|c| c.appearance.fill_paint().color()).collect(); + assert_eq!(colors, [Some(Color::rgb(1.0, 0.0, 0.0)), Some(Color::rgb(0.0, 0.0, 1.0))], "{what}, {round}"); + envelope = (**back).clone(); + } + } + } +} + +/// An envelope of type is written live with room for every object the reader reads of it, the +/// copy of its type it reads in the envelope's dictionary included. Written as its art, it takes +/// its type's story out of the text document with it: where its record doesn't fit within the +/// object limit, and where other type in its contents is written as its outlines (mirrored type). +/// The file then has no text document. +#[test] +fn an_envelope_of_type_written_as_its_art_leaves_no_story() { + use vectorcraft_doc::live::EnvelopeKind; + let kind = EnvelopeKind::Mesh { rows: 2, cols: 3, points: envelope_points(2, 3), handles: vec![] }; + for editing in [false, true] { + let mut doc = Document::new(200.0, 100.0); + let envelope = typed_envelope_node(&mut doc, kind.clone(), editing); + let doc = alone(envelope); + let program = export_ai_editing(&doc, &opts()).unwrap().program; + let all = String::from_utf8_lossy(&program).replace("\r\n", "\n"); + assert!(all.contains("AIDeformOptionsKey") && all.contains("%AI11_BeginTextDocument"), "editing {editing}: {all}"); + let read = crate::import::objects_read(&program).unwrap(); + let out = export_within(&doc, &opts(), read).unwrap(); + assert!(!out.warnings.iter().any(|w| w == writer::OBJECT_LIMIT), "editing {editing}: {:?}", out.warnings); + let out = export_within(&doc, &opts(), read - 1).unwrap(); + let short = String::from_utf8_lossy(&out.program).replace("\r\n", "\n"); + assert!(out.warnings.iter().any(|w| w == writer::OBJECT_LIMIT), "editing {editing}: {:?}", out.warnings); + assert!(!short.contains("AIDeformOptionsKey") && !short.contains("%AI11_BeginTextDocument"), "editing {editing}: {short}"); + } + + let mut doc = Document::new(200.0, 100.0); + let mut envelope = typed_envelope_node(&mut doc, kind, false); + let mut t = vectorcraft_doc::TextObject::point(vectorcraft_geom::Point::new(50.0, 40.0), "Back", style(12.0, Color::BLACK)); + t.xf = Affine::new([-1.0, 0.0, 0.0, 1.0, 50.0, 40.0]); + let mirrored = text_node(&mut doc, t); + let NodeKind::Envelope { content, .. } = &mut envelope.kind else { unreachable_envelope() }; + content.push(Arc::new(mirrored)); + let out = export_ai_editing(&alone(envelope), &opts()).unwrap(); + let text = String::from_utf8_lossy(&out.program).replace("\r\n", "\n"); + assert!(out.warnings.iter().any(|w| w == writer::ENVELOPES) && !out.warnings.iter().any(|w| w == writer::TYPE), "{:?}", out.warnings); + assert!(!text.contains("AIDeformOptionsKey") && !text.contains("%AI11_BeginTextDocument"), "{text}"); +} + +/// Type in an envelope that is a symbol's art, or a frame of a thread, keeps the envelope written +/// as its art: the reader would open its type as drawn art. +#[test] +fn an_envelope_of_type_in_a_symbol_or_a_thread_is_written_as_its_art() { + use vectorcraft_doc::live::EnvelopeKind; + use vectorcraft_doc::{TextKind, TextObject}; + let kind = EnvelopeKind::Mesh { rows: 2, cols: 3, points: envelope_points(2, 3), handles: vec![] }; + let mut doc = Document::new(200.0, 100.0); + let art = typed_envelope_node(&mut doc, kind.clone(), false); + doc.symbols.push(Symbol { dynamic: false, name: "Bent".into(), art: Arc::new(art) }); + let placed = instance(&mut doc, "Bent", Affine::translate((10.0, 5.0))); + let layer = doc.layers[0].id; + doc.insert(Some(layer), usize::MAX, placed).unwrap(); + let (p, warnings) = private_data(&doc, &opts()).unwrap(); + assert!(warnings.iter().any(|w| w == writer::ENVELOPES), "{warnings:?}"); + let (back, notes) = crate::ai_alone(&p.data).unwrap(); + let symbol = back.symbols.iter().find(|s| s.name == "Bent").unwrap_or_else(|| panic!("{:?} {notes:?}", back.symbols)); + let mut live = 0; + symbol.art.walk(&mut |n| live += usize::from(matches!(n.kind, NodeKind::Envelope { .. }))); + assert_eq!(live, 0, "{notes:?}"); + + let mut doc = Document::new(200.0, 100.0); + let mut envelope = envelope_node(&mut doc, kind, 50.0, false, vectorcraft_doc::live::EnvelopeOptions::NEW); + let area = |r: Rect, s: &str| { + let mut t = TextObject::point(vectorcraft_geom::Point::ZERO, s, style(10.0, Color::BLACK)); + (t.kind, t.xf) = (TextKind::Area { frame: shapes::rectangle(r) }, Affine::IDENTITY); + t + }; + let first = text_node(&mut doc, area(Rect::new(50.0, 30.0, 150.0, 70.0), "One two three four")); + let second = text_node(&mut doc, area(Rect::new(10.0, 85.0, 190.0, 95.0), "")); + doc.text_threads.push(vec![first.id, second.id]); + let NodeKind::Envelope { content, .. } = &mut envelope.kind else { unreachable_envelope() }; + content.push(Arc::new(first)); + let layer = doc.layers[0].id; + doc.insert(Some(layer), usize::MAX, envelope).unwrap(); + doc.insert(Some(layer), usize::MAX, second).unwrap(); + let text = program(&doc); + assert!(!text.contains("AIDeformOptionsKey"), "{text}"); + let warnings = export_ai_editing(&doc, &opts()).unwrap().warnings; + assert!(warnings.iter().any(|w| w == writer::ENVELOPES), "{warnings:?}"); +} + /// An envelope with its contents in an opacity mask's art is written as its art there, and an /// envelope in a group stays live. #[test] diff --git a/crates/eps/src/ai_editing/writer.rs b/crates/eps/src/ai_editing/writer.rs index 879eb9d9f5..3e4f23bda9 100644 --- a/crates/eps/src/ai_editing/writer.rs +++ b/crates/eps/src/ai_editing/writer.rs @@ -204,6 +204,12 @@ pub(super) struct Writer<'a> { /// The `hidden` and `nest` values at which the objects of the opacity mask's art being written /// are written: objects there may be written with their art styles. mask_level: Option<(u32, u32)>, + /// The `hidden` and `nest` values at which the objects of the envelope contents being written + /// are written ([`Self::envelope`]): type there may be written as type. With them, whether the + /// contents are in the envelope's dictionary, where the reader reads a copy of each text object. + contents_level: Option<(u32, u32, bool)>, + /// How many text objects were written as their outlines ([`Self::text`]). + outlined: usize, /// The image just written was written as a placed file. placed: bool, /// The type just written was written as type, not as its outlines. @@ -298,6 +304,8 @@ impl<'a> Writer<'a> { payloads: vec![], hidden: 0, mask_level: None, + contents_level: None, + outlined: 0, placed: false, typed: false, bound: vec![], @@ -1284,9 +1292,10 @@ impl<'a> Writer<'a> { // ---------- type ---------- /// Type `n`: a text object stub naming its story in the text document ([`texts`]) when the - /// text document can hold it, outside opacity masks, pattern tiles, symbols' art and art cut to - /// a clipping object; else its outlines ([`Self::outlined_text`]). A frame of threaded area type - /// names the story of its thread, which its first frame holds. + /// text document can hold it, on the layers or in an envelope's contents, outside opacity + /// masks, pattern tiles, symbols' art and art cut to a clipping object; else its outlines + /// ([`Self::outlined_text`]). A frame of threaded area type names the story of its thread, + /// which its first frame holds. fn text(&mut self, n: &Node, xy: Xy) { let NodeKind::Text(t) = &n.kind else { return }; // Dynamic Text is written as the sizes its layout draws the type at. @@ -1294,13 +1303,16 @@ impl<'a> Writer<'a> { let t = fitted.as_deref().unwrap_or(&**t); let doc = self.doc; let thread = doc.text_threads.iter().find(|th| th.contains(&n.id)); + let contents = self.contents_level.filter(|(hidden, nest, _)| (*hidden, *nest) == (self.hidden, self.nest)); // Type that can't be a stub is written as its outlines, which count their own objects. - if self.hidden > 0 || self.clip.is_some() || self.in_symbol || (thread.is_none() && !texts::holds(n, t)) { + if (self.hidden > 0 && contents.is_none()) || self.clip.is_some() || self.in_symbol || (thread.is_none() && !texts::holds(n, t)) { + self.outlined += 1; return self.outlined_text(n, xy); } - // The stub's objects ([`texts::stub_objects`], [`Self::take_objects`]); without room for - // them, the type is left out before its story goes into the text document. - let stub = texts::stub_objects(t); + // The stub's objects ([`texts::stub_objects`], [`Self::take_objects`]), and the copy the + // reader reads of it in an envelope's dictionary; without room for them, the type is left + // out before its story goes into the text document. + let stub = texts::stub_objects(t) + usize::from(contents.is_some_and(|(.., copied)| copied)); if !self.take_objects(stub) { return; } @@ -1314,6 +1326,7 @@ impl<'a> Writer<'a> { let Some(((story, frame), lost)) = placed else { // The text document can't hold it: the outlines count their own objects. self.objects -= stub; + self.outlined += 1; return self.outlined_text(n, xy); }; self.typed = true; diff --git a/crates/eps/src/ai_editing/writer/envelopes.rs b/crates/eps/src/ai_editing/writer/envelopes.rs index dcd7274291..bb8273acf6 100644 --- a/crates/eps/src/ai_editing/writer/envelopes.rs +++ b/crates/eps/src/ai_editing/writer/envelopes.rs @@ -19,14 +19,14 @@ use vectorcraft_doc::live::{ Coons, EnvelopeKind, EnvelopeOptions, GradientMesh, H_DOWN, H_LEFT, H_RIGHT, H_UP, MeshPoint, PreserveShape, WARP_NET, envelope_content_boxes, envelope_grid, envelope_stroke_margin, warp_grid, }; -use vectorcraft_doc::{Node, NodeKind}; +use vectorcraft_doc::{Document, Node, NodeKind}; use vectorcraft_geom::{Affine, PathData}; use super::{MAX_NEST, Writer, Xy, hide}; use crate::import::{DEFORM_PLUGIN, EnvelopeGridPoint as GridPoint, envelope_outline, envelope_upright, warp_number}; use crate::ps; -pub(in crate::ai_editing) const ENVELOPES: &str = "envelopes of type, envelopes without contents, envelopes in opacity masks, pattern tiles, art cut to a clipping object or other envelopes' contents, envelopes on the layers of a large canvas or in a turned or mirrored frame, warps drawn without their style's net, meshes and top objects that the data would open in another shape, envelopes with a Fidelity that isn't a whole number, envelopes that map from a box other than their contents' bounds with or without strokes or keep bounds margins with Distort Appearance off, envelopes after the first 256, and envelopes nested more than 8 deep are written as their art in the editing data for other apps"; +pub(in crate::ai_editing) const ENVELOPES: &str = "envelopes whose type is threaded, has text wrap options or is written as its outlines, envelopes without contents, envelopes in opacity masks, pattern tiles, art cut to a clipping object or other envelopes' contents, envelopes on the layers of a large canvas or in a turned or mirrored frame, warps drawn without their style's net, meshes and top objects that the data would open in another shape, envelopes with a Fidelity that isn't a whole number, envelopes that map from a box other than their contents' bounds with or without strokes or keep bounds margins with Distort Appearance off, envelopes after the first 256, and envelopes nested more than 8 deep are written as their art in the editing data for other apps"; /// The most rows or columns of an envelope's grid written (Make with Mesh's own limit, and the /// reader's). @@ -57,6 +57,15 @@ fn holds_type(n: &Node) -> bool { matches!(n.kind, NodeKind::Text(_)) || n.children().is_some_and(|c| c.iter().any(|k| holds_type(k))) } +/// Is all the type in `n`, and in anything in it, type the reader can make an envelope's contents +/// of: none of it is a frame of threaded type or has text wrap options. +fn type_reads_back(n: &Node, doc: &Document) -> bool { + match &n.kind { + NodeKind::Text(_) => n.extras().wrap.is_none() && !doc.text_threads.iter().any(|th| th.contains(&n.id)), + _ => n.children().is_none_or(|c| c.iter().all(|k| type_reads_back(k, doc))), + } +} + /// The record of envelope `n` (its parts given), or `None` where the reader would open it in /// another shape than it has, or not as an envelope. fn record( @@ -72,7 +81,7 @@ fn record( // Distort Appearance on. let whole = (0.0..=100.0).contains(&fidelity) && fidelity.fract() == 0.0; let margin_kept = !options.distort_appearance && options.bounds_margin != [0.0; 4]; - if content.is_empty() || frame != Affine::IDENTITY || !whole || margin_kept || content.iter().any(|c| holds_type(c)) { + if content.is_empty() || frame != Affine::IDENTITY || !whole || margin_kept { return None; } let mut keys = String::new(); @@ -282,17 +291,24 @@ fn top_object_grid(path: &PathData, corners: Option<[u32; 4]>) -> Option<(usize, impl Writer<'_> { /// Envelope `n`, of transparency `xy`, as a live envelope (see the module's form), outside opacity - /// masks' art, pattern tiles, art cut to a clipping object and the layers of a large canvas. False, - /// writing nothing, where it is written as its art instead: where the reader would open it in - /// another shape, or some of it is left out for the object limit ([`Self::take_objects`]). + /// masks' art, pattern tiles, art cut to a clipping object and the layers of a large canvas. Type + /// in its contents is written as type, which the reader makes the envelope's contents again. + /// False, writing nothing, where it is written as its art instead: where the reader would open it + /// in another shape, or with its type as drawn art (threaded type, type with text wrap options, + /// type written as its outlines), or some of it is left out for the object limit + /// ([`Self::take_objects`]). pub(super) fn envelope(&mut self, n: &Node, xy: Xy) -> bool { let NodeKind::Envelope { content, kind, fidelity, editing, options, frame } = &n.kind else { return false }; if self.hidden > 0 || self.clip.is_some() || self.nest >= MAX_NEST || !self.symbols_live || self.envelopes_left == 0 { return false; } + if content.iter().any(|c| holds_type(c)) && !content.iter().all(|c| type_reads_back(c, self.doc)) { + return false; + } let Some(record) = record(n, content, kind, *fidelity, *editing, options, **frame) else { return false }; let start = self.body.len(); let (state, gs, charges, bound) = (self.state, self.gs, self.charges(), self.bound.len()); + let (outlined, texts, warnings) = (self.outlined, self.texts.written(), self.warnings.len()); self.nest += 1; self.hidden += 1; // The group before the dictionary: the grid, or the contents while they are edited. @@ -300,7 +316,7 @@ impl Writer<'_> { let opened = self.open_group("u"); if opened { if *editing { - self.contents(content); + self.contents(content, false); } else { self.grid(record.grid.as_ref()); } @@ -318,23 +334,31 @@ impl Writer<'_> { if *editing { self.grid(record.grid.as_ref()); } else if self.open_group("u") { - self.contents(content); + self.contents(content, true); self.end_group("U", Xy::PLAIN); } let block = std::mem::replace(&mut self.body, outer); hide(&block, &mut self.body); (self.state, self.gs, self.block_end) = (at_block, None, usize::MAX); let _ = writeln!(self.body, "%_X+\n%_ (AIDeformArtKey) ,\n%_{} /Int (AIDeformStyle) ,\n%_;\n%_\n%_9 () XW", record.style); + // Type in the contents written as its outlines would open as drawn art, not as type. + let outlines = self.outlined != outlined; self.hidden -= 1; self.nest -= 1; // The distorted art, which takes the envelope's lock, visibility, transparency, name and // opacity mask. self.state(n.locked, !n.visible); self.drawn_art(n, xy, None); - if !opened || self.left_out_since(charges) { + if !opened || outlines || self.left_out_since(charges) { let lines = self.body.split_off(start); self.give_back(charges, &lines); self.bound.truncate(bound); + // The stories of the type in the lines taken out go with them. + self.texts.take_back(texts); + // The warnings of art written as its art again are that art's. + if !self.left_out_since(charges) { + self.warnings.truncate(warnings); + } (self.state, self.gs, self.block_end) = (state, gs, usize::MAX); return false; } @@ -343,11 +367,14 @@ impl Writer<'_> { true } - /// An envelope's contents. - fn contents(&mut self, content: &[Arc]) { + /// An envelope's contents, where type may be written as type ([`Self::text`]): `copied` when + /// they are in its dictionary, where the reader reads a copy of each text object. + fn contents(&mut self, content: &[Arc], copied: bool) { + let level = self.contents_level.replace((self.hidden, self.nest, copied)); for c in content { self.node(c); } + self.contents_level = level; } /// An envelope's grid, when it has one, as a gray gradient mesh (`/Mesh X!` … `/End X!`): its diff --git a/crates/eps/src/ai_editing/writer/texts.rs b/crates/eps/src/ai_editing/writer/texts.rs index 6bc3c63b09..ec565c141d 100644 --- a/crates/eps/src/ai_editing/writer/texts.rs +++ b/crates/eps/src/ai_editing/writer/texts.rs @@ -604,6 +604,15 @@ fn place_on(segments: &[[f64; 8]], f: f64) -> f64 { segments.len() as f64 } +/// Where the text document ended at some point ([`TextDoc::written`]). +#[derive(Clone, Copy)] +pub(in crate::ai_editing) struct TextMark { + at: (usize, usize, usize, usize, usize), + values: usize, + lost: bool, + planned: usize, +} + /// The text document being written. #[derive(Default)] pub(in crate::ai_editing) struct TextDoc { @@ -997,6 +1006,24 @@ impl TextDoc { self.threaded.get(&id).copied() } + /// Where the text document written so far ends, for [`Self::take_back`]. + pub(in crate::ai_editing) fn written(&self) -> TextMark { + TextMark { at: self.mark(), values: self.doc_values, lost: self.lost, planned: self.planned.len() } + } + + /// Take the frames, stories and fonts added since `m` out again, with what they counted. Where + /// a thread was planned since, its frames name its story, so nothing is taken out. + pub(in crate::ai_editing) fn take_back(&mut self, m: TextMark) { + if self.planned.len() != m.planned { + return; + } + let (frames, stories, bytes, text, fonts) = m.at; + self.frames.truncate(frames); + self.stories.truncate(stories); + self.fonts.truncate(fonts); + (self.doc_bytes, self.text_bytes, self.doc_values, self.lost) = (bytes, text, m.values, m.lost); + } + /// Whether a thread written since the last call has attributes the text document leaves out. pub(in crate::ai_editing) fn take_lost(&mut self) -> bool { std::mem::take(&mut self.lost) diff --git a/crates/eps/src/import.rs b/crates/eps/src/import.rs index bdb3b9cf50..942e7f3046 100644 --- a/crates/eps/src/import.rs +++ b/crates/eps/src/import.rs @@ -82,8 +82,6 @@ use graphics::{GState, Out}; use interp::{Fault, Interp}; use obj::PsError; -#[cfg(test)] -pub(crate) use ai::ENVELOPE_DRAWN; pub use ai::NameEncoding; #[cfg(test)] pub(crate) use ai::objects_read; @@ -92,6 +90,8 @@ pub(crate) use ai::{ MAX_LISTED, MAX_LISTED_NAME, MAX_SYMBOLS, brush_plugin_name, brushes_kept, envelope_outline, envelope_upright, read_art_style, read_brush_object, read_style_list, style_moves_with, symbol_art_member, warp_number, }; +#[cfg(test)] +pub(crate) use ai::{ENVELOPE_DRAWN, ENVELOPE_TYPE_DRAWN}; pub(crate) use ate::{MAX_BYTES as MAX_TEXT_DOCUMENT, MAX_FRAMES, MAX_SEGMENTS, MAX_STORY, MAX_VALUES as MAX_TEXT_VALUES, record_version}; pub use native::{AiLayers, ai_alone, ai_alone_on_page, ai_alone_with, ai_layers_alone, ai_opened_artboard, is_loss, layered_ai, layered_ai_from}; pub(crate) use native::{MAX_TEXT, scale_document}; diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 296bd84b2b..6cd8e6155e 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1638,7 +1638,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur SVG import reads each `` and `` as the ellipse VectorCraft draws: four smooth anchors on the axes, starting at the right, with handles of the standard length, so an ellipse exported as `` comes back with the anchors it was written from and draws the same (`circles_and_ellipses_import_as_the_ellipse_drawn` in `crates/svg/tests/it/basic_shapes.rs`, `filled_ellipse_on_the_artboard_edge_survives_visually` in `prop_svg.rs`). SVG import keeps attributes in other applications' XML namespaces (`plotter:pen="2"`) on the objects and layers they belong to, as it keeps their `data-*` attributes: copies, duplicates and `.vectorcraft` files keep them, and SVG export writes them back with each namespace declared once on the root (the rest of #522; `crates/svg/tests/it/foreign_attributes.rs`, `tests/attributes.rs`). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps defines every symbol in its editing copy with its art, registration point and place in the Symbols panel's order, and writes its instances as symbol instances, which VectorCraft's `.ai` reader opens as symbols and instances again (`symbols_and_their_instances_are_read_back` in `crates/eps/src/ai_editing/tests.rs`; [file-format-parity.md](file-format-parity.md) lists the instances written as their art). - A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps envelopes made with a warp, a mesh or a top object editable: its editing copy holds each envelope's contents, shape, Fidelity, Envelope Options and Edit Contents state in the form VectorCraft's `.ai` envelope reader reads, beside its distorted art, so the file opens with the same live envelope, Edit Contents still switching between the contents and the envelope ([Edit the contents of envelopes](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/edit-the-contents-of-envelopes.html)). Envelopes of type, envelopes in opacity masks, pattern tiles or another envelope's contents, and envelopes the reader would open with another shape or other settings (a Fidelity that isn't a whole number, bounds margins kept with Distort Appearance off), and envelopes after the first 256 in a file are written as their distorted art, with a warning (`envelopes_are_read_back_live` and `envelopes_the_reader_cannot_open_live_are_written_as_their_art` in `crates/eps/src/ai_editing/tests.rs`). + A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps envelopes made with a warp, a mesh or a top object editable: its editing copy holds each envelope's contents, shape, Fidelity, Envelope Options and Edit Contents state in the form VectorCraft's `.ai` envelope reader reads, beside its distorted art, so the file opens with the same live envelope, Edit Contents still switching between the contents and the envelope ([Edit the contents of envelopes](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/edit-the-contents-of-envelopes.html)). Envelopes whose type is threaded, has text wrap options or is written as its outlines, envelopes in opacity masks, pattern tiles or another envelope's contents, and envelopes the reader would open with another shape or other settings (a Fidelity that isn't a whole number, bounds margins kept with Distort Appearance off), and envelopes after the first 256 in a file are written as their distorted art, with a warning (`envelopes_are_read_back_live` and `envelopes_the_reader_cannot_open_live_are_written_as_their_art` in `crates/eps/src/ai_editing/tests.rs`). + An envelope whose contents hold type keeps the type editable in that `.ai`: the editing copy writes the type as type in the envelope's contents, in the form the `.ai` reader opens as a live envelope of type (`TypedEnvelope` in `crates/eps/src/import/ai/envelope.rs`), so the file opens with the type shown and editable in the envelope's contents, with Edit Contents off or on. An envelope of type in a symbol's art, and one whose type is threaded, has text wrap options or is written as its outlines (mirrored type, for example), is written as its distorted art, as before (`an_envelope_of_type_is_read_back_live_with_its_type`, `an_envelope_of_type_written_as_its_art_leaves_no_story` and `an_envelope_of_type_in_a_symbol_or_a_thread_is_written_as_its_art` in `crates/eps/src/ai_editing/tests.rs`). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps writes eligible paths, compound paths and groups with live effects with an art style when the writer supports their appearance and effects (not a filled path that uses the even-odd rule, and none on a large canvas), which VectorCraft's `.ai` reader opens as the same appearance with its effects live (`objects_with_live_effects_are_read_back` and `every_effect_setting_written_on_an_object_is_read_back` in `crates/eps/src/ai_editing/tests.rs`; [file-format-parity.md](file-format-parity.md) lists the objects written without one and the effects they lose). The same holds for the objects of an opacity mask's art, a mask inside another mask's art and a hidden art root included, so a mask whose art has Offset Path opens drawing the image it masks as it did, with the effect live; geometry effects that no art style holds on a mask's art, such as Roughen, are written applied to the art, which opens drawing what it drew (`a_masked_image_with_live_offset_path_round_trips`, `hidden_and_nested_mask_art_keep_live_offset_path` and `a_masks_art_with_an_effect_no_style_holds_is_written_as_it_draws` in `crates/eps/src/ai_editing/tests.rs`). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps writes point type, area type and type on a path as type in its editing copy, and objects next to it keep their own transparency (`crates/eps/src/ai_editing/tests.rs`, `cmd::fileio::tests_pdfedit::type_comes_back_from_the_editing_copy`; [file-format-parity.md](file-format-parity.md) lists what is written as outlines). From 608c0f77aafa902a426f385937851bbf8f3f0c9e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 02:47:10 -0800 Subject: [PATCH 04/52] i18n: Hindi translates 116 status and error messages that its catalog lacked Adds Hindi rows for 116 image export, color profile, swatch exchange, color book, DXF, PDF knockout group, Revolve and 3D messages that the Hindi catalog did not translate. The Russian and Simplified Chinese catalogs already have rows for 113 of them. Placeholders, parameter names, file formats and values stay as the English writes them. A test checks four of the new rows. --- crates/ui-egui/src/i18n/hi.tsv | 118 +++++++++++++++++++++++++++++++ crates/ui-egui/src/i18n/tests.rs | 19 +++++ docs/target-app-parity.md | 1 + 3 files changed, 138 insertions(+) diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 4a11fad73d..bdea8689d4 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8889,3 +8889,121 @@ theme Appearance अपीयरेंस Grommets आईलेट Grommet Inset किनारे से आईलेट की दूरी Diameter व्यास + +# Messages of the effects, 3D, image export, color profiles, swatch exchange files, color books and DXF import. +@msg 3D effects require finite coordinates within 100 million points 3D इफ़ेक्ट्स के लिए 100 मिलियन पॉइंट के भीतर परिमित निर्देशांक चाहिए +@msg 3D effects require one to ten lights 3D इफ़ेक्ट्स के लिए एक से दस लाइटें चाहिए +@msg BMP depth {_1}: 1, 4, 8, 16, 24 or 32 bits per pixel BMP डेप्थ {_1}: प्रति पिक्सेल 1, 4, 8, 16, 24 या 32 बिट +@msg BMP encoding failed: {width} × {height} pixels doesn't fit the format or the pixel buffer BMP एन्कोडिंग विफल: {width} × {height} पिक्सेल न फ़ॉर्मैट में फ़िट होते हैं, न पिक्सेल बफ़र में +@msg GIF encoding failed: the palette image is malformed GIF एन्कोडिंग विफल: पैलेट इमेज विकृत है +@msg GIF encoding failed: {e} GIF एन्कोडिंग विफल: {e} +@msg JPEG colour profile: {e} JPEG कलर प्रोफ़ाइल: {e} +@msg JPEG encoding failed: pixel buffer doesn't match the image size JPEG एन्कोडिंग विफल: पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg JPEG encoding failed: {e} JPEG एन्कोडिंग विफल: {e} +@msg PNG encoding failed: pixel buffer doesn't match the image size PNG एन्कोडिंग विफल: पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg PNG encoding failed: the palette image is malformed PNG एन्कोडिंग विफल: पैलेट इमेज विकृत है +@msg PNG encoding failed: {e} PNG एन्कोडिंग विफल: {e} +@msg PNG encoding failed: {width} × {height} pixels is not a valid image size PNG एन्कोडिंग विफल: {width} × {height} पिक्सेल मान्य इमेज आकार नहीं है +@msg PSD colour profile: {e} PSD कलर प्रोफ़ाइल: {e} +@msg PSD encoding failed: the pixel buffer doesn't match the image size PSD एन्कोडिंग विफल: पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg Revolve profile contains invalid coordinates रिवॉल्व प्रोफ़ाइल में अमान्य निर्देशांक हैं +@msg Revolve profile is too complex रिवॉल्व प्रोफ़ाइल बहुत जटिल है +@msg Revolve projection is not finite रिवॉल्व प्रोजेक्शन परिमित नहीं है +@msg Revolve requires finite profile coordinates within 100 million points रिवॉल्व के लिए 100 मिलियन पॉइंट के भीतर परिमित प्रोफ़ाइल निर्देशांक चाहिए +@msg Revolve surface is too complex; reduce Segments or simplify the profile रिवॉल्व सतह बहुत जटिल है; सेगमेंट कम करें या प्रोफ़ाइल सरल करें +@msg Revolve surface is too complex; simplify the profile रिवॉल्व सतह बहुत जटिल है; प्रोफ़ाइल सरल करें +@msg Revolve visibility cannot split the projected boundary रिवॉल्व दृश्यता प्रोजेक्ट की गई सीमा को विभाजित नहीं कर सकती +@msg Revolve visibility creates too many fragments रिवॉल्व दृश्यता बहुत अधिक टुकड़े बनाती है +@msg Revolve visibility creates too many vector anchors रिवॉल्व दृश्यता बहुत अधिक वेक्टर एंकर बनाती है +@msg Revolve visibility exceeds its geometry work limit रिवॉल्व दृश्यता अपनी ज्यामिति गणना की सीमा से आगे निकल जाती है +@msg Revolve visibility exceeds its spatial index limit रिवॉल्व दृश्यता अपनी स्पेशियल इंडेक्स सीमा से आगे निकल जाती है +@msg Revolve visibility has too many boundary crossings रिवॉल्व दृश्यता में सीमा के बहुत अधिक क्रॉसिंग हैं +@msg Revolve visibility has too many input anchors रिवॉल्व दृश्यता में बहुत अधिक इनपुट एंकर हैं +@msg Revolve visibility requires convex cap sectors रिवॉल्व दृश्यता के लिए उत्तल कैप सेक्टर चाहिए +@msg Revolve visibility requires finite projected faces रिवॉल्व दृश्यता के लिए परिमित प्रोजेक्ट किए गए फ़ेस चाहिए +@msg SVG options: {e} SVG ऑप्शन्स: {e} +@msg Save for Web settings: {e} वेब के लिए सेव करें की सेटिंग्स: {e} +@msg TIFF colour profile: {e} TIFF कलर प्रोफ़ाइल: {e} +@msg TIFF encoding failed: the pixel buffer doesn't match the image size TIFF एन्कोडिंग विफल: पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg TIFF encoding failed: {e} TIFF एन्कोडिंग विफल: {e} +@msg Targa depth {_1}: 16, 24 or 32 bits per pixel Targa डेप्थ {_1}: प्रति पिक्सेल 16, 24 या 32 बिट +@msg Targa encoding failed: the pixel buffer doesn't match the image size Targa एन्कोडिंग विफल: पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg The 3D projection is not finite 3D प्रोजेक्शन परिमित नहीं है +@msg The 3D shadow is too complex; turn Shadows off or simplify the art 3D छाया बहुत जटिल है; छायाएँ बंद करें या आर्टवर्क सरल करें +@msg The shape contains invalid coordinates शेप में अमान्य निर्देशांक हैं +@msg Too many Revolve faces for visibility evaluation दृश्यता की गणना के लिए रिवॉल्व के फ़ेस बहुत अधिक हैं +@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft स्वॉच एक्सचेंज फ़ाइल से अधिकतम {ASE_MAX_ENTRIES} रंग और ग्रुप पढ़ता है, और इस लाइब्रेरी में {entries} हैं +@msg WebP encoding failed: {e} WebP एन्कोडिंग विफल: {e} +@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why} +@msg `index` must be a whole number `index` पूरी संख्या होनी चाहिए +@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` smallThumb, mediumThumb, largeThumb, smallList या largeList होता है +@msg a line can't run from a point to itself कोई लाइन किसी पॉइंट से उसी पॉइंट तक नहीं जा सकती +@msg a line needs at least two points लाइन के लिए कम से कम दो पॉइंट चाहिए +@msg a number cannot be read एक संख्या पढ़ी नहीं जा सकती +@msg a swatch exchange block is too long स्वॉच एक्सचेंज का एक ब्लॉक बहुत लंबा है +@msg a swatch exchange name is too long स्वॉच एक्सचेंज का एक नाम बहुत लंबा है +@msg a {sw} × {sh} image can't be resized to {width} × {height} pixels {sw} × {sh} इमेज का आकार बदलकर {width} × {height} पिक्सेल नहीं किया जा सकता +@msg a {width} × {height} image is too large {width} × {height} इमेज बहुत बड़ी है +@msg a {width} × {height} image: {e} {width} × {height} इमेज: {e} +@msg an image could not be written: {e} एक इमेज लिखी नहीं जा सकी: {e} +@msg an image that couldn't be read was left out जो इमेज पढ़ी नहीं जा सकी, उसे छोड़ दिया गया +@msg can't open “{name}”: {e} “{name}” ओपन नहीं किया जा सकता: {e} +@msg cannot align zip entries to {align} bytes ज़िप एंट्री को {align} बाइट पर अलाइन नहीं किया जा सकता +@msg cannot open the automation {kind} root `{_1}`: {e} ऑटोमेशन {kind} रूट `{_1}` ओपन नहीं किया जा सकता: {e} +@msg cannot read profile: {0} प्रोफ़ाइल पढ़ी नहीं जा सकती: {0} +@msg color book version {version} isn't supported (only 1) कलर बुक वर्ज़न {version} समर्थित नहीं है (केवल 1) +@msg color books in color space {other} aren't supported (only RGB, CMYK and Lab) कलर स्पेस {other} वाली कलर बुक समर्थित नहीं हैं (केवल RGB, CMYK और Lab) +@msg file name too long to zip: {_1} ज़िप करने के लिए फ़ाइल का नाम बहुत लंबा है: {_1} +@msg file name too long to zip: {name} ज़िप करने के लिए फ़ाइल का नाम बहुत लंबा है: {name} +@msg freeform line {i}: {e} फ्रीफॉर्म लाइन {i}: {e} +@msg freeform point {i}: {e} फ्रीफॉर्म पॉइंट {i}: {e} +@msg give `{key}` or `{other}`, not both `{key}` या `{other}` दें, दोनों नहीं +@msg grayscale profiles can't be working spaces yet ग्रेस्केल प्रोफ़ाइल अभी वर्किंग स्पेस नहीं हो सकतीं +@msg input contains NaN or infinite coordinates इनपुट में NaN या अनंत निर्देशांक हैं +@msg input path could not be closed इनपुट पाथ बंद नहीं किया जा सका +@msg invalid ICC profile: {0} अमान्य ICC प्रोफ़ाइल: {0} +@msg invalid scale {scale} अमान्य स्केल {scale} +@msg its localized names take more than {_1} KB इसके स्थानीयकृत नाम {_1} KB से अधिक जगह लेते हैं +@msg its objects are nested too deep ({e}) इसके ऑब्जेक्ट बहुत गहराई तक नेस्ट किए गए हैं ({e}) +@msg its tag table lists the `{_1}` tag more than once इसकी टैग तालिका में `{_1}` टैग एक से अधिक बार है +@msg knockout groups with brushed strokes over other translucent elements are written as PDF knockout groups: their translucent elements knock out what they cover fully जिन नॉकआउट ग्रुप में ब्रश स्ट्रोक दूसरे पारदर्शी एलिमेंट के ऊपर हैं, वे PDF नॉकआउट ग्रुप के रूप में लिखे जाते हैं: उनके पारदर्शी एलिमेंट अपने नीचे का पूरा हिस्सा नॉकआउट करते हैं +@msg knockout groups with too many overlapping translucent elements are written as PDF knockout groups: their translucent elements knock out what they cover fully बहुत अधिक ओवरलैप करने वाले पारदर्शी एलिमेंट वाले नॉकआउट ग्रुप PDF नॉकआउट ग्रुप के रूप में लिखे जाते हैं: उनके पारदर्शी एलिमेंट अपने नीचे का पूरा हिस्सा नॉकआउट करते हैं +@msg not a graphic style library: {e} यह ग्राफ़िक स्टाइल लाइब्रेरी नहीं है: {e} +@msg not a swatch library (.vcswatches or .gpl) यह स्वॉच लाइब्रेरी नहीं है (.vcswatches या .gpl) +@msg not a swatch library (format `{_1}`) यह स्वॉच लाइब्रेरी नहीं है (फ़ॉर्मैट `{_1}`) +@msg not a swatch library: {e} यह स्वॉच लाइब्रेरी नहीं है: {e} +@msg not an action set file ({e}) यह एक्शन सेट फ़ाइल नहीं है ({e}) +@msg profile colour space {other} is not RGB, CMYK or Gray प्रोफ़ाइल का कलर स्पेस {other} RGB, CMYK या Gray नहीं है +@msg regular expression too large रेगुलर एक्सप्रेशन बहुत बड़ा है +@msg script file is not UTF-8 text: {value} स्क्रिप्ट फ़ाइल UTF-8 टेक्स्ट नहीं है: {value} +@msg stop {i}: {e} स्टॉप {i}: {e} +@msg swatch exchange version {major}.{minor} isn't supported (only 1.x) स्वॉच एक्सचेंज वर्ज़न {major}.{minor} समर्थित नहीं है (केवल 1.x) +@msg the color book holds more than {ASE_MAX_ENTRIES} colors कलर बुक में {ASE_MAX_ENTRIES} से अधिक रंग हैं +@msg the color book is cut short कलर बुक अधूरी है +@msg the color book's names take more than {_1} MB कलर बुक के नाम {_1} MB से अधिक जगह लेते हैं +@msg the image would be {w} × {h} pixels; raster exports are limited to {MAX_RASTER_SIDE} pixels per side and {_1} megapixels: lower the scale or resolution इमेज {w} × {h} पिक्सेल की होगी; रास्टर एक्सपोर्ट हर तरफ़ अधिकतम {MAX_RASTER_SIDE} पिक्सेल और {_1} मेगापिक्सेल तक सीमित हैं: स्केल या रिज़ॉल्यूशन कम करें +@msg the optimised image can't be read back: {e} ऑप्टिमाइज़ की गई इमेज वापस पढ़ी नहीं जा सकती: {e} +@msg the pixel buffer doesn't match the image size पिक्सेल बफ़र इमेज के आकार से मेल नहीं खाता +@msg the preview: {e} प्रीव्यू: {e} +@msg the request may not read the New Document profiles folder अनुरोध नया डॉक्यूमेंट प्रोफ़ाइल फ़ोल्डर नहीं पढ़ सकता +@msg the shapes are too degenerate to combine शेप इतने विकृत हैं कि उन्हें मिलाया नहीं जा सकता +@msg the shapes cross themselves and each other too often to combine शेप खुद को और एक-दूसरे को इतनी बार काटते हैं कि उन्हें मिलाया नहीं जा सकता +@msg the swatch exchange file holds more than {ASE_MAX_ENTRIES} colors and groups स्वॉच एक्सचेंज फ़ाइल में {ASE_MAX_ENTRIES} से अधिक रंग और ग्रुप हैं +@msg the swatch exchange file is cut short स्वॉच एक्सचेंज फ़ाइल अधूरी है +@msg the {_1} plate can't be read: {e} {_1} प्लेट पढ़ी नहीं जा सकती: {e} +@msg this binary DXF file is damaged or cut short यह बाइनरी DXF फ़ाइल क्षतिग्रस्त या अधूरी है +@msg this is a DWG drawing, which can't be read: save it from the CAD app as a DXF and open that यह एक DWG ड्रॉइंग है, जिसे पढ़ा नहीं जा सकता: इसे CAD ऐप से DXF के रूप में सेव करें और वह फ़ाइल ओपन करें +@msg too many classes बहुत अधिक क्लास +@msg too many groups बहुत अधिक ग्रुप +@msg too many layers for PSD (at most 32767) PSD के लिए बहुत अधिक लेयर्स (अधिकतम 32767) +@msg too many swatch exchange blocks स्वॉच एक्सचेंज के बहुत अधिक ब्लॉक +@msg unknown colour profile: {0} अज्ञात कलर प्रोफ़ाइल: {0} +@msg {_1} clashes with a built-in profile name {_1} किसी अंतर्निहित प्रोफ़ाइल के नाम से टकराता है +@msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} पिक्सेल GIF के लिए बहुत बड़ा है (हर तरफ़ अधिकतम 65535 पिक्सेल): रिज़ॉल्यूशन कम करें +@msg {_1}: no usable transform to/from sRGB {_1}: sRGB में या sRGB से बदलने का कोई उपयोगी ट्रांसफ़ॉर्म नहीं है +@msg {name} is not a CMYK profile {name} CMYK प्रोफ़ाइल नहीं है +@msg {name} is not an RGB profile {name} RGB प्रोफ़ाइल नहीं है +@msg {path}: could not be read {path}: पढ़ा नहीं जा सका +@msg {width} × {height} pixels is too large for JPEG (at most 65535 pixels a side): lower the resolution {width} × {height} पिक्सेल JPEG के लिए बहुत बड़ा है (हर तरफ़ अधिकतम 65535 पिक्सेल): रिज़ॉल्यूशन कम करें +@msg {width} × {height} pixels is too large for Targa (at most 65535 pixels a side): lower the resolution {width} × {height} पिक्सेल Targa के लिए बहुत बड़ा है (हर तरफ़ अधिकतम 65535 पिक्सेल): रिज़ॉल्यूशन कम करें +@msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} पिक्सेल PSD के लिए बहुत बड़ा है (हर तरफ़ अधिकतम {MAX_SIDE} पिक्सेल): रिज़ॉल्यूशन कम करें diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 4f9f03e5f6..c89a43363b 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -135,6 +135,25 @@ fn hindi_rows_keep_the_meaning_of_their_english() { "पेज थंबनेल RGB पिक्सल का होना चाहिए, हर तरफ़ 1 से 256 (मिला 0 × 4)" ); assert_eq!(message(hi, "invalid angle"), "अमान्य कोण"); + let limits = message( + hi, + "the image would be 9000 × 9000 pixels; raster exports are limited to 8192 pixels per side and 64 megapixels: lower the scale or resolution", + ); + assert!( + limits.contains("9000 × 9000 पिक्सेल") && limits.contains("8192 पिक्सेल और 64 मेगापिक्सेल") && limits.contains("स्केल या रिज़ॉल्यूशन कम करें"), + "{limits}" + ); + assert_eq!( + message(hi, "color books in color space HSB aren't supported (only RGB, CMYK and Lab)"), + "कलर स्पेस HSB वाली कलर बुक समर्थित नहीं हैं (केवल RGB, CMYK और Lab)" + ); + assert_eq!(message(hi, "`index` must be a whole number"), "`index` पूरी संख्या होनी चाहिए"); + let knockout = message( + hi, + "knockout groups with too many overlapping translucent elements are written as PDF knockout groups: \ + their translucent elements knock out what they cover fully", + ); + assert!(knockout.starts_with("बहुत अधिक ओवरलैप") && knockout.contains("PDF नॉकआउट ग्रुप"), "{knockout}"); } /// Hindi messages keep every `a|b|c` list of accepted values exactly as their English writes it. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 7e36c7f318..5ad047c71f 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -895,6 +895,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Gujarati (2026-11-14, #6613): `gu` has 4,673 catalog rows, zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial; the pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. - Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged. - Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged. + - Hindi messages its catalog lacked (2026-11-14): 116 status and error messages that the Hindi catalog did not translate, among them the image export, color profile, swatch exchange, color book, DXF, PDF knockout group, Revolve and 3D messages, have Hindi rows; the translations are VectorCraft's own and await native review; scores and estimates unchanged. - Hindi English words (2026-11-13): 264 rows no longer keep English words in their sentences, repeat a parameter's name in Hindi or garble them, among them "unknown align", which now names the alignment; lists of accepted values such as `(left|right|top|bottom)` stay as their English writes them; two tests check every row; native review remains; scores and estimates unchanged. - Message field names and values (2026-11-13): 49 status and error messages in the Hindi, Bulgarian, Danish, Indonesian, Dutch, Brazilian Portuguese, Swedish and Turkish catalogs keep the field names in brackets, such as `[subpath, anchor]`, and the values an `unknown` message lists, such as `(points, lines)`, as their English writes them; a test checks every catalog; scores and estimates unchanged. - Italian messages (2026-11-13): the Italian catalog (`it`) has 1,802 more status and error message rows, and the untranslated report's missing Italian messages go from 1,842 to 40; the translations are VectorCraft's own and await native review; scores and estimates unchanged. See [localization-parity.md](localization-parity.md). From 8b1802349e3c44bc425fce95dbbae7831277b1e3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 05:37:32 -0800 Subject: [PATCH 05/52] i18n: composite font errors with a part name translate behind the font name The engine reports a bad part as `name`: part: reason, which the generic `{name}`: {_1}: {e} row matched first and left untranslated. Each complete catalog gets name-prefixed rows for the six part errors, and the test lists both forms. --- crates/ui-egui/src/i18n/ca.tsv | 6 ++++++ crates/ui-egui/src/i18n/cs.tsv | 6 ++++++ crates/ui-egui/src/i18n/de.tsv | 6 ++++++ crates/ui-egui/src/i18n/el.tsv | 6 ++++++ crates/ui-egui/src/i18n/es.tsv | 6 ++++++ crates/ui-egui/src/i18n/fi.tsv | 6 ++++++ crates/ui-egui/src/i18n/fr.tsv | 6 ++++++ crates/ui-egui/src/i18n/hi.tsv | 6 ++++++ crates/ui-egui/src/i18n/hu.tsv | 6 ++++++ crates/ui-egui/src/i18n/it.tsv | 6 ++++++ crates/ui-egui/src/i18n/ja.tsv | 6 ++++++ crates/ui-egui/src/i18n/ka.tsv | 6 ++++++ crates/ui-egui/src/i18n/ko.tsv | 6 ++++++ crates/ui-egui/src/i18n/nl.tsv | 6 ++++++ crates/ui-egui/src/i18n/pl.tsv | 6 ++++++ crates/ui-egui/src/i18n/pt-br.tsv | 6 ++++++ crates/ui-egui/src/i18n/ru.tsv | 6 ++++++ crates/ui-egui/src/i18n/sv.tsv | 6 ++++++ crates/ui-egui/src/i18n/tests.rs | 10 ++++++++++ crates/ui-egui/src/i18n/tr.tsv | 6 ++++++ crates/ui-egui/src/i18n/uk.tsv | 6 ++++++ crates/ui-egui/src/i18n/vi.tsv | 6 ++++++ crates/ui-egui/src/i18n/zh-hans.tsv | 6 ++++++ crates/ui-egui/src/i18n/zh-hant.tsv | 6 ++++++ 24 files changed, 148 insertions(+) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 5ba4d1b5c2..f14714f6bf 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -4680,11 +4680,17 @@ digits Malayalam Malaiàlam @msg the file holds two composite fonts named `{_1}` el fitxer conté dos tipus de lletra compostos anomenats `{_1}` @msg `{_1}` can't name a composite font `{_1}` no pot anomenar un tipus de lletra compost @msg {k}: give a font {k}: indiqueu un tipus de lletra +@msg `{name}`: {k}: give a font `{name}`: {k}: indiqueu un tipus de lletra @msg {k}: size must be {_1} to {_2}% {k}: size ha d’estar entre {_1} i {_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size ha d’estar entre {_1} i {_2} % @msg {k}: baseline must be {_1} to {_2}% {k}: baseline ha d’estar entre {_1} i {_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline ha d’estar entre {_1} i {_2} % @msg {k}: scale must be {_1} to {_2}% {k}: l’escala ha d’estar entre {_1} i {_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: l’escala ha d’estar entre {_1} i {_2} % @msg {k}: only kana, roman and numerals can be scaled {k}: només kana, roman i numerals es poden escalar +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: només kana, roman i numerals es poden escalar @msg {k}: only kana can be scaled at the center {k}: només kana es pot escalar des del centre +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: només kana es pot escalar des del centre @msg no composite font cap tipus de lletra compost Delete Font Suprimeix el tipus de lletra Kanji Kanji diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 339306a7e8..a9fff03d03 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -1678,11 +1678,17 @@ digits Malayalam Malajálamské @msg the file holds two composite fonts named `{_1}` soubor obsahuje dvě složená písma s názvem `{_1}` @msg `{_1}` can't name a composite font `{_1}` nemůže být názvem složeného písma @msg {k}: give a font {k}: zadejte písmo +@msg `{name}`: {k}: give a font `{name}`: {k}: zadejte písmo @msg {k}: size must be {_1} to {_2}% {k}: size musí být {_1} až {_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size musí být {_1} až {_2} % @msg {k}: baseline must be {_1} to {_2}% {k}: baseline musí být {_1} až {_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline musí být {_1} až {_2} % @msg {k}: scale must be {_1} to {_2}% {k}: měřítko musí být {_1} až {_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: měřítko musí být {_1} až {_2} % @msg {k}: only kana, roman and numerals can be scaled {k}: měnit měřítko lze jen u kana, roman a numerals +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: měnit měřítko lze jen u kana, roman a numerals @msg {k}: only kana can be scaled at the center {k}: měřítko od středu lze měnit jen u kana +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: měřítko od středu lze měnit jen u kana @msg no composite font žádné složené písmo Delete Font Odstranit písmo Kanji Kandži diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index c79364b8f6..158034d575 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -3659,11 +3659,17 @@ effect Points Punkte @msg the file holds two composite fonts named `{_1}` die Datei enthält zwei zusammengesetzte Schriften namens `{_1}` @msg `{_1}` can't name a composite font `{_1}` kann keine zusammengesetzte Schrift benennen @msg {k}: give a font {k}: geben Sie eine Schrift an +@msg `{name}`: {k}: give a font `{name}`: {k}: geben Sie eine Schrift an @msg {k}: size must be {_1} to {_2}% {k}: size muss {_1} bis {_2} % sein +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size muss {_1} bis {_2} % sein @msg {k}: baseline must be {_1} to {_2}% {k}: baseline muss {_1} bis {_2} % sein +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline muss {_1} bis {_2} % sein @msg {k}: scale must be {_1} to {_2}% {k}: die Skalierung muss {_1} bis {_2} % sein +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: die Skalierung muss {_1} bis {_2} % sein @msg {k}: only kana, roman and numerals can be scaled {k}: nur kana, roman und numerals lassen sich skalieren +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: nur kana, roman und numerals lassen sich skalieren @msg {k}: only kana can be scaled at the center {k}: nur kana lässt sich am Mittelpunkt skalieren +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: nur kana lässt sich am Mittelpunkt skalieren @msg no composite font keine zusammengesetzte Schrift Delete Font Schrift löschen Kanji Kanji diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 385746ed1e..97ec8ca3d9 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -4192,11 +4192,17 @@ digits Malayalam Μαλαγιάλαμ @msg the file holds two composite fonts named `{_1}` το αρχείο περιέχει δύο σύνθετες γραμματοσειρές με όνομα `{_1}` @msg `{_1}` can't name a composite font το `{_1}` δεν μπορεί να είναι όνομα σύνθετης γραμματοσειράς @msg {k}: give a font {k}: δώστε γραμματοσειρά +@msg `{name}`: {k}: give a font `{name}`: {k}: δώστε γραμματοσειρά @msg {k}: size must be {_1} to {_2}% {k}: το size πρέπει να είναι από {_1} έως {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: το size πρέπει να είναι από {_1} έως {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: το baseline πρέπει να είναι από {_1} έως {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: το baseline πρέπει να είναι από {_1} έως {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: η κλίμακα πρέπει να είναι από {_1} έως {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: η κλίμακα πρέπει να είναι από {_1} έως {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: μόνο τα kana, roman και numerals αλλάζουν κλίμακα +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: μόνο τα kana, roman και numerals αλλάζουν κλίμακα @msg {k}: only kana can be scaled at the center {k}: μόνο το kana αλλάζει κλίμακα από το κέντρο +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: μόνο το kana αλλάζει κλίμακα από το κέντρο @msg no composite font καμία σύνθετη γραμματοσειρά Delete Font Διαγραφή γραμματοσειράς Kanji Κάντζι diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index c8d2a3a976..dff2eb955a 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -3707,11 +3707,17 @@ digits Malayalam Malayálam @msg the file holds two composite fonts named `{_1}` el archivo contiene dos fuentes compuestas llamadas `{_1}` @msg `{_1}` can't name a composite font `{_1}` no puede nombrar una fuente compuesta @msg {k}: give a font {k}: indique una fuente +@msg `{name}`: {k}: give a font `{name}`: {k}: indique una fuente @msg {k}: size must be {_1} to {_2}% {k}: size debe estar entre {_1} y {_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size debe estar entre {_1} y {_2} % @msg {k}: baseline must be {_1} to {_2}% {k}: baseline debe estar entre {_1} y {_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline debe estar entre {_1} y {_2} % @msg {k}: scale must be {_1} to {_2}% {k}: la escala debe estar entre {_1} y {_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: la escala debe estar entre {_1} y {_2} % @msg {k}: only kana, roman and numerals can be scaled {k}: solo kana, roman y numerals se pueden escalar +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: solo kana, roman y numerals se pueden escalar @msg {k}: only kana can be scaled at the center {k}: solo kana se puede escalar desde el centro +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: solo kana se puede escalar desde el centro @msg no composite font ninguna fuente compuesta Delete Font Eliminar fuente Kanji Kanji diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 469a79077e..86659781e9 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -1651,11 +1651,17 @@ digits Malayalam Malajalam @msg the file holds two composite fonts named `{_1}` tiedostossa on kaksi yhdistelmäfonttia nimeltä `{_1}` @msg `{_1}` can't name a composite font `{_1}` ei kelpaa yhdistelmäfontin nimeksi @msg {k}: give a font {k}: anna fontti +@msg `{name}`: {k}: give a font `{name}`: {k}: anna fontti @msg {k}: size must be {_1} to {_2}% {k}: size on oltava {_1}–{_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size on oltava {_1}–{_2} % @msg {k}: baseline must be {_1} to {_2}% {k}: baseline on oltava {_1}–{_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline on oltava {_1}–{_2} % @msg {k}: scale must be {_1} to {_2}% {k}: skaalauksen on oltava {_1}–{_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: skaalauksen on oltava {_1}–{_2} % @msg {k}: only kana, roman and numerals can be scaled {k}: vain kana, roman ja numerals voidaan skaalata +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: vain kana, roman ja numerals voidaan skaalata @msg {k}: only kana can be scaled at the center {k}: vain kana voidaan skaalata keskeltä +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: vain kana voidaan skaalata keskeltä @msg no composite font ei yhdistelmäfonttia Delete Font Poista fontti Kanji Kanji diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 14c2a7edd0..a1b7a53ef6 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3699,11 +3699,17 @@ digits Malayalam Malayalam @msg the file holds two composite fonts named `{_1}` le fichier contient deux polices composites nommées `{_1}` @msg `{_1}` can't name a composite font `{_1}` ne peut pas nommer une police composite @msg {k}: give a font {k} : indiquez une police +@msg `{name}`: {k}: give a font `{name}`: {k} : indiquez une police @msg {k}: size must be {_1} to {_2}% {k} : size doit être compris entre {_1} et {_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k} : size doit être compris entre {_1} et {_2} % @msg {k}: baseline must be {_1} to {_2}% {k} : baseline doit être compris entre {_1} et {_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k} : baseline doit être compris entre {_1} et {_2} % @msg {k}: scale must be {_1} to {_2}% {k} : l’échelle doit être comprise entre {_1} et {_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k} : l’échelle doit être comprise entre {_1} et {_2} % @msg {k}: only kana, roman and numerals can be scaled {k} : seuls kana, roman et numerals peuvent être mis à l’échelle +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k} : seuls kana, roman et numerals peuvent être mis à l’échelle @msg {k}: only kana can be scaled at the center {k} : seul kana peut être mis à l’échelle depuis le centre +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k} : seul kana peut être mis à l’échelle depuis le centre @msg no composite font aucune police composite Delete Font Supprimer la police Kanji Kanji diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 6b0144ae13..ec57c34ad3 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -5065,11 +5065,17 @@ antiAlias Sharp शार्प @msg the file holds two composite fonts named `{_1}` फ़ाइल में `{_1}` नाम के दो कंपोज़िट फ़ॉन्ट हैं @msg `{_1}` can't name a composite font `{_1}` कंपोज़िट फ़ॉन्ट का नाम नहीं हो सकता @msg {k}: give a font {k}: एक फ़ॉन्ट दें +@msg `{name}`: {k}: give a font `{name}`: {k}: एक फ़ॉन्ट दें @msg {k}: size must be {_1} to {_2}% {k}: size {_1} से {_2}% तक होना चाहिए +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size {_1} से {_2}% तक होना चाहिए @msg {k}: baseline must be {_1} to {_2}% {k}: baseline {_1} से {_2}% तक होना चाहिए +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline {_1} से {_2}% तक होना चाहिए @msg {k}: scale must be {_1} to {_2}% {k}: स्केल {_1} से {_2}% तक होना चाहिए +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: स्केल {_1} से {_2}% तक होना चाहिए @msg {k}: only kana, roman and numerals can be scaled {k}: केवल kana, roman और numerals को स्केल किया जा सकता है +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: केवल kana, roman और numerals को स्केल किया जा सकता है @msg {k}: only kana can be scaled at the center {k}: केंद्र से केवल kana को स्केल किया जा सकता है +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: केंद्र से केवल kana को स्केल किया जा सकता है @msg no composite font कोई कंपोज़िट फ़ॉन्ट नहीं Delete Font फ़ॉन्ट हटाएँ Kanji कांजी diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 9dc6095770..c8130d54a1 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -4375,11 +4375,17 @@ mark-style Japanese Japán @msg the file holds two composite fonts named `{_1}` a fájl két `{_1}` nevű összetett betűtípust tartalmaz @msg `{_1}` can't name a composite font `{_1}` nem lehet összetett betűtípus neve @msg {k}: give a font {k}: adjon meg egy betűtípust +@msg `{name}`: {k}: give a font `{name}`: {k}: adjon meg egy betűtípust @msg {k}: size must be {_1} to {_2}% {k}: a size értéke {_1}–{_2}% lehet +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: a size értéke {_1}–{_2}% lehet @msg {k}: baseline must be {_1} to {_2}% {k}: a baseline értéke {_1}–{_2}% lehet +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: a baseline értéke {_1}–{_2}% lehet @msg {k}: scale must be {_1} to {_2}% {k}: a méretezés {_1}–{_2}% lehet +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: a méretezés {_1}–{_2}% lehet @msg {k}: only kana, roman and numerals can be scaled {k}: csak a kana, roman és numerals méretezhető +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: csak a kana, roman és numerals méretezhető @msg {k}: only kana can be scaled at the center {k}: csak a kana méretezhető a középpontból +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: csak a kana méretezhető a középpontból @msg no composite font nincs összetett betűtípus Delete Font Betűtípus törlése Kanji Kandzsi diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 8c92a434fe..19cc1215a1 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -3753,11 +3753,17 @@ digits Malayalam Malayalam @msg the file holds two composite fonts named `{_1}` il file contiene due font compositi di nome `{_1}` @msg `{_1}` can't name a composite font `{_1}` non può essere il nome di un font composito @msg {k}: give a font {k}: indica un font +@msg `{name}`: {k}: give a font `{name}`: {k}: indica un font @msg {k}: size must be {_1} to {_2}% {k}: size deve essere tra {_1} e {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size deve essere tra {_1} e {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline deve essere tra {_1} e {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline deve essere tra {_1} e {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: la scala deve essere tra {_1} e {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: la scala deve essere tra {_1} e {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: solo kana, roman e numerals si possono ridimensionare +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: solo kana, roman e numerals si possono ridimensionare @msg {k}: only kana can be scaled at the center {k}: solo kana si può ridimensionare dal centro +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: solo kana si può ridimensionare dal centro @msg no composite font nessun font composito Delete Font Elimina font Kanji Kanji diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 8906c0e6c0..fe2e9f90bb 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -4082,11 +4082,17 @@ file-filter Templates テンプレート @msg the file holds two composite fonts named `{_1}` ファイルに `{_1}` という名前の合成フォントが 2 つあります @msg `{_1}` can't name a composite font `{_1}` は合成フォントの名前にできません @msg {k}: give a font {k}: フォントを指定してください +@msg `{name}`: {k}: give a font `{name}`: {k}: フォントを指定してください @msg {k}: size must be {_1} to {_2}% {k}: size は {_1}~{_2}% にしてください +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size は {_1}~{_2}% にしてください @msg {k}: baseline must be {_1} to {_2}% {k}: baseline は {_1}~{_2}% にしてください +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline は {_1}~{_2}% にしてください @msg {k}: scale must be {_1} to {_2}% {k}: 比率は {_1}~{_2}% にしてください +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: 比率は {_1}~{_2}% にしてください @msg {k}: only kana, roman and numerals can be scaled {k}: 比率を変更できるのは kana、roman、numerals だけです +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: 比率を変更できるのは kana、roman、numerals だけです @msg {k}: only kana can be scaled at the center {k}: 中央を基準に比率を変更できるのは kana だけです +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: 中央を基準に比率を変更できるのは kana だけです @msg no composite font 合成フォントがありません Delete Font フォントを削除 Kanji 漢字 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index de2c7a7dc7..6b4826f8c3 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -1522,11 +1522,17 @@ digits Malayalam მალაიალამური @msg the file holds two composite fonts named `{_1}` ფაილი შეიცავს ორ კომპოზიტურ შრიფტს სახელით `{_1}` @msg `{_1}` can't name a composite font `{_1}` ვერ იქნება კომპოზიტური შრიფტის სახელი @msg {k}: give a font {k}: მიუთითეთ შრიფტი +@msg `{name}`: {k}: give a font `{name}`: {k}: მიუთითეთ შრიფტი @msg {k}: size must be {_1} to {_2}% {k}: size უნდა იყოს {_1}-დან {_2}%-მდე +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size უნდა იყოს {_1}-დან {_2}%-მდე @msg {k}: baseline must be {_1} to {_2}% {k}: baseline უნდა იყოს {_1}-დან {_2}%-მდე +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline უნდა იყოს {_1}-დან {_2}%-მდე @msg {k}: scale must be {_1} to {_2}% {k}: მასშტაბი უნდა იყოს {_1}-დან {_2}%-მდე +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: მასშტაბი უნდა იყოს {_1}-დან {_2}%-მდე @msg {k}: only kana, roman and numerals can be scaled {k}: მასშტაბირება შეიძლება მხოლოდ kana, roman და numerals ნაწილებში +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: მასშტაბირება შეიძლება მხოლოდ kana, roman და numerals ნაწილებში @msg {k}: only kana can be scaled at the center {k}: ცენტრიდან მასშტაბირება შეიძლება მხოლოდ kana ნაწილში +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: ცენტრიდან მასშტაბირება შეიძლება მხოლოდ kana ნაწილში @msg no composite font კომპოზიტური შრიფტი არ არის Delete Font შრიფტის წაშლა Kanji კანძი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 2aa70c2d5d..ec34bd50f0 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -4070,11 +4070,17 @@ file-filter Templates 템플릿 @msg the file holds two composite fonts named `{_1}` 파일에 이름이 `{_1}`인 합성 글꼴이 두 개 있습니다 @msg `{_1}` can't name a composite font `{_1}`은(는) 합성 글꼴 이름으로 쓸 수 없습니다 @msg {k}: give a font {k}: 글꼴을 지정하세요 +@msg `{name}`: {k}: give a font `{name}`: {k}: 글꼴을 지정하세요 @msg {k}: size must be {_1} to {_2}% {k}: size는 {_1}~{_2}%여야 합니다 +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size는 {_1}~{_2}%여야 합니다 @msg {k}: baseline must be {_1} to {_2}% {k}: baseline은 {_1}~{_2}%여야 합니다 +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline은 {_1}~{_2}%여야 합니다 @msg {k}: scale must be {_1} to {_2}% {k}: 비율은 {_1}~{_2}%여야 합니다 +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: 비율은 {_1}~{_2}%여야 합니다 @msg {k}: only kana, roman and numerals can be scaled {k}: 비율을 바꿀 수 있는 것은 kana, roman, numerals뿐입니다 +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: 비율을 바꿀 수 있는 것은 kana, roman, numerals뿐입니다 @msg {k}: only kana can be scaled at the center {k}: 가운데를 기준으로 비율을 바꿀 수 있는 것은 kana뿐입니다 +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: 가운데를 기준으로 비율을 바꿀 수 있는 것은 kana뿐입니다 @msg no composite font 합성 글꼴이 없습니다 Delete Font 글꼴 삭제 Kanji 한자 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 8b49530620..e2eacab182 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -2102,11 +2102,17 @@ digits Malayalam Malayalam @msg the file holds two composite fonts named `{_1}` het bestand bevat twee samengestelde lettertypen met de naam `{_1}` @msg `{_1}` can't name a composite font `{_1}` kan geen naam van een samengesteld lettertype zijn @msg {k}: give a font {k}: geef een lettertype op +@msg `{name}`: {k}: give a font `{name}`: {k}: geef een lettertype op @msg {k}: size must be {_1} to {_2}% {k}: size moet tussen {_1} en {_2}% liggen +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size moet tussen {_1} en {_2}% liggen @msg {k}: baseline must be {_1} to {_2}% {k}: baseline moet tussen {_1} en {_2}% liggen +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline moet tussen {_1} en {_2}% liggen @msg {k}: scale must be {_1} to {_2}% {k}: de schaal moet tussen {_1} en {_2}% liggen +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: de schaal moet tussen {_1} en {_2}% liggen @msg {k}: only kana, roman and numerals can be scaled {k}: alleen kana, roman en numerals kunnen worden geschaald +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: alleen kana, roman en numerals kunnen worden geschaald @msg {k}: only kana can be scaled at the center {k}: alleen kana kan vanuit het midden worden geschaald +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: alleen kana kan vanuit het midden worden geschaald @msg no composite font geen samengesteld lettertype Delete Font Lettertype verwijderen Kanji Kanji diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index b80eee81d7..0becf9d142 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -1590,11 +1590,17 @@ digits Malayalam Malajalam @msg the file holds two composite fonts named `{_1}` plik zawiera dwa fonty złożone o nazwie `{_1}` @msg `{_1}` can't name a composite font `{_1}` nie może być nazwą fontu złożonego @msg {k}: give a font {k}: podaj font +@msg `{name}`: {k}: give a font `{name}`: {k}: podaj font @msg {k}: size must be {_1} to {_2}% {k}: size musi wynosić od {_1} do {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size musi wynosić od {_1} do {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline musi wynosić od {_1} do {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline musi wynosić od {_1} do {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: skala musi wynosić od {_1} do {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: skala musi wynosić od {_1} do {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: skalować można tylko kana, roman i numerals +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: skalować można tylko kana, roman i numerals @msg {k}: only kana can be scaled at the center {k}: od środka można skalować tylko kana +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: od środka można skalować tylko kana @msg no composite font brak fontu złożonego Delete Font Usuń font Kanji Kanji diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 479212841b..9a6a2d6082 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5267,11 +5267,17 @@ axis Both Ambos @msg the file holds two composite fonts named `{_1}` o arquivo contém duas fontes compostas chamadas `{_1}` @msg `{_1}` can't name a composite font `{_1}` não pode nomear uma fonte composta @msg {k}: give a font {k}: informe uma fonte +@msg `{name}`: {k}: give a font `{name}`: {k}: informe uma fonte @msg {k}: size must be {_1} to {_2}% {k}: size deve estar entre {_1} e {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size deve estar entre {_1} e {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline deve estar entre {_1} e {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline deve estar entre {_1} e {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: a escala deve estar entre {_1} e {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: a escala deve estar entre {_1} e {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: só kana, roman e numerals podem ser escalados +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: só kana, roman e numerals podem ser escalados @msg {k}: only kana can be scaled at the center {k}: só kana pode ser escalado a partir do centro +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: só kana pode ser escalado a partir do centro @msg no composite font nenhuma fonte composta Delete Font Excluir fonte Kanji Kanji diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 07b1369c88..9f3c78c1d1 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3739,11 +3739,17 @@ digits Malayalam Малаялам @msg the file holds two composite fonts named `{_1}` в файле два составных шрифта с именем `{_1}` @msg `{_1}` can't name a composite font `{_1}` не может быть именем составного шрифта @msg {k}: give a font {k}: укажите шрифт +@msg `{name}`: {k}: give a font `{name}`: {k}: укажите шрифт @msg {k}: size must be {_1} to {_2}% {k}: size должен быть от {_1} до {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size должен быть от {_1} до {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline должен быть от {_1} до {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline должен быть от {_1} до {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: масштаб должен быть от {_1} до {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: масштаб должен быть от {_1} до {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: масштабировать можно только kana, roman и numerals +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: масштабировать можно только kana, roman и numerals @msg {k}: only kana can be scaled at the center {k}: масштабировать от центра можно только kana +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: масштабировать от центра можно только kana @msg no composite font нет составного шрифта Delete Font Удалить шрифт Kanji Кандзи diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index dc0b4fc494..42e71340e5 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -3629,11 +3629,17 @@ digits Malayalam Malayalam @msg the file holds two composite fonts named `{_1}` filen innehåller två sammansatta typsnitt som heter `{_1}` @msg `{_1}` can't name a composite font `{_1}` kan inte vara namnet på ett sammansatt typsnitt @msg {k}: give a font {k}: ange ett typsnitt +@msg `{name}`: {k}: give a font `{name}`: {k}: ange ett typsnitt @msg {k}: size must be {_1} to {_2}% {k}: size måste vara {_1} till {_2} % +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size måste vara {_1} till {_2} % @msg {k}: baseline must be {_1} to {_2}% {k}: baseline måste vara {_1} till {_2} % +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline måste vara {_1} till {_2} % @msg {k}: scale must be {_1} to {_2}% {k}: skalan måste vara {_1} till {_2} % +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: skalan måste vara {_1} till {_2} % @msg {k}: only kana, roman and numerals can be scaled {k}: bara kana, roman och numerals kan skalas +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: bara kana, roman och numerals kan skalas @msg {k}: only kana can be scaled at the center {k}: bara kana kan skalas från mitten +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: bara kana kan skalas från mitten @msg no composite font inget sammansatt typsnitt Delete Font Ta bort typsnitt Kanji Kanji diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 671ce6ce92..3bc53ebb8c 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -2103,6 +2103,12 @@ fn composite_font_errors_translate_in_complete_languages() { "{k}: scale must be {_1} to {_2}%", "{k}: only kana, roman and numerals can be scaled", "{k}: only kana can be scaled at the center", + "`{name}`: {k}: give a font", + "`{name}`: {k}: size must be {_1} to {_2}%", + "`{name}`: {k}: baseline must be {_1} to {_2}%", + "`{name}`: {k}: scale must be {_1} to {_2}%", + "`{name}`: {k}: only kana, roman and numerals can be scaled", + "`{name}`: {k}: only kana can be scaled at the center", "no composite font", ]; // An error, English words its translation replaces, and the text it keeps. @@ -4077,6 +4083,10 @@ const NAMED_KEYS: &[(&str, &[&str])] = &[ ("{k}: only kana can be scaled at the center", &["kana"]), ("{k}: only kana, roman and numerals can be scaled", &["kana", "roman", "numerals"]), ("{k}: size must be {_1} to {_2}%", &["size"]), + ("`{name}`: {k}: baseline must be {_1} to {_2}%", &["baseline"]), + ("`{name}`: {k}: only kana can be scaled at the center", &["kana"]), + ("`{name}`: {k}: only kana, roman and numerals can be scaled", &["kana", "roman", "numerals"]), + ("`{name}`: {k}: size must be {_1} to {_2}%", &["size"]), ]; /// Every catalog's translation of a [`NAMED_KEYS`] message keeps each name the table lists, as diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index da3b7bd26a..36572fa017 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -3493,11 +3493,17 @@ digits Malayalam Malayalam @msg the file holds two composite fonts named `{_1}` dosyada `{_1}` adlı iki bileşik font var @msg `{_1}` can't name a composite font `{_1}` bir bileşik fontun adı olamaz @msg {k}: give a font {k}: bir font verin +@msg `{name}`: {k}: give a font `{name}`: {k}: bir font verin @msg {k}: size must be {_1} to {_2}% {k}: size %{_1} ile %{_2} arasında olmalı +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size %{_1} ile %{_2} arasında olmalı @msg {k}: baseline must be {_1} to {_2}% {k}: baseline %{_1} ile %{_2} arasında olmalı +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline %{_1} ile %{_2} arasında olmalı @msg {k}: scale must be {_1} to {_2}% {k}: ölçek %{_1} ile %{_2} arasında olmalı +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: ölçek %{_1} ile %{_2} arasında olmalı @msg {k}: only kana, roman and numerals can be scaled {k}: yalnızca kana, roman ve numerals ölçeklenebilir +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: yalnızca kana, roman ve numerals ölçeklenebilir @msg {k}: only kana can be scaled at the center {k}: merkezden yalnızca kana ölçeklenebilir +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: merkezden yalnızca kana ölçeklenebilir @msg no composite font bileşik font yok Delete Font Fontu Sil Kanji Kanji diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 243479fcb3..1a5b662ecd 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3746,11 +3746,17 @@ effect Points Точки @msg the file holds two composite fonts named `{_1}` у файлі два складені шрифти з назвою `{_1}` @msg `{_1}` can't name a composite font `{_1}` не може бути назвою складеного шрифту @msg {k}: give a font {k}: вкажіть шрифт +@msg `{name}`: {k}: give a font `{name}`: {k}: вкажіть шрифт @msg {k}: size must be {_1} to {_2}% {k}: size має бути від {_1} до {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size має бути від {_1} до {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline має бути від {_1} до {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline має бути від {_1} до {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: масштаб має бути від {_1} до {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: масштаб має бути від {_1} до {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: масштабувати можна лише kana, roman і numerals +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: масштабувати можна лише kana, roman і numerals @msg {k}: only kana can be scaled at the center {k}: масштабувати від центру можна лише kana +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: масштабувати від центру можна лише kana @msg no composite font немає складеного шрифту Delete Font Видалити шрифт Kanji Кандзі diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 7698b3d145..2fe710c328 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -4092,11 +4092,17 @@ mark-style Japanese Kiểu Nhật @msg the file holds two composite fonts named `{_1}` tệp chứa hai phông chữ tổ hợp cùng tên `{_1}` @msg `{_1}` can't name a composite font `{_1}` không thể là tên phông chữ tổ hợp @msg {k}: give a font {k}: hãy cung cấp một phông chữ +@msg `{name}`: {k}: give a font `{name}`: {k}: hãy cung cấp một phông chữ @msg {k}: size must be {_1} to {_2}% {k}: size phải từ {_1} đến {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size phải từ {_1} đến {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}: baseline phải từ {_1} đến {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline phải từ {_1} đến {_2}% @msg {k}: scale must be {_1} to {_2}% {k}: tỷ lệ phải từ {_1} đến {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: tỷ lệ phải từ {_1} đến {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}: chỉ kana, roman và numerals mới co giãn được +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: chỉ kana, roman và numerals mới co giãn được @msg {k}: only kana can be scaled at the center {k}: chỉ kana mới co giãn từ tâm được +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: chỉ kana mới co giãn từ tâm được @msg no composite font không có phông chữ tổ hợp Delete Font Xóa phông chữ Kanji Kanji diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 4f796f9090..c7cbd36aa6 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -3568,11 +3568,17 @@ digits Malayalam 马拉雅拉姆数字 @msg the file holds two composite fonts named `{_1}` 文件中有两个复合字体都名为 `{_1}` @msg `{_1}` can't name a composite font `{_1}` 不能用作复合字体的名称 @msg {k}: give a font {k}:请指定字体 +@msg `{name}`: {k}: give a font `{name}`: {k}:请指定字体 @msg {k}: size must be {_1} to {_2}% {k}:size 必须为 {_1}% 到 {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}:size 必须为 {_1}% 到 {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}:baseline 必须为 {_1}% 到 {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}:baseline 必须为 {_1}% 到 {_2}% @msg {k}: scale must be {_1} to {_2}% {k}:缩放必须为 {_1}% 到 {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}:缩放必须为 {_1}% 到 {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}:只有 kana、roman 和 numerals 可以缩放 +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}:只有 kana、roman 和 numerals 可以缩放 @msg {k}: only kana can be scaled at the center {k}:只有 kana 可以从中心缩放 +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}:只有 kana 可以从中心缩放 @msg no composite font 没有复合字体 Delete Font 删除字体 Kanji 汉字 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 4af3d3a822..5e74d83d12 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -4823,11 +4823,17 @@ digits Malayalam 馬來亞拉姆數字 @msg the file holds two composite fonts named `{_1}` 檔案中有兩個複合字體都名為 `{_1}` @msg `{_1}` can't name a composite font `{_1}` 不能作為複合字體的名稱 @msg {k}: give a font {k}:請指定字體 +@msg `{name}`: {k}: give a font `{name}`: {k}:請指定字體 @msg {k}: size must be {_1} to {_2}% {k}:size 必須為 {_1}% 到 {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}:size 必須為 {_1}% 到 {_2}% @msg {k}: baseline must be {_1} to {_2}% {k}:baseline 必須為 {_1}% 到 {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}:baseline 必須為 {_1}% 到 {_2}% @msg {k}: scale must be {_1} to {_2}% {k}:縮放必須為 {_1}% 到 {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}:縮放必須為 {_1}% 到 {_2}% @msg {k}: only kana, roman and numerals can be scaled {k}:只有 kana、roman 和 numerals 可以縮放 +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}:只有 kana、roman 和 numerals 可以縮放 @msg {k}: only kana can be scaled at the center {k}:只有 kana 可以從中心縮放 +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}:只有 kana 可以從中心縮放 @msg no composite font 沒有複合字體 Delete Font 刪除字體 Kanji 漢字 From a134cf6f8dee085c54b349293e1c83d67a3e5345 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 10:27:41 -0800 Subject: [PATCH 06/52] Graphs: Graph Type is a dialog of its own with type buttons and a page per axis Object > Graph > Type... and a double click on a graph tool open Graph Type (dialog `graphType`) instead of the generic parameter dialog. A menu at the top shows Graph Options, Value Axis (Left Axis and Right Axis with the value axis on both sides) or Category Axis. Graph Options has a button per graph type, Value Axis with Separate Scales, the Style checkboxes and the options of the type picked. The axis pages hold Tick Values with Override Calculated Values, Tick Marks and Add Labels. Override Calculated Values starts from the values the axis would be calculated with for the options shown; the engine exposes them as `graph_type_subject` and `graph_calculated_axes`. With series picked by Group Selection, the type and value axis go to those series. OK changes the graph and series the dialog opened on, and with nothing changed it adds no step of history. Docs: docs/mcp.md, docs/ui-parity.md and the tool.options text. --- crates/engine/src/cmd/graph.rs | 2 + crates/engine/src/cmd/graph/edit.rs | 24 +- crates/engine/src/cmd/graph/generate.rs | 131 ++- crates/engine/src/cmd/graph/tests.rs | 52 + crates/engine/src/lib.rs | 1 + crates/mcp/src/ui_catalog.rs | 2 +- crates/ui-egui/src/dialogs.rs | 4 + crates/ui-egui/src/dialogs/command.rs | 59 - crates/ui-egui/src/dialogs/graph_type.rs | 1314 ++++++++++++++++++++++ crates/ui-egui/src/i18n/bg.tsv | 34 + crates/ui-egui/src/i18n/bs.tsv | 34 + crates/ui-egui/src/i18n/ca.tsv | 34 + crates/ui-egui/src/i18n/cs.tsv | 34 + crates/ui-egui/src/i18n/da.tsv | 34 + crates/ui-egui/src/i18n/de.tsv | 34 + crates/ui-egui/src/i18n/el.tsv | 34 + crates/ui-egui/src/i18n/es.tsv | 34 + crates/ui-egui/src/i18n/fi.tsv | 34 + crates/ui-egui/src/i18n/fr.tsv | 34 + crates/ui-egui/src/i18n/gu.tsv | 34 + crates/ui-egui/src/i18n/hi.tsv | 34 + crates/ui-egui/src/i18n/hu.tsv | 34 + crates/ui-egui/src/i18n/id.tsv | 34 + crates/ui-egui/src/i18n/it.tsv | 34 + crates/ui-egui/src/i18n/ja.tsv | 34 + crates/ui-egui/src/i18n/ka.tsv | 34 + crates/ui-egui/src/i18n/ko.tsv | 34 + crates/ui-egui/src/i18n/nl.tsv | 34 + crates/ui-egui/src/i18n/pl.tsv | 34 + crates/ui-egui/src/i18n/pt-br.tsv | 34 + crates/ui-egui/src/i18n/ru.tsv | 34 + crates/ui-egui/src/i18n/sv.tsv | 34 + crates/ui-egui/src/i18n/tr.tsv | 34 + crates/ui-egui/src/i18n/uk.tsv | 34 + crates/ui-egui/src/i18n/vi.tsv | 34 + crates/ui-egui/src/i18n/zh-hans.tsv | 34 + crates/ui-egui/src/i18n/zh-hant.tsv | 34 + crates/ui-egui/src/menus/invoke.rs | 4 +- crates/ui-egui/src/menus/ui_commands.rs | 2 +- crates/ui-egui/src/toolbar/tests.rs | 4 +- docs/mcp.md | 25 +- docs/ui-parity.md | 1 + 42 files changed, 2474 insertions(+), 103 deletions(-) create mode 100644 crates/ui-egui/src/dialogs/graph_type.rs diff --git a/crates/engine/src/cmd/graph.rs b/crates/engine/src/cmd/graph.rs index da23bd4f04..fe33e30036 100644 --- a/crates/engine/src/cmd/graph.rs +++ b/crates/engine/src/cmd/graph.rs @@ -40,6 +40,8 @@ pub use commands::specs; pub(crate) use data::apply_csv; #[cfg(test)] use data::{fmt_value, parse_csv, to_csv}; +pub use edit::{GraphTypeSubject, graph_type_subject}; +pub use generate::calculated_axes; #[cfg(test)] use generate::generate; #[cfg(test)] diff --git a/crates/engine/src/cmd/graph/edit.rs b/crates/engine/src/cmd/graph/edit.rs index c7f6d52ea8..283c46e956 100644 --- a/crates/engine/src/cmd/graph/edit.rs +++ b/crates/engine/src/cmd/graph/edit.rs @@ -1,6 +1,6 @@ use super::axis::{MAX_TICK_MARKS, count_given, one_line}; use super::data::apply_data; -use super::generate::{children_bounds, generate}; +use super::generate::{calculated_axes, children_bounds, generate}; use super::series::{picked_series, reselect_series}; use super::{ Affine, Document, EngineError, GraphKind, GraphSpec, Node, NodeId, Rect, Result, Session, TickLength, Value, ValueAxisSide, bad, f64_req, json, @@ -97,6 +97,28 @@ pub(super) fn spec_of(s: &Session, id: NodeId) -> Result { s.doc()?.doc.node(id).and_then(|n| n.extras().graph.as_deref().cloned()).ok_or(EngineError::NoNode(id)) } +/// What `graph.setType` without `id` or `seriesIndexes` acts on, for the Graph Type dialog. +pub struct GraphTypeSubject { + /// The selected graph, or the graph that holds the selection. + pub id: NodeId, + /// The series picked in it with Group Selection, in order; empty when the type goes to the whole graph. + pub series: Vec, + /// The least value, the greatest and the number of divisions each value axis is drawn with while its tick values + /// are calculated: the left (or only) axis, then the right axis' own scale (the left one's without Separate Scales). + pub calculated: [(f64, f64, usize); 2], +} + +/// The graph and series that `graph.setType {}` reads its options from, as [`GraphTypeSubject`]. An error without a +/// selected graph, as the command gives. +pub fn graph_type_subject(s: &Session) -> Result { + const C: &str = "graph.setType"; + let p = json!({}); + let id = target(s, &p, C)?; + let spec = spec_of(s, id)?; + let count = spec.rows.iter().map(Vec::len).max().unwrap_or(0).min(vectorcraft_doc::MAX_GRAPH_SERIES); + Ok(GraphTypeSubject { id, series: picked_series(s, &p, id, count, C)?, calculated: calculated_axes(&spec) }) +} + fn query_type_options(spec: &GraphSpec, count: usize, picked: &[usize]) -> Value { // With series picked, the type and value axis they share, so the dialog's OK keeps them. let kinds: Vec = picked.iter().map(|i| spec.series_kind(*i)).collect(); diff --git a/crates/engine/src/cmd/graph/generate.rs b/crates/engine/src/cmd/graph/generate.rs index fe8ffb98f8..c31934f999 100644 --- a/crates/engine/src/cmd/graph/generate.rs +++ b/crates/engine/src/cmd/graph/generate.rs @@ -38,6 +38,101 @@ fn nth(list: &[Option], s: usize) -> Option<&T> { list.get(s).and_then(Option::as_ref) } +/// The data a value range is read from: each series' type, the cells (a blank is `None`), which series use the right +/// axis' own scale, and the number of categories. +struct Values<'a> { + kinds: &'a [GraphKind], + cells: &'a [Vec>], + on_right: &'a [bool], + ncat: usize, +} + +impl Values<'_> { + fn cell(&self, c: usize, s: usize) -> Option { + self.cells.get(c).and_then(|r| r.get(s)).copied().flatten() + } + + fn axis(&self, s: usize) -> usize { + usize::from(self.on_right.get(s).copied().unwrap_or(false)) + } + + /// The value range per axis (stacked graphs stack positives and negatives separately), and a scatter's x range. + fn range(&self, scatter: bool) -> ([f64; 2], [f64; 2], f64, f64) { + let (mut lo, mut hi) = ([0.0f64; 2], [0.0f64; 2]); + let (mut xlo, mut xhi) = (f64::MAX, f64::MIN); + for c in 0..self.ncat { + if !scatter { + for (a, (lo, hi)) in lo.iter_mut().zip(hi.iter_mut()).enumerate() { + self.extend(c, a, (lo, hi)); + } + } else { + for s in (0..self.kinds.len()).step_by(2) { + if let (Some(y), Some(x)) = (self.cell(c, s), self.cell(c, s + 1)) { + hi[0] = hi[0].max(y); + lo[0] = lo[0].min(y); + xlo = xlo.min(x); + xhi = xhi.max(x); + } + } + } + } + (lo, hi, xlo, xhi) + } + + /// Widen the range of axis `a` by category `c`'s values. + fn extend(&self, c: usize, a: usize, (lo, hi): (&mut f64, &mut f64)) { + let val = |s: usize| self.cell(c, s).unwrap_or(0.0); + let on = |s: &usize, kinds: &[GraphKind]| self.axis(*s) == a && self.kinds.get(*s).is_some_and(|k| kinds.contains(k)); + // Stacked columns (or bars) stack together, and so do areas; other series count one value each. + for stack in [[GraphKind::StackedColumn, GraphKind::StackedBar], [GraphKind::Area, GraphKind::Area]] { + let members = || (0..self.kinds.len()).filter(|s| on(s, &stack)); + *hi = hi.max(members().map(|s| val(s).max(0.0)).sum()); + *lo = lo.min(members().map(|s| val(s).min(0.0)).sum()); + } + let single = |s: &usize| on(s, &[GraphKind::Column, GraphKind::Bar, GraphKind::Line]); + for v in (0..self.kinds.len()).filter(single).filter_map(|s| self.cell(c, s)) { + *hi = hi.max(v); + *lo = lo.min(v); + } + } +} + +/// The tick values `g`'s value axes are drawn with while they are calculated from the data (Graph Type › Tick Values +/// without Override Calculated Values): the least value, the greatest and the number of divisions of the left (or +/// only) axis, then of the right axis' own scale, which is the left one's unless Separate Scales gives the series on +/// the right axis a scale of their own. A pie graph has no value axis and gives the axis of a graph without data. A +/// single bound the graph has (only a minimum or only a maximum) is calculated with, as the axis is drawn. +pub fn calculated_axes(g: &GraphSpec) -> [(f64, f64, usize); 2] { + // Adding 0 makes a negative zero, which a nice axis around 0 can start at, a plain 0. + let divisions = |(lo, hi, step): (f64, f64, f64)| (lo + 0.0, hi + 0.0, ((hi - lo) / step).round().clamp(1.0, 100.0) as usize); + // The bounds the axis is calculated with: all but a pair that overrides the calculation. + let partial = |min: Option, max: Option| match (min, max) { + (Some(a), Some(b)) if b > a && (b - a).is_finite() => (None, None), + bounds => bounds, + }; + let (min, max) = partial(g.axis_min, g.axis_max); + if g.kind == GraphKind::Radar { + let top = g.rows.iter().flatten().copied().fold(0.0, f64::max); + return [divisions(value_axis(g.ticks, min, max, 0.0, top)); 2]; + } + let nser = g.rows.iter().map(Vec::len).max().unwrap_or(0).clamp(1, vectorcraft_doc::MAX_GRAPH_SERIES); + let kinds: Vec = (0..nser).map(|s| g.series_kind(s)).collect(); + let (scatter, horizontal) = (g.kind == GraphKind::Scatter, matches!(g.kind, GraphKind::Bar | GraphKind::StackedBar)); + let separate = g.separate_scales && g.value_axis == ValueAxisSide::Both && !horizontal && !scatter; + let on_right: Vec = (0..nser).map(|s| separate && g.right_series.contains(&s)).collect(); + let cells = if g.kind == GraphKind::Pie { vec![] } else { g.cells() }; + let ncat = g.rows.len().clamp(1, vectorcraft_doc::MAX_GRAPH_CATEGORIES); + let (lo, hi, ..) = Values { kinds: &kinds, cells: &cells, on_right: &on_right, ncat }.range(scatter); + let left = divisions(value_axis(g.ticks, min, max, lo[0], hi[0])); + let used = |right: bool| on_right.contains(&right); + if !used(true) { + return [left; 2]; + } + let (right_min, right_max) = partial(g.right_axis_min, g.right_axis_max); + let right = divisions(value_axis(g.right_ticks, right_min, right_max, lo[1], hi[1])); + if used(false) { [left, right] } else { [right; 2] } +} + /// One graph being generated: its data, the nodes drawn so far and what the legend and shadows still need. struct Plot<'a> { g: &'a GraphSpec, @@ -526,41 +621,7 @@ impl<'a> Plot<'a> { /// The value range per axis (stacked graphs stack positives and negatives separately), and a scatter's x range. fn value_range(&self, geo: &Geo, scatter: bool) -> ([f64; 2], [f64; 2], f64, f64) { - let (mut lo, mut hi) = ([0.0f64; 2], [0.0f64; 2]); - let (mut xlo, mut xhi) = (f64::MAX, f64::MIN); - for c in 0..self.ncat { - if !scatter { - for (a, (lo, hi)) in lo.iter_mut().zip(hi.iter_mut()).enumerate() { - self.extend_range(geo, c, a, (lo, hi)); - } - } else { - for s in (0..self.nser).step_by(2) { - if let (Some(y), Some(x)) = (self.cell(c, s), self.cell(c, s + 1)) { - hi[0] = hi[0].max(y); - lo[0] = lo[0].min(y); - xlo = xlo.min(x); - xhi = xhi.max(x); - } - } - } - } - (lo, hi, xlo, xhi) - } - - /// Widen the range of axis `a` by category `c`'s values. - fn extend_range(&self, geo: &Geo, c: usize, a: usize, (lo, hi): (&mut f64, &mut f64)) { - let nser = self.nser; - // Stacked columns (or bars) stack together, and so do areas; other series count one value each. - for stack in [[GraphKind::StackedColumn, GraphKind::StackedBar], [GraphKind::Area, GraphKind::Area]] { - let members = || (0..nser).filter(|s| geo.axis(*s) == a && stack.contains(&self.kind(*s))); - *hi = hi.max(members().map(|s| self.val(c, s).max(0.0)).sum()); - *lo = lo.min(members().map(|s| self.val(c, s).min(0.0)).sum()); - } - let single = |s: &usize| geo.axis(*s) == a && matches!(self.kind(*s), GraphKind::Column | GraphKind::Bar | GraphKind::Line); - for v in (0..nser).filter(single).filter_map(|s| self.cell(c, s)) { - *hi = hi.max(v); - *lo = lo.min(v); - } + Values { kinds: &self.kinds, cells: &self.cells, on_right: &geo.on_right, ncat: self.ncat }.range(scatter) } /// The value axes with ticks and labels, the legend's start after them, and the axis lines. diff --git a/crates/engine/src/cmd/graph/tests.rs b/crates/engine/src/cmd/graph/tests.rs index 0a788c4330..da176ea49c 100644 --- a/crates/engine/src/cmd/graph/tests.rs +++ b/crates/engine/src/cmd/graph/tests.rs @@ -3848,6 +3848,58 @@ fn group_selected_series_go_on_the_chosen_axis() { assert!(spec(&s, id).right_series.is_empty()); } +/// The Graph Type dialog's subject: the selected graph, the series picked in it, and the tick values each value axis +/// is drawn with while they are calculated, which are the ones the graph's value labels show. +#[test] +fn graph_type_subject_gives_the_picked_series_and_the_calculated_tick_values() { + let mut s = Session::new(); + assert!(super::graph_type_subject(&s).is_err(), "no document"); + s.execute("file.new", &json!({"width": 800, "height": 800})).unwrap(); + assert!(super::graph_type_subject(&s).is_err(), "no graph selected"); + // Q1 3, 2; Q2 5, 4; Q3 -1, 6. + let id = graph(&mut s, "column"); + let subject = super::graph_type_subject(&s).unwrap(); + assert_eq!((subject.id, subject.series), (id, vec![])); + assert_eq!(subject.calculated, [(-2.0, 6.0, 4); 2]); + let shown = |s: &Session| value_labels(s, id).into_iter().map(|(t, _)| t).collect::>(); + assert_eq!(shown(&s), ["-2", "0", "2", "4", "6"]); + // Overriding with them draws the same axis, and the calculated values stay the data's. + s.execute("graph.setType", &json!({"axisMin": -2, "axisMax": 6, "ticks": 4})).unwrap(); + assert_eq!(shown(&s), ["-2", "0", "2", "4", "6"]); + s.execute("graph.setType", &json!({"axisMin": 0, "axisMax": 100, "ticks": 0})).unwrap(); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated[0], (-2.0, 6.0, 4)); + // A single bound is calculated with, as the axis is drawn. + s.execute("graph.setType", &json!({"axisMin": -10, "axisMax": null})).unwrap(); + let (lo, hi, _) = super::graph_type_subject(&s).unwrap().calculated[0]; + let labels = shown(&s); + assert!(lo <= -10.0, "{lo}"); + assert_eq!((labels.first().and_then(|t| t.parse::().ok()), labels.last().and_then(|t| t.parse::().ok())), (Some(lo), Some(hi))); + s.execute("graph.setType", &json!({"axisMin": null, "axisMax": null})).unwrap(); + // Stacked columns stack their positive and their negative values: Q2 reaches 9, Q3 from -1 to 6. + s.execute("graph.setType", &json!({"type": "stackedColumn"})).unwrap(); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated[0], (-2.0, 10.0, 6)); + assert_eq!(shown(&s), ["-2", "0", "2", "4", "6", "8", "10"]); + // A radar graph's axis starts at 0, and a pie graph has none. + s.execute("graph.setType", &json!({"type": "radar"})).unwrap(); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated, [(0.0, 6.0, 3); 2]); + s.execute("graph.setType", &json!({"type": "pie"})).unwrap(); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated, [(0.0, 1.0, 5); 2]); + // Series picked with Group Selection. + s.execute("graph.setType", &json!({"type": "column"})).unwrap(); + let picked = series(s.doc().unwrap().doc.node(id).unwrap(), 1).id; + s.execute("select.set", &json!({"ids": [picked.0]})).unwrap(); + let subject = super::graph_type_subject(&s).unwrap(); + assert_eq!((subject.id, subject.series), (id, vec![1])); + // Separate Scales: the right axis has the tick values of its own series. + let mut s = Session::new(); + let id = two_scale_graph(&mut s); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated, [(0.0, 1000.0, 5); 2]); + s.execute("graph.setType", &json!({"seriesIndexes": [1], "valueAxis": "right"})).unwrap(); + s.execute("graph.setType", &json!({"valueAxis": "both", "separateScales": true})).unwrap(); + assert_eq!(super::graph_type_subject(&s).unwrap().calculated, [(0.0, 10.0, 5), (0.0, 1000.0, 5)]); + assert_eq!(spec(&s, id).right_series, [1]); +} + #[test] fn bar_graphs_keep_their_value_axis_along_the_bottom() { let mut s = Session::new(); diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 4b47966463..9c097c190b 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -29,6 +29,7 @@ use vectorcraft_tools::{PaintDefaults, Tool}; pub use cmd::clipboard::{Clipboard, SourceLayer}; pub use cmd::create::constrain_click; pub use cmd::distortcmds::perspective_click; +pub use cmd::graph::{GraphTypeSubject, calculated_axes as graph_calculated_axes, graph_type_subject}; pub use cmd::params::{check_keys, check_params}; pub use cmd::pathops::auto_simplify_level; pub use cmd::rasterfx::{export_pdf, flatten_raster_effects}; diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index e801df4a7a..d08a38ae8a 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -937,7 +937,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph (dialog `command` running graph.setType; an error without one), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront and filledLines held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 5afad21b0d..0a11a16afa 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -56,6 +56,7 @@ pub mod freehand; mod gradient_stop; pub mod graph_data; pub mod graph_design; +pub mod graph_type; pub mod graphic_style_options; pub mod halftone; pub mod hyphenation; @@ -339,6 +340,7 @@ registry! { GraphDesign: [graph_design::DESIGN] => graph_design::DESIGN_SPEC, GraphColumn: [graph_design::COLUMN] => graph_design::COLUMN_SPEC, GraphMarker: [graph_design::MARKER] => graph_design::MARKER_SPEC, + GraphType: [graph_type::KIND] => graph_type::SPEC, GradientStop: ["gradientStop"] => gradient_stop::SPEC, ColorPicker: [color_picker::KIND] => color_picker::SPEC, GraphicStyleOptions: [graphic_style_options::KIND] => graphic_style_options::SPEC, @@ -514,6 +516,8 @@ fn hidden_controls(d: &Dialog) -> &'static [&'static str] { Some(DialogKind::FileInfo) => &["__keyword"], // The preset name being typed. Some(DialogKind::FlattenTransparency) => &["__presetName"], + // The page shown. + Some(DialogKind::GraphType) => &[graph_type::PAGE], // The Resolution menu's Other. Some(DialogKind::RasterOptions | DialogKind::RasterFormatOptions | DialogKind::PsdOptions) => &["__otherPpi"], // The category shown, the search text and the three settings kept outside the preferences. diff --git a/crates/ui-egui/src/dialogs/command.rs b/crates/ui-egui/src/dialogs/command.rs index 6656b45bf5..4e43ad904c 100644 --- a/crates/ui-egui/src/dialogs/command.rs +++ b/crates/ui-egui/src/dialogs/command.rs @@ -1,8 +1,6 @@ //! The generic parameter dialog (`ui.paramDialog`): edits a command's parameters (`__command`, //! headed `__label`) and runs it on OK, with the fixed ones in `__params` (not shown) added. -use std::sync::LazyLock; - use serde_json::{Value, json}; use super::{DialogSpec, form}; @@ -173,12 +171,6 @@ fn choices(command: &str, key: &str) -> Option { ("text.areaOptions", "firstBaseline") => Some(FIRST_BASELINE), ("text.areaOptions", "verticalAlign") => Some(VERTICAL_ALIGN), (crate::addons::cutting::WEED, "direction") => Some(crate::addons::cutting::WEED_DIRECTIONS), - ("graph.setType", "type") => Some(GRAPH_KINDS.as_slice()), - ("graph.setType", "valueAxis") => Some(GRAPH_VALUE_AXIS), - ("graph.setType", "tickLength" | "rightTickLength" | "categoryTickLength") => Some(GRAPH_TICK_LENGTH), - ("graph.setType", "pieLegend") => Some(PIE_LEGEND), - ("graph.setType", "piePosition") => Some(PIE_POSITION), - ("graph.setType", "pieSort") => Some(PIE_SORT), (crate::addons::image::REMOVE_BACKGROUND | crate::addons::image::COLOR_MASK, "background") => Some(crate::addons::image::BACKGROUNDS), (crate::addons::image::REMOVE_BACKGROUND | crate::addons::image::COLOR_MASK, "match") => Some(crate::addons::image::MATCHES), _ => None, @@ -211,21 +203,6 @@ const FIRST_BASELINE: form::Choices = /// Area Type Options › Align (vertical alignment of the lines in each row/column). const VERTICAL_ALIGN: form::Choices = &[("Top", "top"), ("Center", "center"), ("Bottom", "bottom"), ("Justify", "justify")]; -/// Graph Type › Type: the nine graph kinds, in the Graph tool group's order. -static GRAPH_KINDS: LazyLock> = - LazyLock::new(|| vectorcraft_doc::GraphKind::ALL.iter().map(|k| (k.label(), k.id())).collect()); - -/// Graph Type › Value Axis (series picked on both axes show none, and OK leaves each where it is). -const GRAPH_VALUE_AXIS: form::Choices = &[("On Left Side", "left"), ("On Right Side", "right"), ("On Both Sides", "both")]; - -/// Graph Type › Legend, Position and Sort for pie graphs. -const PIE_LEGEND: form::Choices = &[("No Legend", "none"), ("Standard Legend", "standard"), ("Legends in Wedges", "wedges")]; -const PIE_POSITION: form::Choices = &[("Ratio", "ratio"), ("Even", "even"), ("Stacked", "stacked")]; -const PIE_SORT: form::Choices = &[("All", "all"), ("First", "first"), ("None", "none")]; - -/// Graph Type › Tick Marks › Length. -const GRAPH_TICK_LENGTH: form::Choices = &[("None", "none"), ("Short", "short"), ("Full Width", "full")]; - /// Closes before running, so a dialog the command opens stays open. A previewed one keeps its /// preview as the one undo step. fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result { @@ -402,42 +379,6 @@ mod tests { assert!(p[0] == p[1] && p[1] == p[2] && p[0] < 128, "red in grayscale: {p:?}"); } - /// Graph Type › Value Axis is a dropdown of the values `graph.setType` takes, and OK puts the - /// value axis on the side picked. - #[test] - fn graph_type_value_axis_is_a_dropdown_of_its_sides() { - let doc = vectorcraft_engine::find_command("graph.setType").unwrap().params; - let values: Vec<&str> = choices("graph.setType", "valueAxis").unwrap().iter().map(|(_, v)| *v).collect(); - assert!(doc.contains(&format!("valueAxis?: {}", values.join("|"))), "{values:?}"); - let mut app = VectorcraftApp::new(Session::new(), Default::default()); - app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); - app.run("graph.create", json!({"type": "column", "x": 0, "y": 0, "width": 200, "height": 150})).unwrap(); - crate::menus::graph_dialog(&mut app, "graph.setType").unwrap(); - assert_eq!(app.ui.dialog.as_ref().unwrap().str("valueAxis"), "left"); - app.ui.dialog.as_mut().unwrap().fields.insert("valueAxis".into(), json!("both")); - crate::dialogs::confirm(&mut app).unwrap(); - assert_eq!(app.session.execute("graph.setType", &json!({})).unwrap()["valueAxis"], "both"); - } - - /// Graph Type › Type is a dropdown of the nine graph kinds (#2175), and OK changes the graph's - /// type and keeps its data. - #[test] - fn graph_type_is_a_dropdown_of_the_graph_kinds() { - let kinds: Vec<(&str, &str)> = vectorcraft_doc::GraphKind::ALL.iter().map(|k| (k.label(), k.id())).collect(); - assert_eq!(choices("graph.setType", "type").unwrap().to_vec(), kinds); - let mut app = VectorcraftApp::new(Session::new(), Default::default()); - app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); - app.run("graph.create", json!({"type": "column", "x": 0, "y": 0, "width": 200, "height": 150, "csv": ",a,b\nQ1,1,2\nQ2,3,4"})).unwrap(); - let data = app.session.execute("graph.setData", &json!({})).unwrap(); - assert_eq!(data["rows"], json!([[1.0, 2.0], [3.0, 4.0]])); - crate::menus::graph_dialog(&mut app, "graph.setType").unwrap(); - assert_eq!(app.ui.dialog.as_ref().unwrap().str("type"), "column"); - app.ui.dialog.as_mut().unwrap().fields.insert("type".into(), json!("stackedBar")); - crate::dialogs::confirm(&mut app).unwrap(); - assert_eq!(app.session.execute("graph.setType", &json!({})).unwrap()["type"], "stackedBar"); - assert_eq!(app.session.execute("graph.setData", &json!({})).unwrap(), data); - } - /// A document with a rectangle made a 2 x 2 Grid Repeat and selected, its Repeat Options /// dialog open. fn grid_options_app() -> VectorcraftApp { diff --git a/crates/ui-egui/src/dialogs/graph_type.rs b/crates/ui-egui/src/dialogs/graph_type.rs new file mode 100644 index 0000000000..14bc371e74 --- /dev/null +++ b/crates/ui-egui/src/dialogs/graph_type.rs @@ -0,0 +1,1314 @@ +//! Object › Graph › Type…: Graph Type, for the selected graph or for the series picked in it with +//! Group Selection. +//! +//! A menu at the top shows one page at a time. Graph Options has the Type buttons, the Value Axis +//! side with Separate Scales, the Style checkboxes and the options of the type picked: Column or +//! Bar Width and Cluster Width, the data point and line checkboxes, or a pie graph's Legend, +//! Position and Sort. A page per axis follows for the axes the type has: Value Axis (Left Axis and +//! Right Axis while the value axis is on both sides) with Tick Values, Tick Marks and Add Labels, +//! and Category Axis with Tick Marks. OK runs `graph.setType`, and with nothing changed it closes +//! without a step of history. +//! +//! Fields: the options `graph.setType {}` returns under the command's names for them, with +//! `legend`, `pieLegend`, `piePosition`, `pieSort`, `firstRowInFront`, `firstColumnInFront` and +//! `filledLines` held for every type, and `type` or `valueAxis` null while the picked series +//! differ in it (OK then leaves each series as it is); `overrideValues` and `rightOverrideValues` (Override +//! Calculated Values of the left or only value axis and of the right one: while one is on, OK +//! sends `axisMin`, `axisMax` and `ticks`, or `rightAxisMin`, `rightAxisMax` and `rightTicks`); and +//! `__page`, the page shown (`options`, `valueAxis`, `rightAxis` or `categoryAxis`). + +use std::ops::RangeInclusive; + +use serde_json::{Map, Value, json}; +use vectorcraft_doc::GraphKind; + +use super::{DialogSpec, form, run_and_close}; +use crate::state::Dialog; +use crate::theme::Tokens; +use crate::{VectorcraftApp, widgets}; + +/// The dialog kind of Graph Type. +pub const KIND: &str = "graphType"; + +/// The field that holds the page shown. +pub(super) const PAGE: &str = "__page"; + +const COMMAND: &str = "graph.setType"; + +/// The graph the dialog opened on, the series picked with Group Selection, the graph's own type and +/// value axis side, each series' own type, the series on the right axis, the tick values each value axis is calculated with for the +/// options the dialog shows and the options they were calculated for, and the parameters OK would +/// have sent as the dialog opened. +const GRAPH_ID: &str = "__graphId"; +const SERIES: &str = "__series"; +const GRAPH: &str = "__graph"; +const GRAPH_AXIS: &str = "__graphAxis"; +const SERIES_KINDS: &str = "__seriesKinds"; +const RIGHT_SERIES: &str = "__rightSeries"; +const CALCULATED: &str = "__calculated"; +const CALCULATED_FOR: &str = "__calculatedFor"; +const OPENED: &str = "__opened"; + +const LABEL_W: f32 = 170.0; +const FIELD_W: f32 = 160.0; +const NUMBER_W: f32 = 72.0; +const TYPE_BUTTON: f32 = 34.0; + +/// The widths `graph.setType` takes for columns, bars and clusters, in percent. +const WIDTHS: RangeInclusive = 1.0..=1000.0; +/// The divisions it takes for a value axis, and the tick marks it takes per division. +const DIVISIONS: RangeInclusive = 1.0..=100.0; +const TICK_MARKS: RangeInclusive = 1.0..=20.0; +/// The characters it keeps of a prefix or suffix. +const AFFIX_CHARS: usize = 64; +/// The divisions it draws an overridden value axis in while the axis has no count of its own. +const DEFAULT_DIVISIONS: usize = 5; + +/// The types whose value axis goes on a side, those whose right axis takes a scale of its own, and +/// those with a category axis. +const SIDED: [GraphKind; 5] = [GraphKind::Column, GraphKind::StackedColumn, GraphKind::Line, GraphKind::Area, GraphKind::Scatter]; +const SCALED: [GraphKind; 4] = [GraphKind::Column, GraphKind::StackedColumn, GraphKind::Line, GraphKind::Area]; +const CATEGORIES: [GraphKind; 6] = + [GraphKind::Column, GraphKind::StackedColumn, GraphKind::Bar, GraphKind::StackedBar, GraphKind::Line, GraphKind::Area]; +/// The types drawn as columns or bars, and those drawn as data points and lines. +const COLUMNS: [GraphKind; 4] = [GraphKind::Column, GraphKind::StackedColumn, GraphKind::Bar, GraphKind::StackedBar]; +const LINES: [GraphKind; 3] = [GraphKind::Line, GraphKind::Scatter, GraphKind::Radar]; + +/// Value Axis for the whole graph and for picked series (a series goes on one axis), Tick Marks › +/// Length, and a pie graph's Legend, Position and Sort, each as (value, label). +const SIDES: [(&str, &str); 3] = [("left", "On Left Side"), ("right", "On Right Side"), ("both", "On Both Sides")]; +const SERIES_SIDES: [(&str, &str); 2] = [("left", "On Left Side"), ("right", "On Right Side")]; +const TICK_LENGTHS: [(&str, &str); 3] = [("none", "None"), ("short", "Short"), ("full", "Full Width")]; +const PIE_LEGENDS: [(&str, &str); 3] = [("none", "No Legend"), ("standard", "Standard Legend"), ("wedges", "Legends in Wedges")]; +const PIE_POSITIONS: [(&str, &str); 3] = [("ratio", "Ratio"), ("even", "Even"), ("stacked", "Stacked")]; +const PIE_SORTS: [(&str, &str); 3] = [("all", "All"), ("first", "First"), ("none", "None")]; + +/// The options OK always sends. `valueAxis` is left out while the picked series are on both axes, +/// and the legend and the tick values follow the type and Override Calculated Values. +const SENT: [&str; 24] = [ + "type", + "valueAxis", + "separateScales", + "dropShadow", + "legendAcrossTop", + "firstRowInFront", + "firstColumnInFront", + "columnWidth", + "clusterWidth", + "markPoints", + "connectPoints", + "edgeToEdge", + "filledLines", + "tickLength", + "tickMarks", + "rightTickLength", + "rightTickMarks", + "categoryTickLength", + "categoryTickMarks", + "ticksBetweenLabels", + "prefix", + "suffix", + "rightPrefix", + "rightSuffix", +]; + +/// The fields of one value axis: its place in the calculated tick values, Override Calculated +/// Values as the dialog shows it and as it opened, the tick values, the tick marks and the labels. +struct Axis { + index: usize, + overridden: &'static str, + opened_overridden: &'static str, + min: &'static str, + max: &'static str, + ticks: &'static str, + length: &'static str, + marks: &'static str, + prefix: &'static str, + suffix: &'static str, +} + +const LEFT: Axis = Axis { + index: 0, + overridden: "overrideValues", + opened_overridden: "__override", + min: "axisMin", + max: "axisMax", + ticks: "ticks", + length: "tickLength", + marks: "tickMarks", + prefix: "prefix", + suffix: "suffix", +}; + +const RIGHT: Axis = Axis { + index: 1, + overridden: "rightOverrideValues", + opened_overridden: "__rightOverride", + min: "rightAxisMin", + max: "rightAxisMax", + ticks: "rightTicks", + length: "rightTickLength", + marks: "rightTickMarks", + prefix: "rightPrefix", + suffix: "rightSuffix", +}; + +pub(super) const SPEC: DialogSpec = DialogSpec { + heading: |_| tl!("Graph Type").into(), + body, + confirm, + ok_enabled: Some(|_, d| problem(d).is_none()), + min_width: 440.0, + ..DialogSpec::FORM +}; + +/// Open Graph Type on the options of the selected graph, or of the series picked in it with Group +/// Selection. An error without a selected graph. +pub fn open(app: &mut VectorcraftApp) -> Result { + let queried = app.session.execute(COMMAND, &json!({})).map_err(|e| e.to_string())?; + let subject = vectorcraft_engine::graph_type_subject(&app.session).map_err(|e| e.to_string())?; + let st = app.session.active().ok_or("no document open")?; + let spec = st.doc.node(subject.id).and_then(|n| n.extras().graph.as_deref()).ok_or("select a graph")?; + let mut fields = queried.as_object().cloned().unwrap_or_default(); + // The options the query leaves out for the graph's types: the dialog shows each one once the + // type picked uses it. + let pie_legend = match (spec.legend, spec.pie_legend_in_wedges) { + (false, _) => "none", + (true, true) => "wedges", + (true, false) => "standard", + }; + for (key, value) in [ + ("firstRowInFront", json!(spec.first_row_in_front)), + ("firstColumnInFront", json!(spec.first_column_in_front)), + ("filledLines", json!(spec.filled_lines)), + ("legend", json!(spec.legend)), + ("pieLegend", json!(pie_legend)), + ("piePosition", json!(spec.pie_position.id())), + ("pieSort", json!(spec.pie_sort.id())), + ] { + fields.entry(key).or_insert(value); + } + // Picked series of different types show no type, and OK leaves each one's type as it is. + let mut picked_kinds = subject.series.iter().map(|i| spec.series_kind(*i)); + if picked_kinds.next().is_some_and(|first| picked_kinds.any(|kind| kind != first)) { + fields.insert("type".into(), Value::Null); + } + let count = spec.rows.iter().map(Vec::len).max().unwrap_or(0).min(vectorcraft_doc::MAX_GRAPH_SERIES); + let series_kinds: Vec> = (0..count).map(|i| spec.series_kinds.get(i).copied().flatten().map(GraphKind::id)).collect(); + let calculated: Vec = subject.calculated.iter().map(|(lo, hi, divisions)| json!([lo, hi, divisions])).collect(); + for (axis, min, max) in [(&LEFT, spec.axis_min, spec.axis_max), (&RIGHT, spec.right_axis_min, spec.right_axis_max)] { + let overridden = json!(min.is_some() && max.is_some()); + fields.insert(axis.overridden.into(), overridden.clone()); + fields.insert(axis.opened_overridden.into(), overridden); + } + fields.insert(GRAPH_ID.into(), json!(subject.id.0)); + fields.insert(SERIES.into(), json!(subject.series)); + fields.insert(GRAPH.into(), json!(spec.kind.id())); + fields.insert(GRAPH_AXIS.into(), json!(spec.value_axis.id())); + fields.insert(SERIES_KINDS.into(), json!(series_kinds)); + fields.insert(RIGHT_SERIES.into(), json!(spec.right_series.iter().filter(|i| **i < count).collect::>())); + fields.insert(CALCULATED.into(), json!(calculated)); + fields.insert(PAGE.into(), json!("options")); + let mut d = Dialog { kind: KIND.into(), fields }; + let key = pending(&d); + d.fields.insert(CALCULATED_FOR.into(), key); + settle(&mut d); + let opened = params(&d); + d.fields.insert(OPENED.into(), opened); + app.ui.dialog = Some(d); + Ok(json!({ "dialog": KIND })) +} + +/// The series the type and the value axis go to: those picked with Group Selection. None: the +/// whole graph. +fn picked(d: &Dialog) -> Vec { + let indexes = d.fields.get(SERIES).and_then(Value::as_array); + indexes.map(|a| a.iter().filter_map(|v| v.as_u64().and_then(|i| usize::try_from(i).ok())).collect()).unwrap_or_default() +} + +/// The type the Type buttons show. +fn chosen(d: &Dialog) -> Option { + d.fields.get("type").and_then(Value::as_str).and_then(GraphKind::parse) +} + +/// The graph's own type as OK leaves it: the type picked, or with series picked the type the graph +/// has. +fn graph_kind(d: &Dialog) -> GraphKind { + let own = d.fields.get(GRAPH).and_then(Value::as_str).and_then(GraphKind::parse).unwrap_or_default(); + if picked(d).is_empty() { chosen(d).unwrap_or(own) } else { own } +} + +/// The type each series draws as once OK is pressed: the type picked for the picked series (their +/// own while they differ and none is picked), its own type where that combines with the graph's, +/// else the graph's. +fn series_kinds(d: &Dialog) -> Vec { + let (graph, picked, chosen) = (graph_kind(d), picked(d), chosen(d)); + let own: Vec> = d + .fields + .get(SERIES_KINDS) + .and_then(Value::as_array) + .map(|a| a.iter().map(|v| v.as_str().and_then(GraphKind::parse)).collect()) + .unwrap_or_default(); + (0..own.len().max(1)) + .map(|i| { + let kept = own.get(i).copied().flatten(); + let kind = if picked.contains(&i) { chosen.or(kept) } else { kept }; + kind.filter(|k| k.combines_with(graph)).unwrap_or(graph) + }) + .collect() +} + +/// Whether a series draws as one of `kinds` once OK is pressed. +fn draws(d: &Dialog, kinds: &[GraphKind]) -> bool { + series_kinds(d).iter().any(|k| kinds.contains(k)) +} + +/// The side or sides the graph's value axis is on once OK is pressed. With series picked, Value +/// Axis is theirs and the graph keeps its own. +fn graph_axis(d: &Dialog) -> String { + d.str(if picked(d).is_empty() { "valueAxis" } else { GRAPH_AXIS }) +} + +/// Whether the graph draws a value axis on both sides. +fn both_sides(d: &Dialog) -> bool { + SIDED.contains(&graph_kind(d)) && graph_axis(d) == "both" +} + +/// Whether the right value axis has a scale of its own: Separate Scales with the value axis on +/// both sides of a type that takes one. +fn separate(d: &Dialog) -> bool { + d.bool("separateScales") && both_sides(d) && SCALED.contains(&graph_kind(d)) +} + +/// Whether the graph draws a legend beside or above the plot. +fn legend_shown(d: &Dialog) -> bool { + if graph_kind(d) == GraphKind::Pie { d.str("pieLegend") == "standard" } else { d.bool("legend") } +} + +/// The pages the menu lists for the type picked, as (id, name): Graph Options, a page per value +/// axis side (none for a pie graph) and Category Axis for the types that have one. +fn pages(d: &Dialog) -> Vec<(&'static str, &'static str)> { + let kind = graph_kind(d); + let mut pages = vec![("options", tl!("Graph Options"))]; + if kind != GraphKind::Pie { + if both_sides(d) { + pages.extend([("valueAxis", tl!("Left Axis")), ("rightAxis", tl!("Right Axis"))]); + } else { + pages.push(("valueAxis", tl!("Value Axis"))); + } + } + if CATEGORIES.contains(&kind) { + pages.push(("categoryAxis", tl!("Category Axis"))); + } + pages +} + +/// The least value, the greatest and the divisions `axis` is drawn with while its tick values are +/// calculated. +fn calculated(d: &Dialog, axis: &Axis) -> (f64, f64, usize) { + let of = |i: usize| d.fields.get(CALCULATED)?.get(axis.index)?.get(i)?.as_f64(); + let divisions = of(2).filter(|n| *n >= 1.0).map_or(DEFAULT_DIVISIONS, |n| n.min(*DIVISIONS.end()) as usize); + (of(0).unwrap_or(0.0), of(1).unwrap_or(1.0), divisions) +} + +/// The series on the right value axis once OK is pressed: the graph's, with the picked series moved +/// to the side picked for them. +fn right_series(d: &Dialog) -> Vec { + let mut right: Vec = d + .fields + .get(RIGHT_SERIES) + .and_then(Value::as_array) + .map(|a| a.iter().filter_map(|v| v.as_u64().and_then(|i| usize::try_from(i).ok())).collect()) + .unwrap_or_default(); + let picked = picked(d); + match d.fields.get("valueAxis").and_then(Value::as_str) { + Some("right") => right.extend(picked.into_iter().filter(|i| !right.contains(i)).collect::>()), + Some("left") => right.retain(|i| !picked.contains(i)), + _ => {} + } + right +} + +/// Whether the right axis' own scale (`right`) or the left one draws a value axis: the left scale +/// draws both sides without Separate Scales, and with it each scale needs a series on its side (the +/// other side's scale draws both sides when one side has none). +fn scale_used(d: &Dialog, right: bool) -> bool { + if !separate(d) { + return !right; + } + let on_right = right_series(d); + let count = series_kinds(d).len(); + (0..count).any(|i| on_right.contains(&i) == right) +} + +/// The options the calculated tick values depend on, as the dialog shows them: the graph's type, +/// each series' type, the value axis side, Separate Scales, and the side picked series go on. +fn pending(d: &Dialog) -> Value { + let kinds: Vec<&str> = series_kinds(d).into_iter().map(GraphKind::id).collect(); + let side = d.fields.get("valueAxis").cloned().unwrap_or(Value::Null); + json!([graph_kind(d).id(), kinds, graph_axis(d), d.bool("separateScales"), side]) +} + +/// Calculate the tick values again when the options they depend on changed since they were last +/// calculated: the graph with the type, the value axis side and Separate Scales the dialog shows, and +/// the picked series on the type and side picked for them. +fn recalculate(app: &VectorcraftApp, d: &mut Dialog) { + let key = pending(d); + if d.fields.get(CALCULATED_FOR) == Some(&key) { + return; + } + let id = d.fields.get(GRAPH_ID).and_then(Value::as_u64).map(vectorcraft_doc::NodeId); + let Some(spec) = id.and_then(|id| app.session.active()?.doc.node(id)?.extras().graph.as_deref().cloned()) else { + return; + }; + let mut spec = spec; + let graph = graph_kind(d); + spec.series_kinds = series_kinds(d).into_iter().map(|kind| (kind != graph).then_some(kind)).collect(); + spec.kind = graph; + if let Some(side) = vectorcraft_doc::ValueAxisSide::parse(&graph_axis(d)) { + spec.value_axis = side; + } + spec.separate_scales = d.bool("separateScales"); + spec.right_series = right_series(d); + let calculated: Vec = + vectorcraft_engine::graph_calculated_axes(&spec).iter().map(|(lo, hi, divisions)| json!([lo, hi, divisions])).collect(); + let before = d.fields.insert(CALCULATED.into(), json!(calculated)); + d.fields.insert(CALCULATED_FOR.into(), key); + // An overridden axis that still holds the values calculated before takes the new ones. + for axis in [&LEFT, &RIGHT] { + let was = |i: usize| before.as_ref()?.get(axis.index)?.get(i)?.as_f64(); + let keys = [axis.min, axis.max, axis.ticks]; + if d.bool(axis.overridden) && keys.iter().enumerate().all(|(i, key)| number(d, key).is_some_and(|v| Some(v) == was(i))) { + for key in keys { + d.fields.remove(key); + } + } + } +} + +/// Field `key` as a number. `None` when it is missing, null or not a number. +fn number(d: &Dialog, key: &str) -> Option { + d.fields.get(key).and_then(Value::as_f64) +} + +/// The least and greatest value `axis` shows: its own, else the calculated ones. +fn bounds(d: &Dialog, axis: &Axis) -> (f64, f64) { + let (lo, hi, _) = calculated(d, axis); + (number(d, axis.min).unwrap_or(lo), number(d, axis.max).unwrap_or(hi)) +} + +/// The divisions `axis` shows: its own count, else the count it is drawn in. +fn divisions(d: &Dialog, axis: &Axis) -> usize { + let own = number(d, axis.ticks).filter(|n| *n >= 1.0).map(|n| n.min(*DIVISIONS.end()) as usize); + let both = number(d, axis.min).is_some() && number(d, axis.max).is_some(); + own.unwrap_or(if both { DEFAULT_DIVISIONS } else { calculated(d, axis).2 }) +} + +/// Give each axis whose Override Calculated Values is on the tick values it lacks: the calculated +/// ones, which the fields then show and OK sends. +fn settle(d: &mut Dialog) { + for axis in [&LEFT, &RIGHT] { + if !d.bool(axis.overridden) { + continue; + } + let ((lo, hi), count) = (bounds(d, axis), divisions(d, axis)); + for (key, value) in [(axis.min, json!(lo)), (axis.max, json!(hi))] { + if number(d, key).is_none() { + d.fields.insert(key.into(), value); + } + } + if number(d, axis.ticks).is_none_or(|n| n < 1.0) { + d.fields.insert(axis.ticks.into(), json!(count)); + } + } +} + +/// Why OK can't apply the dialog: an overridden value axis whose maximum is not more than its +/// minimum, which `graph.setType` would draw with calculated values instead. +fn problem(d: &Dialog) -> Option<&'static str> { + let out_of_order = |axis: &Axis| { + let (lo, hi) = bounds(d, axis); + d.bool(axis.overridden) && !(hi > lo && (hi - lo).is_finite()) + }; + let refused = graph_kind(d) != GraphKind::Pie && [&LEFT, &RIGHT].into_iter().any(|axis| scale_used(d, axis.index == 1) && out_of_order(axis)); + refused.then(|| tl!("Maximum must be more than Minimum.")) +} + +/// `graph.setType`'s parameters for the dialog as it is. The type and the value axis go to the +/// series picked with Group Selection, as the command reads the selection. +fn params(d: &Dialog) -> Value { + let mut d = d.clone(); + settle(&mut d); + let mut p = Map::new(); + let send = |p: &mut Map, key: &str| { + if let Some(v) = d.fields.get(key).filter(|v| !v.is_null()) { + p.insert(key.into(), v.clone()); + } + }; + for key in SENT { + send(&mut p, key); + } + // A pie graph's Legend menu stands for the legend checkbox. + let legend: &[&str] = if graph_kind(&d) == GraphKind::Pie { &["pieLegend", "piePosition", "pieSort"] } else { &["legend"] }; + for key in legend { + send(&mut p, key); + } + for axis in [&LEFT, &RIGHT] { + if d.bool(axis.overridden) { + for key in [axis.min, axis.max, axis.ticks] { + send(&mut p, key); + } + } else if d.bool(axis.opened_overridden) { + // Turned off: the tick values are calculated again. + p.extend([(axis.min.into(), Value::Null), (axis.max.into(), Value::Null), (axis.ticks.into(), json!(0))]); + } + } + Value::Object(p) +} + +/// Whether two sets of parameters hold the same values, a count being the same as the number a +/// field gives for it. +fn same(a: &Value, b: &Value) -> bool { + match (a, b) { + (Value::Number(x), Value::Number(y)) => x.as_f64() == y.as_f64(), + (Value::Object(x), Value::Object(y)) => x.len() == y.len() && x.iter().all(|(k, v)| y.get(k).is_some_and(|w| same(v, w))), + _ => a == b, + } +} + +fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result { + let mut d = d.clone(); + recalculate(app, &mut d); + if let Some(why) = problem(&d) { + return Err(why.into()); + } + let mut p = params(&d); + // Nothing changed: no step of history. + if d.fields.get(OPENED).is_some_and(|opened| same(opened, &p)) { + app.ui.dialog = None; + return Ok(Value::Null); + } + aim(app, &d, &mut p); + run_and_close(app, COMMAND, p) +} + +/// Point `p` at the graph and the series the dialog opened on when the selection no longer holds +/// them: `id`, and `seriesIndexes` while series are picked and a type or a value axis goes to them. +/// While the selection still holds them, the command reads it and keeps picked series selected. +fn aim(app: &VectorcraftApp, d: &Dialog, p: &mut Value) { + let Some(id) = d.fields.get(GRAPH_ID).and_then(Value::as_u64) else { + return; + }; + let now = vectorcraft_engine::graph_type_subject(&app.session).ok(); + if now.is_some_and(|now| now.id.0 == id && now.series == picked(d)) { + return; + } + let Some(p) = p.as_object_mut() else { + return; + }; + p.insert("id".into(), json!(id)); + let picked = picked(d); + // Picked series of different types on both axes send neither, and the other options go to the + // whole graph. + if !picked.is_empty() && (p.contains_key("type") || p.contains_key("valueAxis")) { + p.insert("seriesIndexes".into(), json!(picked)); + } +} + +fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool { + recalculate(app, d); + settle(d); + let pages = pages(d); + let (page, shown) = pages.iter().find(|(id, _)| *id == d.str(PAGE)).or(pages.first()).copied().unwrap_or(("options", "")); + let names: Vec<&str> = pages.iter().map(|(_, name)| *name).collect(); + let pick = widgets::dropdown_names_named(ui, "graph-type-page", Some(tl!("Graph Type")), shown, &names, FIELD_W); + if let Some((id, _)) = pick.and_then(|i| pages.get(i)) { + d.fields.insert(PAGE.into(), json!(id)); + } + ui.add_space(8.0); + match page { + "valueAxis" => value_page(ui, d, false), + "rightAxis" => value_page(ui, d, true), + "categoryAxis" => category_page(ui, d), + _ => options_page(ui, d), + } + if let Some(why) = problem(d) { + ui.add_space(6.0); + ui.colored_label(Tokens::get(ui.ctx()).error, why); + } + false +} + +/// `text` with the colon of a field label. +fn colon(text: &str) -> String { + format!("{text}:") +} + +/// A checkbox bound to `d.fields[key]`, dimmed while the type picked has no use for it. +fn check(ui: &mut egui::Ui, d: &mut Dialog, key: &str, label: &str, enabled: bool) { + let on = d.bool(key); + if widgets::check(ui, label, on, enabled) { + d.fields.insert(key.into(), json!(!on)); + } +} + +/// A dropdown row bound to the string `d.fields[key]`; `options` are (value, label). A value that +/// is not among them, such as the null of series on both value axes, shows a blank field. +fn choice(ui: &mut egui::Ui, d: &mut Dialog, key: &str, label: &str, options: &[(&str, &str)]) { + widgets::label_row(ui, label, LABEL_W, |ui| { + let current = d.fields.get(key).and_then(Value::as_str).unwrap_or_default(); + let shown = options.iter().find(|(value, _)| *value == current).map_or("", |(_, label)| *label); + let labels: Vec<&str> = options.iter().map(|(_, label)| *label).collect(); + if let Some((value, _)) = widgets::dropdown(ui, ("graph-type", key), shown, &labels, FIELD_W).and_then(|i| options.get(i)) { + d.fields.insert(key.into(), json!(value)); + } + }); +} + +/// A number row bound to `d.fields[key]`, kept within `range` and rounded to `decimals` places. +fn ranged(ui: &mut egui::Ui, d: &mut Dialog, key: &str, label: &str, shown: f64, (range, suffix, decimals): (RangeInclusive, &str, usize)) { + widgets::label_row(ui, label, LABEL_W, |ui| { + if let Some(v) = widgets::range_field(ui, ("graph-type", key), shown, range, suffix, decimals, NUMBER_W) { + d.fields.insert(key.into(), json!(v)); + } + }); +} + +/// A text row bound to `d.fields[key]` that takes the characters `graph.setType` keeps. +fn text(ui: &mut egui::Ui, d: &mut Dialog, key: &str, label: &str) { + widgets::label_row(ui, label, LABEL_W, |ui| { + form::text_edit_limited(ui, d, key, FIELD_W, AFFIX_CHARS); + }); +} + +fn options_page(ui: &mut egui::Ui, d: &mut Dialog) { + widgets::subheader(ui, tl!("Type")); + type_row(ui, d); + ui.add_space(4.0); + let kind = graph_kind(d); + ui.add_enabled_ui(SIDED.contains(&kind), |ui| { + let sides: &[(&str, &str)] = if picked(d).is_empty() { &SIDES } else { &SERIES_SIDES }; + choice(ui, d, "valueAxis", &colon(tl!("Value Axis")), sides); + }); + let scaled = both_sides(d) && SCALED.contains(&kind); + check(ui, d, "separateScales", tl!("Separate Scales"), scaled); + ui.add_space(8.0); + widgets::subheader(ui, tl!("Style")); + let columns = draws(d, &COLUMNS); + egui::Grid::new("graph-type-style").num_columns(2).spacing([24.0, 6.0]).show(ui, |ui| { + check(ui, d, "dropShadow", tl!("Add Drop Shadow"), true); + check(ui, d, "firstRowInFront", tl!("First Row in Front"), columns); + ui.end_row(); + check(ui, d, "legendAcrossTop", tl!("Add Legend Across Top"), legend_shown(d)); + check(ui, d, "firstColumnInFront", tl!("First Column in Front"), columns); + ui.end_row(); + // A pie graph has its Legend menu among its options. + if kind != GraphKind::Pie { + check(ui, d, "legend", tl!("Legend"), true); + ui.end_row(); + } + }); + type_options(ui, d, kind); +} + +/// The Options of the type picked: widths for columns and bars, data points and lines for line, +/// scatter and radar series, and Legend, Position and Sort for a pie graph. An area graph has none. +fn type_options(ui: &mut egui::Ui, d: &mut Dialog, kind: GraphKind) { + let (columns, lines, pie) = (draws(d, &COLUMNS), draws(d, &LINES), kind == GraphKind::Pie); + if !(columns || lines || pie) { + return; + } + ui.add_space(8.0); + widgets::subheader(ui, tl!("Options")); + if columns { + let width = if matches!(kind, GraphKind::Bar | GraphKind::StackedBar) { tl!("Bar Width") } else { tl!("Column Width") }; + for (key, label) in [("columnWidth", width), ("clusterWidth", tl!("Cluster Width"))] { + let shown = number(d, key).unwrap_or(100.0); + ranged(ui, d, key, &colon(label), shown, (WIDTHS, "%", 2)); + } + } + if lines { + // Edge-to-Edge Lines is for line series, and Draw Filled Lines for connected data points. + let (line, connected) = (draws(d, &[GraphKind::Line]), d.bool("connectPoints")); + egui::Grid::new("graph-type-lines").num_columns(2).spacing([24.0, 6.0]).show(ui, |ui| { + check(ui, d, "markPoints", tl!("Mark Data Points"), true); + check(ui, d, "edgeToEdge", tl!("Edge-to-Edge Lines"), line); + ui.end_row(); + check(ui, d, "connectPoints", tl!("Connect Data Points"), true); + check(ui, d, "filledLines", tl!("Draw Filled Lines"), connected); + ui.end_row(); + }); + } + if pie { + choice(ui, d, "pieLegend", &colon(tl!("Legend")), &PIE_LEGENDS); + choice(ui, d, "piePosition", &colon(tl!("Position")), &PIE_POSITIONS); + choice(ui, d, "pieSort", &colon(tl!("Sort")), &PIE_SORTS); + } +} + +/// The page of a value axis: the tick values of the scale it shows, and the tick marks and labels +/// of its side. An only value axis on the right side shows the left scale with the right side's +/// tick marks and labels, as the graph draws it. +fn value_page(ui: &mut egui::Ui, d: &mut Dialog, right: bool) { + let scale = if right { &RIGHT } else { &LEFT }; + let side = if right || (SIDED.contains(&graph_kind(d)) && graph_axis(d) == "right") { &RIGHT } else { &LEFT }; + widgets::subheader(ui, tl!("Tick Values")); + // Without Separate Scales the right axis shows the left axis' tick values, and with it a side + // without series shows the other side's. + let own_scale = scale_used(d, right); + check(ui, d, scale.overridden, tl!("Override Calculated Values"), own_scale); + ui.add_enabled_ui(own_scale && d.bool(scale.overridden), |ui| { + let ((lo, hi), count) = (bounds(d, scale), divisions(d, scale)); + for (key, label, shown) in [(scale.min, tl!("Minimum:"), lo), (scale.max, tl!("Maximum:"), hi)] { + widgets::label_row(ui, label, LABEL_W, |ui| { + if let Some(v) = widgets::plain_field(ui, ("graph-type", key), shown, "", 4, NUMBER_W) { + d.fields.insert(key.into(), json!(v)); + } + }); + } + ranged(ui, d, scale.ticks, &colon(tl!("Divisions")), count as f64, (DIVISIONS, "", 0)); + }); + ui.add_space(8.0); + tick_marks(ui, d, side.length, side.marks); + ui.add_space(8.0); + widgets::subheader(ui, tl!("Add Labels")); + text(ui, d, side.prefix, tl!("Prefix:")); + text(ui, d, side.suffix, &colon(tl!("Suffix"))); +} + +fn category_page(ui: &mut egui::Ui, d: &mut Dialog) { + tick_marks(ui, d, "categoryTickLength", "categoryTickMarks"); + let drawn = d.str("categoryTickLength") != "none"; + check(ui, d, "ticksBetweenLabels", tl!("Draw Tick Marks Between Labels"), drawn); +} + +/// Tick Marks: the length, and the tick marks per division while there are tick marks to draw. +fn tick_marks(ui: &mut egui::Ui, d: &mut Dialog, length: &str, marks: &str) { + widgets::subheader(ui, tl!("Tick Marks")); + choice(ui, d, length, &colon(tl!("Length")), &TICK_LENGTHS); + let shown = number(d, marks).unwrap_or(1.0); + ui.add_enabled_ui(d.str(length) != "none", |ui| { + ranged(ui, d, marks, &colon(tl!("Tick Marks per Division")), shown, (TICK_MARKS, "", 0)); + }); +} + +/// The nine Type buttons. With series picked, the types that cannot go in the graph are dimmed. +fn type_row(ui: &mut egui::Ui, d: &mut Dialog) { + let own = (!picked(d).is_empty()).then(|| graph_kind(d)); + let current = chosen(d); + ui.horizontal(|ui| { + ui.spacing_mut().item_spacing.x = 4.0; + for kind in GraphKind::ALL { + let enabled = own.is_none_or(|graph| kind.combines_with(graph)); + if type_button(ui, kind, current == Some(kind), enabled) { + d.fields.insert("type".into(), json!(kind.id())); + } + } + }); +} + +/// The name of a graph type, in the UI language. +fn kind_name(kind: GraphKind) -> &'static str { + match kind { + GraphKind::Column => tl!("Column Graph"), + GraphKind::StackedColumn => tl!("Stacked Column Graph"), + GraphKind::Bar => tl!("Bar Graph"), + GraphKind::StackedBar => tl!("Stacked Bar Graph"), + GraphKind::Line => tl!("Line Graph"), + GraphKind::Area => tl!("Area Graph"), + GraphKind::Scatter => tl!("Scatter Graph"), + GraphKind::Pie => tl!("Pie Graph"), + GraphKind::Radar => tl!("Radar Graph"), + } +} + +/// A Type button: the type's picture, pressed while it is the type picked. Whether it was clicked. +fn type_button(ui: &mut egui::Ui, kind: GraphKind, selected: bool, enabled: bool) -> bool { + let t = Tokens::get(ui.ctx()); + let sense = if enabled { egui::Sense::click() } else { egui::Sense::hover() }; + let (rect, resp) = ui.allocate_exact_size(egui::Vec2::splat(TYPE_BUTTON), sense); + let fill = if selected { + t.tool_active + } else if enabled && resp.hovered() { + t.hover + } else { + egui::Color32::TRANSPARENT + }; + ui.painter().rect_filled(rect, egui::CornerRadius::same(5), fill); + let ink = if !enabled { + t.text_disabled + } else if selected { + t.text_strong + } else { + t.icon + }; + paint_kind(ui.painter(), rect.shrink(7.0), kind, ink); + let name = kind_name(kind); + resp.widget_info(|| widgets::icon_button_info(enabled, selected, name)); + resp.on_hover_text(name).clicked() +} + +/// Draw the picture of graph type `kind` in `r` with `ink`. +fn paint_kind(p: &egui::Painter, r: egui::Rect, kind: GraphKind, ink: egui::Color32) { + let at = |x: f32, y: f32| egui::pos2(r.left() + x * r.width(), r.top() + y * r.height()); + let faint = ink.gamma_multiply(0.45); + let block = |from: (f32, f32), to: (f32, f32), color: egui::Color32| { + p.rect_filled(egui::Rect::from_two_pos(at(from.0, from.1), at(to.0, to.1)), 0.0, color); + }; + let stroke = egui::Stroke::new(1.5, ink); + // Three columns or bars: where each one starts across the picture, and how long it is. + let marks = [(0.04, 0.55), (0.37, 0.95), (0.7, 0.75)]; + match kind { + GraphKind::Column | GraphKind::StackedColumn => { + for (x, len) in marks { + block((x, 1.0 - len), (x + 0.26, 1.0), ink); + if kind == GraphKind::StackedColumn { + block((x, 1.0 - len), (x + 0.26, 1.0 - len * 0.55), faint); + } + } + } + GraphKind::Bar | GraphKind::StackedBar => { + for (y, len) in marks { + block((0.0, y), (len, y + 0.26), ink); + if kind == GraphKind::StackedBar { + block((len * 0.55, y), (len, y + 0.26), faint); + } + } + } + GraphKind::Line | GraphKind::Area | GraphKind::Scatter => paint_points(p, &at, kind, ink), + GraphKind::Pie => { + let (centre, radius) = (r.center(), r.width().min(r.height()) / 2.0); + p.circle_stroke(centre, radius - 0.75, stroke); + let arc = (0..=8).map(|i| { + let a = -std::f32::consts::FRAC_PI_2 + std::f32::consts::FRAC_PI_2 * 1.3 * i as f32 / 8.0; + centre + egui::vec2(a.cos(), a.sin()) * radius + }); + let wedge: Vec = std::iter::once(centre).chain(arc).collect(); + p.add(egui::Shape::convex_polygon(wedge, ink, egui::Stroke::NONE)); + } + GraphKind::Radar => { + let (centre, radius) = (r.center(), r.width().min(r.height()) / 2.0); + let ring = |reach: [f32; 5]| -> Vec { + let corner = |(i, len): (usize, &f32)| { + let a = -std::f32::consts::FRAC_PI_2 + std::f32::consts::TAU * i as f32 / 5.0; + centre + egui::vec2(a.cos(), a.sin()) * radius * *len + }; + reach.iter().enumerate().map(corner).collect() + }; + p.add(egui::Shape::closed_line(ring([1.0; 5]), egui::Stroke::new(1.0, faint))); + p.add(egui::Shape::closed_line(ring([0.85, 0.5, 0.75, 0.45, 0.7]), stroke)); + } + } +} + +/// The pictures of the line, area and scatter types: four data points joined by a line, filled +/// down to the baseline, or on their own with a second row of points. +fn paint_points(p: &egui::Painter, at: &dyn Fn(f32, f32) -> egui::Pos2, kind: GraphKind, ink: egui::Color32) { + let points = [(0.05, 0.7), (0.35, 0.3), (0.65, 0.5), (0.95, 0.1)]; + match kind { + GraphKind::Area => { + // A band under each segment: the area under the line is not convex as a whole. + for pair in points.windows(2) { + if let [(x0, y0), (x1, y1)] = *pair { + let band = vec![at(x0, 1.0), at(x0, y0), at(x1, y1), at(x1, 1.0)]; + p.add(egui::Shape::convex_polygon(band, ink, egui::Stroke::NONE)); + } + } + } + GraphKind::Scatter => { + for (x, y) in points.into_iter().chain([(0.2, 0.25), (0.5, 0.85), (0.8, 0.6)]) { + p.circle_filled(at(x, y), 1.8, ink); + } + } + _ => { + p.add(egui::Shape::line(points.iter().map(|(x, y)| at(*x, *y)).collect(), egui::Stroke::new(1.5, ink))); + for (x, y) in points { + p.circle_filled(at(x, y), 2.0, ink); + } + } + } +} + +#[cfg(test)] +mod tests { + use egui::accesskit::Role; + use egui_kittest::kittest::{NodeT, Queryable}; + use vectorcraft_engine::Session; + + use super::*; + + type Harness = egui_kittest::Harness<'static, VectorcraftApp>; + + /// A 400 by 400 document with a selected graph of type `kind`: series a and b over Q1 (1, 2) + /// and Q2 (3, 4). + fn app_with_graph(kind: &str) -> VectorcraftApp { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.run("graph.create", json!({"type": kind, "x": 0, "y": 0, "width": 200, "height": 150, "csv": ",a,b\nQ1,1,2\nQ2,3,4"})).unwrap(); + app + } + + /// The open dialog drawn in a kittest harness. + fn harness(app: VectorcraftApp) -> Harness { + let mut fonts = false; + let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state( + move |ui, app: &mut VectorcraftApp| { + if !std::mem::replace(&mut fonts, true) { + crate::theme::install_fonts(ui.ctx()); + return; + } + crate::dialogs::show(app, ui.ctx()); + }, + app, + ); + h.run_steps(5); + h + } + + fn query(app: &mut VectorcraftApp) -> Value { + app.session.execute(COMMAND, &json!({})).unwrap() + } + + fn set(app: &mut VectorcraftApp, key: &str, value: Value) { + app.ui.dialog.as_mut().unwrap().fields.insert(key.into(), value); + } + + fn steps(app: &VectorcraftApp) -> usize { + app.session.active().unwrap().history.undo.len() + } + + /// Clicks the Type button named `name`. + fn pick_type(h: &mut Harness, name: &str) { + h.get_by_role_and_label(Role::Button, name).click(); + h.run_steps(3); + } + + /// Object › Graph › Type… opens the dialog on the selected graph's options, on its Graph + /// Options page, and passes kittest's check that every input has a name on each page. + #[test] + fn the_graph_menu_opens_graph_type_on_the_selected_graph() { + let mut app = app_with_graph("column"); + crate::menus::invoke(&mut app, COMMAND, json!({})); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!((d.kind.as_str(), d.str("type"), d.str("valueAxis"), d.str(PAGE)), (KIND, "column".into(), "left".into(), "options".into())); + assert!(picked(d).is_empty() && !d.bool("overrideValues") && !d.bool("rightOverrideValues")); + for key in ["legend", "pieLegend", "piePosition", "pieSort", "firstRowInFront", "firstColumnInFront", "filledLines"] { + assert!(d.fields.contains_key(key), "{key} is held for every type"); + } + set(&mut app, "valueAxis", json!("both")); + let mut h = harness(app); + let _ = h.get_by_role_and_label(Role::ComboBox, "Graph Type"); + let _ = h.get_by_role_and_label(Role::Button, "Pie Graph"); + // The right axis shows the left axis' tick values until Separate Scales gives it its own. + for (page, own_scale) in [("valueAxis", true), ("rightAxis", false)] { + set(h.state_mut(), PAGE, json!(page)); + h.run_steps(3); + h.check_accessibility(); + let overridden = h.get_by_role_and_label(Role::CheckBox, "Override Calculated Values"); + assert_eq!(overridden.accesskit_node().is_disabled(), !own_scale, "{page}"); + let _ = h.get_by_role_and_label(Role::TextInput, "Prefix:"); + } + set(h.state_mut(), PAGE, json!("categoryAxis")); + h.run_steps(3); + h.check_accessibility(); + assert!(h.get_by_role_and_label(Role::CheckBox, "Draw Tick Marks Between Labels").accesskit_node().is_disabled(), "no tick marks to place"); + // Without a selected graph the menu item opens no dialog. + let app = h.state_mut(); + app.ui.dialog = None; + app.run("select.set", json!({"ids": []})).unwrap(); + assert!(open(app).is_err()); + assert!(app.ui.dialog.is_none()); + } + + /// A Type button changes the graph's type and keeps its data. + #[test] + fn a_type_button_changes_the_graph_type_and_keeps_its_data() { + let mut app = app_with_graph("column"); + let data = app.session.execute("graph.setData", &json!({})).unwrap(); + assert_eq!(data["rows"], json!([[1.0, 2.0], [3.0, 4.0]])); + open(&mut app).unwrap(); + let mut h = harness(app); + for kind in GraphKind::ALL { + pick_type(&mut h, kind_name(kind)); + assert_eq!(h.state().ui.dialog.as_ref().unwrap().str("type"), kind.id()); + } + pick_type(&mut h, "Stacked Bar Graph"); + let app = h.state_mut(); + let before = steps(app); + crate::dialogs::confirm(app).unwrap(); + assert!(app.ui.dialog.is_none()); + assert_eq!(query(app)["type"], "stackedBar"); + assert_eq!(app.session.execute("graph.setData", &json!({})).unwrap(), data); + assert_eq!(steps(app), before + 1, "one step of history"); + } + + /// The menus list the values `graph.setType` takes, and Value Axis puts the value axis on the + /// side picked. + #[test] + fn the_menus_list_the_values_the_command_takes() { + let doc = vectorcraft_engine::find_command(COMMAND).unwrap().params; + let lists: [(&str, &[(&str, &str)]); 4] = + [("valueAxis", &SIDES), ("tickLength", &TICK_LENGTHS), ("pieLegend", &PIE_LEGENDS), ("pieSort", &PIE_SORTS)]; + for (key, options) in lists { + let values: Vec<&str> = options.iter().map(|(value, _)| *value).collect(); + assert!(doc.contains(&format!("{key}?: {}", values.join("|"))), "{key}: {values:?}"); + } + assert!(doc.contains("piePosition?: ratio|even|stacked")); + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + let mut h = harness(app); + assert!(h.get_by_role_and_label(Role::CheckBox, "Separate Scales").accesskit_node().is_disabled(), "one side: one scale"); + h.get_by_role_and_label(Role::ComboBox, "Value Axis:").click(); + h.run_steps(3); + h.get_by_label("On Both Sides").click(); + h.run_steps(3); + assert_eq!(h.state().ui.dialog.as_ref().unwrap().str("valueAxis"), "both"); + assert!(!h.get_by_role_and_label(Role::CheckBox, "Separate Scales").accesskit_node().is_disabled()); + let app = h.state_mut(); + crate::dialogs::confirm(app).unwrap(); + assert_eq!(query(app)["valueAxis"], "both"); + } + + /// The Options group shows the options of the type picked: widths for columns and bars, the + /// data point and line checkboxes for line, scatter and radar graphs, the three menus for a + /// pie graph, and none for an area graph. + #[test] + fn the_options_follow_the_type_picked() { + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + let mut h = harness(app); + let field = |h: &Harness, name: &str| h.query_by_role_and_label(Role::TextInput, name).is_some(); + let checkbox = |h: &Harness, name: &str| h.query_by_role_and_label(Role::CheckBox, name).is_some(); + let menu = |h: &Harness, name: &str| h.query_by_role_and_label(Role::ComboBox, name).is_some(); + let dimmed = |h: &Harness, name: &str| h.get_by_role_and_label(Role::CheckBox, name).accesskit_node().is_disabled(); + assert!(field(&h, "Column Width:") && field(&h, "Cluster Width:") && !checkbox(&h, "Mark Data Points") && !menu(&h, "Legend:")); + assert!(!dimmed(&h, "First Row in Front") && !dimmed(&h, "First Column in Front") && checkbox(&h, "Legend")); + pick_type(&mut h, "Bar Graph"); + assert!(field(&h, "Bar Width:") && !field(&h, "Column Width:") && field(&h, "Cluster Width:")); + assert!( + h.get_by_role_and_label(Role::ComboBox, "Value Axis:").accesskit_node().is_disabled(), + "a bar graph's value axis stays along the bottom" + ); + pick_type(&mut h, "Line Graph"); + assert!(!field(&h, "Cluster Width:") && dimmed(&h, "First Row in Front") && dimmed(&h, "First Column in Front")); + for name in ["Mark Data Points", "Connect Data Points", "Edge-to-Edge Lines", "Draw Filled Lines"] { + assert!(checkbox(&h, name) && !dimmed(&h, name), "{name}"); + } + // Draw Filled Lines is for connected data points, and Edge-to-Edge Lines for line graphs. + set(h.state_mut(), "connectPoints", json!(false)); + h.run_steps(3); + assert!(dimmed(&h, "Draw Filled Lines")); + for name in ["Scatter Graph", "Radar Graph"] { + pick_type(&mut h, name); + assert!(checkbox(&h, "Mark Data Points") && dimmed(&h, "Edge-to-Edge Lines"), "{name}"); + } + pick_type(&mut h, "Pie Graph"); + assert!(menu(&h, "Legend:") && menu(&h, "Position:") && menu(&h, "Sort:") && !checkbox(&h, "Legend") && !checkbox(&h, "Mark Data Points")); + assert!(h.get_by_role_and_label(Role::ComboBox, "Value Axis:").accesskit_node().is_disabled(), "a pie graph has no value axis"); + // Add Legend Across Top is for a legend outside the wedges. + assert!(!dimmed(&h, "Add Legend Across Top")); + set(h.state_mut(), "pieLegend", json!("wedges")); + h.run_steps(3); + assert!(dimmed(&h, "Add Legend Across Top")); + pick_type(&mut h, "Area Graph"); + assert!(!field(&h, "Column Width:") && !checkbox(&h, "Mark Data Points") && !menu(&h, "Legend:") && h.query_by_label("Options").is_none()); + } + + /// The menu at the top lists a page per axis of the type picked, and a second value axis page + /// while the value axis is on both sides. + #[test] + fn the_menu_lists_a_page_per_axis_of_the_type() { + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + let mut d = app.ui.dialog.clone().unwrap(); + let ids = |d: &Dialog| pages(d).iter().map(|(id, _)| *id).collect::>(); + let names = |d: &Dialog| pages(d).iter().map(|(_, name)| *name).collect::>(); + for kind in ["column", "stackedColumn", "bar", "stackedBar", "line", "area"] { + d.fields.insert("type".into(), json!(kind)); + assert_eq!(ids(&d), ["options", "valueAxis", "categoryAxis"], "{kind}"); + } + assert_eq!(names(&d), ["Graph Options", "Value Axis", "Category Axis"]); + for kind in ["scatter", "radar"] { + d.fields.insert("type".into(), json!(kind)); + assert_eq!(ids(&d), ["options", "valueAxis"], "{kind}"); + } + d.fields.insert("type".into(), json!("pie")); + assert_eq!(ids(&d), ["options"]); + d.fields.insert("valueAxis".into(), json!("both")); + for kind in ["column", "stackedColumn", "line", "area"] { + d.fields.insert("type".into(), json!(kind)); + assert_eq!(ids(&d), ["options", "valueAxis", "rightAxis", "categoryAxis"], "{kind}"); + assert_eq!(names(&d), ["Graph Options", "Left Axis", "Right Axis", "Category Axis"], "{kind}"); + } + d.fields.insert("type".into(), json!("scatter")); + assert_eq!(ids(&d), ["options", "valueAxis", "rightAxis"]); + // A bar or radar graph's value axis has no sides, and a pie graph has no value axis. + for (kind, pages) in + [("bar", vec!["options", "valueAxis", "categoryAxis"]), ("radar", vec!["options", "valueAxis"]), ("pie", vec!["options"])] + { + d.fields.insert("type".into(), json!(kind)); + assert_eq!(ids(&d), pages, "{kind}"); + } + // A page the type picked lacks shows Graph Options. + d.fields.insert(PAGE.into(), json!("rightAxis")); + app.ui.dialog = Some(d); + let h = harness(app); + assert!(h.query_by_role_and_label(Role::ComboBox, "Legend:").is_some()); + } + + /// Override Calculated Values starts from the tick values the axis is drawn with, OK sends + /// them, and turning it off again gives the axis its calculated values back. Left off, it + /// leaves a count the graph has alone. + #[test] + fn override_calculated_values_starts_from_the_calculated_tick_values() { + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + assert_eq!(calculated(app.ui.dialog.as_ref().unwrap(), &LEFT), (0.0, 4.0, 4)); + set(&mut app, PAGE, json!("valueAxis")); + let mut h = harness(app); + let dimmed = |h: &Harness, name: &str| h.get_by_role_and_label(Role::TextInput, name).accesskit_node().is_disabled(); + assert!(dimmed(&h, "Minimum:") && dimmed(&h, "Maximum:") && dimmed(&h, "Divisions:")); + h.get_by_role_and_label(Role::CheckBox, "Override Calculated Values").click(); + h.run_steps(3); + assert!(!dimmed(&h, "Minimum:") && !dimmed(&h, "Maximum:") && !dimmed(&h, "Divisions:")); + let app = h.state_mut(); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!((number(d, "axisMin"), number(d, "axisMax"), number(d, "ticks")), (Some(0.0), Some(4.0), Some(4.0))); + let before = steps(app); + crate::dialogs::confirm(app).unwrap(); + let q = query(app); + assert_eq!((q["axisMin"].as_f64(), q["axisMax"].as_f64(), q["ticks"].as_u64()), (Some(0.0), Some(4.0), Some(4))); + assert_eq!(steps(app), before + 1); + // It opens on, with the graph's values, and off it sends the calculated values back. + open(app).unwrap(); + assert!(app.ui.dialog.as_ref().unwrap().bool("overrideValues")); + set(app, "axisMax", json!(8.0)); + crate::dialogs::confirm(app).unwrap(); + assert_eq!(query(app)["axisMax"], 8.0); + open(app).unwrap(); + set(app, "overrideValues", json!(false)); + crate::dialogs::confirm(app).unwrap(); + let q = query(app); + assert_eq!((q["axisMin"].clone(), q["axisMax"].clone(), q["ticks"].clone()), (Value::Null, Value::Null, json!(0))); + // Left off, a count the graph has stays, whatever else OK changes. + app.run(COMMAND, json!({"ticks": 7})).unwrap(); + open(app).unwrap(); + set(app, "dropShadow", json!(true)); + crate::dialogs::confirm(app).unwrap(); + let q = query(app); + assert_eq!((q["ticks"].clone(), q["dropShadow"].clone(), q["axisMin"].clone()), (json!(7), json!(true), Value::Null)); + } + + /// An overridden value axis whose maximum is not more than its minimum is refused: the dialog + /// stays open and the graph is not changed. The right axis counts while it has a scale of its + /// own. + #[test] + fn an_overridden_axis_needs_a_maximum_above_its_minimum() { + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + for (key, value) in [("overrideValues", json!(true)), ("axisMin", json!(10)), ("axisMax", json!(10))] { + set(&mut app, key, value); + } + let before = steps(&app); + assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), Some("Maximum must be more than Minimum.")); + assert!(crate::dialogs::confirm(&mut app).is_err()); + assert!(app.ui.dialog.is_some(), "the dialog stays open"); + assert_eq!((steps(&app), query(&mut app)["axisMax"].clone()), (before, Value::Null)); + // A range too wide to divide is refused too. + set(&mut app, "axisMin", json!(-1.7e308)); + set(&mut app, "axisMax", json!(1.7e308)); + assert!(problem(app.ui.dialog.as_ref().unwrap()).is_some()); + set(&mut app, "axisMin", json!(10)); + set(&mut app, "axisMax", json!(20)); + crate::dialogs::confirm(&mut app).unwrap(); + let q = query(&mut app); + assert_eq!((q["axisMin"].as_f64(), q["axisMax"].as_f64()), (Some(10.0), Some(20.0))); + // The right axis shows the left scale until Separate Scales gives it one. + open(&mut app).unwrap(); + for (key, value) in [("rightOverrideValues", json!(true)), ("rightAxisMin", json!(5)), ("rightAxisMax", json!(1))] { + set(&mut app, key, value); + } + assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), None); + set(&mut app, "valueAxis", json!("both")); + set(&mut app, "separateScales", json!(true)); + // A scale without series on its side draws no axis of its own. + assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), None); + set(&mut app, RIGHT_SERIES, json!([1])); + assert!(problem(app.ui.dialog.as_ref().unwrap()).is_some()); + // A pie graph has no value axis to refuse. + set(&mut app, "type", json!("pie")); + assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), None); + } + + /// OK with nothing changed closes the dialog without a step of history, on every page and + /// for every type. + #[test] + fn ok_with_nothing_changed_adds_no_step_of_history() { + for kind in GraphKind::ALL { + let mut app = app_with_graph(kind.id()); + app.run(COMMAND, json!({"valueAxis": "both", "axisMin": 0, "axisMax": 10})).unwrap(); + let before = steps(&app); + open(&mut app).unwrap(); + let mut h = harness(app); + for page in ["valueAxis", "rightAxis", "categoryAxis", "options"] { + set(h.state_mut(), PAGE, json!(page)); + h.run_steps(3); + } + let app = h.state_mut(); + assert_eq!(crate::dialogs::confirm(app), Ok(Value::Null), "{kind:?}"); + assert!(app.ui.dialog.is_none()); + assert_eq!(steps(app), before, "{kind:?}"); + } + } + + /// With series picked by Group Selection, the type and the value axis go to those series: the + /// types that cannot go in the graph are dimmed, Value Axis offers one side, and the other + /// options still go to the whole graph. + #[test] + fn picked_series_take_the_type_and_the_value_axis() { + let mut app = app_with_graph("column"); + let (graph, series) = { + let st = app.session.active().unwrap(); + let graph = st.selection.objects[0]; + (graph, st.doc.node(graph).unwrap().children().unwrap().iter().find(|c| c.extras().series_index == Some(1)).unwrap().id) + }; + app.run("select.set", json!({"ids": [series.0]})).unwrap(); + open(&mut app).unwrap(); + assert_eq!(picked(app.ui.dialog.as_ref().unwrap()), [1]); + let mut h = harness(app); + for name in ["Bar Graph", "Stacked Bar Graph", "Scatter Graph", "Pie Graph", "Radar Graph"] { + assert!(h.get_by_role_and_label(Role::Button, name).accesskit_node().is_disabled(), "{name}"); + pick_type(&mut h, name); + assert_eq!(h.state().ui.dialog.as_ref().unwrap().str("type"), "column", "{name}"); + } + h.get_by_role_and_label(Role::ComboBox, "Value Axis:").click(); + h.run_steps(3); + assert!(h.query_by_label("On Both Sides").is_none(), "a series goes on one axis"); + h.get_by_label("On Right Side").click(); + h.run_steps(3); + pick_type(&mut h, "Line Graph"); + // The picked line series brings the line options beside the columns'. + assert!(h.query_by_role_and_label(Role::CheckBox, "Mark Data Points").is_some()); + assert!(h.query_by_role_and_label(Role::TextInput, "Column Width:").is_some()); + let app = h.state_mut(); + set(app, "columnWidth", json!(50.0)); + crate::dialogs::confirm(app).unwrap(); + // The series stays picked, on its own type and axis. + let q = query(app); + assert_eq!((q["type"].clone(), q["valueAxis"].clone(), q["columnWidth"].clone()), (json!("line"), json!("right"), json!(50.0))); + let whole = app.session.execute(COMMAND, &json!({"id": graph.0})).unwrap(); + assert_eq!((whole["type"].clone(), whole["valueAxis"].clone()), (json!("column"), json!("left"))); + // Series on both value axes open with no side, and OK leaves each where it is. + let both: Vec = { + let st = app.session.active().unwrap(); + st.doc.node(graph).unwrap().children().unwrap().iter().filter(|c| c.extras().series_index.is_some()).map(|c| c.id.0).collect() + }; + app.run("select.set", json!({"ids": both})).unwrap(); + open(app).unwrap(); + let d = app.ui.dialog.as_ref().unwrap(); + assert_eq!((d.fields["valueAxis"].clone(), d.fields["type"].clone()), (Value::Null, Value::Null)); + assert_eq!(series_kinds(d), [GraphKind::Column, GraphKind::Line]); + set(app, "dropShadow", json!(true)); + crate::dialogs::confirm(app).unwrap(); + let st = app.session.active().unwrap(); + let spec = st.doc.node(graph).unwrap().extras().graph.as_deref().unwrap(); + assert_eq!((spec.right_series.clone(), spec.drop_shadow), (vec![1], true)); + assert_eq!(spec.series_kinds, [None, Some(GraphKind::Line)], "each series keeps its type"); + } + + /// `ui.dialog.set` takes the page shown and refuses the fields that hold what OK acts on. + #[test] + fn the_page_is_a_control_and_the_subject_is_protected() { + let mut app = app_with_graph("line"); + open(&mut app).unwrap(); + let d = app.ui.dialog.as_ref().unwrap(); + assert!(crate::dialogs::accepts_field(d, PAGE) && crate::dialogs::accepts_field(d, "overrideValues")); + for field in + [GRAPH_ID, SERIES, GRAPH, GRAPH_AXIS, SERIES_KINDS, RIGHT_SERIES, CALCULATED, CALCULATED_FOR, OPENED, "__override", "__rightOverride"] + { + assert!(crate::dialogs::protected_field(d, field), "{field}"); + } + } + + /// OK changes the graph and the series the dialog opened on, even when the selection changed + /// while it was open. + #[test] + fn ok_changes_the_graph_the_dialog_opened_on() { + let mut app = app_with_graph("column"); + let first = app.session.active().unwrap().selection.objects[0]; + app.run("graph.create", json!({"type": "column", "x": 0, "y": 200, "width": 200, "height": 150, "csv": ",a,b\nQ1,1,2\nQ2,3,4"})).unwrap(); + let second = app.session.active().unwrap().selection.objects[0]; + app.run("select.set", json!({"ids": [first.0]})).unwrap(); + open(&mut app).unwrap(); + set(&mut app, "type", json!("line")); + app.run("select.set", json!({"ids": [second.0]})).unwrap(); + crate::dialogs::confirm(&mut app).unwrap(); + let kind = + |app: &mut VectorcraftApp, id: vectorcraft_doc::NodeId| app.session.execute(COMMAND, &json!({"id": id.0})).unwrap()["type"].clone(); + assert_eq!((kind(&mut app, first), kind(&mut app, second)), (json!("line"), json!("column"))); + // Picked series keep the type picked for them when the selection moves to the whole graph. + let series = { + let st = app.session.active().unwrap(); + st.doc.node(first).unwrap().children().unwrap().iter().find(|c| c.extras().series_index == Some(1)).unwrap().id + }; + app.run("select.set", json!({"ids": [series.0]})).unwrap(); + open(&mut app).unwrap(); + set(&mut app, "type", json!("area")); + app.run("select.set", json!({"ids": [first.0]})).unwrap(); + crate::dialogs::confirm(&mut app).unwrap(); + let st = app.session.active().unwrap(); + let spec = st.doc.node(first).unwrap().extras().graph.as_deref().unwrap(); + assert_eq!((spec.kind, spec.series_kind(0), spec.series_kind(1)), (GraphKind::Line, GraphKind::Line, GraphKind::Area)); + } + + /// Override Calculated Values starts from the tick values of the type picked in the dialog, not + /// of the type the graph had when it opened. + #[test] + fn override_starts_from_the_tick_values_of_the_type_picked() { + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + assert_eq!(calculated(app.ui.dialog.as_ref().unwrap(), &LEFT).1, 4.0); + // Stacked, Q2 reaches 3 + 4 = 7. + set(&mut app, "type", json!("stackedColumn")); + set(&mut app, "overrideValues", json!(true)); + crate::dialogs::confirm(&mut app).unwrap(); + let q = query(&mut app); + assert_eq!(q["type"], "stackedColumn"); + assert!(q["axisMax"].as_f64().is_some_and(|max| max >= 7.0), "{}", q["axisMax"]); + let st = app.session.active().unwrap(); + let spec = st.doc.node(st.selection.objects[0]).unwrap().extras().graph.as_deref().unwrap(); + // The calculated values do not depend on the override the graph now has. + let stacked = vectorcraft_engine::graph_calculated_axes(spec)[0]; + let sent = |q: &Value| (q["axisMin"].as_f64(), q["axisMax"].as_f64(), q["ticks"].as_u64()); + assert_eq!(sent(&q), (Some(stacked.0), Some(stacked.1), Some(stacked.2 as u64))); + // Turned on first, the values filled for the column graph follow the type picked after it. + let mut app = app_with_graph("column"); + open(&mut app).unwrap(); + set(&mut app, "overrideValues", json!(true)); + settle(app.ui.dialog.as_mut().unwrap()); + assert_eq!(number(app.ui.dialog.as_ref().unwrap(), "axisMax"), Some(4.0)); + set(&mut app, "type", json!("stackedColumn")); + crate::dialogs::confirm(&mut app).unwrap(); + assert_eq!(sent(&query(&mut app)), (Some(stacked.0), Some(stacked.1), Some(stacked.2 as u64))); + // Values typed in stay. + open(&mut app).unwrap(); + set(&mut app, "axisMax", json!(50.0)); + set(&mut app, "type", json!("column")); + crate::dialogs::confirm(&mut app).unwrap(); + assert_eq!(query(&mut app)["axisMax"], 50.0); + } + + /// The limits the fields keep to are the ones `graph.setType` keeps to. + #[test] + fn the_fields_keep_to_the_command_s_limits() { + let mut app = app_with_graph("column"); + let long = "x".repeat(AFFIX_CHARS + 6); + app.run(COMMAND, json!({"tickMarks": 99, "columnWidth": 5000, "clusterWidth": 0, "prefix": long, "axisMin": 0, "axisMax": 1, "ticks": 500})) + .unwrap(); + let q = query(&mut app); + assert_eq!(q["tickMarks"].as_f64(), Some(*TICK_MARKS.end())); + assert_eq!((q["columnWidth"].as_f64(), q["clusterWidth"].as_f64()), (Some(*WIDTHS.end()), Some(*WIDTHS.start()))); + assert_eq!(q["prefix"].as_str().map(str::len), Some(AFFIX_CHARS)); + assert_eq!(q["ticks"].as_f64(), Some(*DIVISIONS.end())); + } +} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 28944173dd..a335c9f424 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -1359,6 +1359,40 @@ font-technology Variable Променливи Graph Диаграма Graph Data Данни за диаграма Graph Type Тип диаграма + Graph Options Опции на диаграмата + Left Axis Лява ос + Right Axis Дясна ос + Category Axis Ос на категориите + Separate Scales Отделни скали + Add Drop Shadow Добавяне на падаща сянка + Add Legend Across Top Добавяне на легенда отгоре + First Row in Front Първият ред отпред + First Column in Front Първата колона отпред + Legend Легенда + Column Width Ширина на колоната + Bar Width Ширина на стълба + Cluster Width Ширина на групата + Mark Data Points Маркиране на точките от данни + Connect Data Points Свързване на точките от данни + Edge-to-Edge Lines Линии от край до край + Draw Filled Lines Чертане на запълнени линии + Tick Values Стойности на отметките + Override Calculated Values Замяна на изчислените стойности + Divisions Деления + Tick Marks Отметки + Tick Marks per Division Отметки на деление + Draw Tick Marks Between Labels Чертане на отметки между етикетите + Add Labels Добавяне на етикети + Maximum must be more than Minimum. Максимумът трябва да е по-голям от минимума. + Column Graph Колонна диаграма + Stacked Column Graph Колонна диаграма с натрупване + Bar Graph Стълбчеста диаграма + Stacked Bar Graph Стълбчеста диаграма с натрупване + Line Graph Линейна диаграма + Area Graph Площна диаграма + Scatter Graph Диаграма на разсейване + Pie Graph Кръгова диаграма + Radar Graph Радарна диаграма Graph Design Дизайн на диаграма Graph Marker Маркер на диаграма New Design Нов дизайн diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 01b90e5148..dbe13b1475 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -3546,6 +3546,40 @@ theme Appearance Izgled Create Graph Kreiraj grafikon Graph Data Podaci grafikona Graph Type Vrsta grafikona + Graph Options Opcije grafikona + Left Axis Lijeva osa + Right Axis Desna osa + Category Axis Osa kategorija + Separate Scales Odvojene skale + Add Drop Shadow Dodaj sjenu + Add Legend Across Top Dodaj legendu na vrh + First Row in Front Prvi red naprijed + First Column in Front Prva kolona naprijed + Legend Legenda + Column Width Širina stupca + Bar Width Širina trake + Cluster Width Širina grupe + Mark Data Points Označi tačke podataka + Connect Data Points Poveži tačke podataka + Edge-to-Edge Lines Linije od ivice do ivice + Draw Filled Lines Crtaj ispunjene linije + Tick Values Vrijednosti crtica + Override Calculated Values Zamijeni izračunate vrijednosti + Divisions Podioci + Tick Marks Crtice + Tick Marks per Division Crtica po podioku + Draw Tick Marks Between Labels Crtaj crtice između oznaka + Add Labels Dodaj oznake + Maximum must be more than Minimum. Maksimum mora biti veći od minimuma. + Column Graph Stupčasti grafikon + Stacked Column Graph Naslagani stupčasti grafikon + Bar Graph Trakasti grafikon + Stacked Bar Graph Naslagani trakasti grafikon + Line Graph Linijski grafikon + Area Graph Površinski grafikon + Scatter Graph Raspršeni grafikon + Pie Graph Tortni grafikon + Radar Graph Radarski grafikon Vector Halftone Vektorski polutonovi spot spot Text Tekst diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 4ddd1d5605..b388182f3e 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1891,6 +1891,40 @@ digits Malayalam Malaiàlam Graph Design Disseny del gràfic Graph Marker Marcador del gràfic Graph Type Tipus de gràfic + Graph Options Opcions del gràfic + Left Axis Eix esquerre + Right Axis Eix dret + Category Axis Eix de categories + Separate Scales Escales separades + Add Drop Shadow Afegeix una ombra paral·lela + Add Legend Across Top Afegeix la llegenda a la part superior + First Row in Front Primera fila al davant + First Column in Front Primera columna al davant + Legend Llegenda + Column Width Amplada de columna + Bar Width Amplada de barra + Cluster Width Amplada del grup + Mark Data Points Marca els punts de dades + Connect Data Points Connecta els punts de dades + Edge-to-Edge Lines Línies de vora a vora + Draw Filled Lines Dibuixa línies emplenades + Tick Values Valors de les marques + Override Calculated Values Substitueix els valors calculats + Divisions Divisions + Tick Marks Marques de graduació + Tick Marks per Division Marques per divisió + Draw Tick Marks Between Labels Dibuixa les marques entre les etiquetes + Add Labels Afegeix etiquetes + Maximum must be more than Minimum. El màxim ha de ser més gran que el mínim. + Column Graph Gràfic de columnes + Stacked Column Graph Gràfic de columnes apilades + Bar Graph Gràfic de barres + Stacked Bar Graph Gràfic de barres apilades + Line Graph Gràfic de línies + Area Graph Gràfic d’àrea + Scatter Graph Gràfic de dispersió + Pie Graph Gràfic de sectors + Radar Graph Gràfic de radar Graphic Gràfic Graphic Pen Ploma gràfica Graphic Pen… Ploma gràfica… diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 211982f086..96f8e70e0d 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -3600,6 +3600,40 @@ theme Appearance Motiv Create Graph Vytvořit graf Graph Data Data grafu Graph Type Typ grafu + Graph Options Možnosti grafu + Left Axis Levá osa + Right Axis Pravá osa + Category Axis Osa kategorií + Separate Scales Samostatná měřítka + Add Drop Shadow Přidat vržený stín + Add Legend Across Top Přidat legendu nahoru + First Row in Front První řádek vpředu + First Column in Front První sloupec vpředu + Legend Legenda + Column Width Šířka sloupce + Bar Width Šířka pruhu + Cluster Width Šířka skupiny + Mark Data Points Označit datové body + Connect Data Points Spojit datové body + Edge-to-Edge Lines Čáry od okraje k okraji + Draw Filled Lines Kreslit vyplněné čáry + Tick Values Hodnoty značek + Override Calculated Values Přepsat vypočítané hodnoty + Divisions Dílky + Tick Marks Značky + Tick Marks per Division Značek na dílek + Draw Tick Marks Between Labels Kreslit značky mezi popisky + Add Labels Přidat popisky + Maximum must be more than Minimum. Maximum musí být větší než minimum. + Column Graph Sloupcový graf + Stacked Column Graph Skládaný sloupcový graf + Bar Graph Pruhový graf + Stacked Bar Graph Skládaný pruhový graf + Line Graph Spojnicový graf + Area Graph Plošný graf + Scatter Graph Bodový graf + Pie Graph Výsečový graf + Radar Graph Paprskový graf Vector Halftone Vektorový polotón spot přímá Text Text diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index b3de0ae89a..428f8fbbff 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -3331,6 +3331,40 @@ theme Appearance Udseende Create Graph Opret graf Graph Data Grafdata Graph Type Graftype + Graph Options Grafindstillinger + Left Axis Venstre akse + Right Axis Højre akse + Category Axis Kategoriakse + Separate Scales Separate skalaer + Add Drop Shadow Tilføj slagskygge + Add Legend Across Top Tilføj forklaring øverst + First Row in Front Første række forrest + First Column in Front Første kolonne forrest + Legend Forklaring + Column Width Søjlebredde + Bar Width Bjælkebredde + Cluster Width Gruppebredde + Mark Data Points Markér datapunkter + Connect Data Points Forbind datapunkter + Edge-to-Edge Lines Linjer fra kant til kant + Draw Filled Lines Tegn udfyldte linjer + Tick Values Afmærkningsværdier + Override Calculated Values Tilsidesæt beregnede værdier + Divisions Inddelinger + Tick Marks Afmærkninger + Tick Marks per Division Afmærkninger pr. inddeling + Draw Tick Marks Between Labels Tegn afmærkninger mellem etiketter + Add Labels Tilføj etiketter + Maximum must be more than Minimum. Maksimum skal være større end minimum. + Column Graph Søjlediagram + Stacked Column Graph Stablet søjlediagram + Bar Graph Bjælkediagram + Stacked Bar Graph Stablet bjælkediagram + Line Graph Linjediagram + Area Graph Områdediagram + Scatter Graph Spredningsdiagram + Pie Graph Cirkeldiagram + Radar Graph Radardiagram Vector Halftone Vektorraster spot spot Text Tekst diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index d0610144ef..489bf32d94 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1404,6 +1404,40 @@ file-filter Templates Vorlagen Graph Diagramm Graph Data Diagrammdaten Graph Type Diagrammtyp + Graph Options Diagrammoptionen + Left Axis Linke Achse + Right Axis Rechte Achse + Category Axis Kategorieachse + Separate Scales Getrennte Skalen + Add Drop Shadow Schlagschatten hinzufügen + Add Legend Across Top Legende oben hinzufügen + First Row in Front Erste Zeile vorne + First Column in Front Erste Spalte vorne + Legend Legende + Column Width Säulenbreite + Bar Width Balkenbreite + Cluster Width Gruppenbreite + Mark Data Points Datenpunkte markieren + Connect Data Points Datenpunkte verbinden + Edge-to-Edge Lines Linien von Kante zu Kante + Draw Filled Lines Gefüllte Linien zeichnen + Tick Values Teilstrichwerte + Override Calculated Values Berechnete Werte überschreiben + Divisions Teilungen + Tick Marks Teilstriche + Tick Marks per Division Teilstriche pro Teilung + Draw Tick Marks Between Labels Teilstriche zwischen Beschriftungen zeichnen + Add Labels Beschriftungen hinzufügen + Maximum must be more than Minimum. Das Maximum muss größer als das Minimum sein. + Column Graph Säulendiagramm + Stacked Column Graph Gestapeltes Säulendiagramm + Bar Graph Balkendiagramm + Stacked Bar Graph Gestapeltes Balkendiagramm + Line Graph Liniendiagramm + Area Graph Flächendiagramm + Scatter Graph Streudiagramm + Pie Graph Kreisdiagramm + Radar Graph Netzdiagramm Graph Design Diagrammdesign Graph Marker Diagrammmarkierung New Design Neues Design diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index d03f8c6958..1f67f30bb3 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1334,6 +1334,40 @@ font-technology Variable Μεταβλητές Graph Γράφημα Graph Data Δεδομένα γραφήματος Graph Type Τύπος γραφήματος + Graph Options Επιλογές γραφήματος + Left Axis Αριστερός άξονας + Right Axis Δεξιός άξονας + Category Axis Άξονας κατηγοριών + Separate Scales Ξεχωριστές κλίμακες + Add Drop Shadow Προσθήκη εξωτερικής σκιάς + Add Legend Across Top Προσθήκη υπομνήματος στο επάνω μέρος + First Row in Front Πρώτη γραμμή μπροστά + First Column in Front Πρώτη στήλη μπροστά + Legend Υπόμνημα + Column Width Πλάτος στήλης + Bar Width Πλάτος ράβδου + Cluster Width Πλάτος ομάδας + Mark Data Points Σήμανση σημείων δεδομένων + Connect Data Points Σύνδεση σημείων δεδομένων + Edge-to-Edge Lines Γραμμές από άκρη σε άκρη + Draw Filled Lines Σχεδίαση γεμισμένων γραμμών + Tick Values Τιμές υποδιαιρέσεων + Override Calculated Values Αντικατάσταση υπολογισμένων τιμών + Divisions Διαιρέσεις + Tick Marks Σημάδια υποδιαίρεσης + Tick Marks per Division Σημάδια ανά διαίρεση + Draw Tick Marks Between Labels Σχεδίαση σημαδιών ανάμεσα στις ετικέτες + Add Labels Προσθήκη ετικετών + Maximum must be more than Minimum. Το μέγιστο πρέπει να είναι μεγαλύτερο από το ελάχιστο. + Column Graph Γράφημα στηλών + Stacked Column Graph Γράφημα στοιβαγμένων στηλών + Bar Graph Ραβδόγραμμα + Stacked Bar Graph Στοιβαγμένο ραβδόγραμμα + Line Graph Γραμμικό γράφημα + Area Graph Γράφημα περιοχής + Scatter Graph Διάγραμμα διασποράς + Pie Graph Κυκλικό γράφημα + Radar Graph Αραχνοειδές γράφημα Graph Design Σχεδίαση γραφήματος Graph Marker Δείκτης γραφήματος New Design Νέο σχέδιο diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 3e8bd23752..b50fa85739 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1413,6 +1413,40 @@ font-technology Variable Variables Graph Gráfico Graph Data Datos del gráfico Graph Type Tipo de gráfico + Graph Options Opciones de gráfico + Left Axis Eje izquierdo + Right Axis Eje derecho + Category Axis Eje de categorías + Separate Scales Escalas separadas + Add Drop Shadow Añadir sombra paralela + Add Legend Across Top Añadir leyenda en la parte superior + First Row in Front Primera fila delante + First Column in Front Primera columna delante + Legend Leyenda + Column Width Anchura de columna + Bar Width Anchura de barra + Cluster Width Anchura de grupo + Mark Data Points Marcar puntos de datos + Connect Data Points Conectar puntos de datos + Edge-to-Edge Lines Líneas de borde a borde + Draw Filled Lines Dibujar líneas rellenas + Tick Values Valores de marcas + Override Calculated Values Sustituir valores calculados + Divisions Divisiones + Tick Marks Marcas de graduación + Tick Marks per Division Marcas por división + Draw Tick Marks Between Labels Dibujar marcas entre etiquetas + Add Labels Añadir etiquetas + Maximum must be more than Minimum. El máximo debe ser mayor que el mínimo. + Column Graph Gráfico de columnas + Stacked Column Graph Gráfico de columnas apiladas + Bar Graph Gráfico de barras + Stacked Bar Graph Gráfico de barras apiladas + Line Graph Gráfico de líneas + Area Graph Gráfico de áreas + Scatter Graph Gráfico de dispersión + Pie Graph Gráfico circular + Radar Graph Gráfico de radar Graph Design Diseño de gráfico Graph Marker Marcador de gráfico New Design Nuevo diseño diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index d408220f47..d6cf919251 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -3538,6 +3538,40 @@ theme Appearance Ulkoasu Create Graph Luo kaavio Graph Data Kaavion tiedot Graph Type Kaavion tyyppi + Graph Options Kaavion asetukset + Left Axis Vasen akseli + Right Axis Oikea akseli + Category Axis Luokka-akseli + Separate Scales Erilliset asteikot + Add Drop Shadow Lisää pudotusvarjo + Add Legend Across Top Lisää selite ylös + First Row in Front Ensimmäinen rivi edessä + First Column in Front Ensimmäinen sarake edessä + Legend Selite + Column Width Pylvään leveys + Bar Width Palkin leveys + Cluster Width Ryhmän leveys + Mark Data Points Merkitse arvopisteet + Connect Data Points Yhdistä arvopisteet + Edge-to-Edge Lines Viivat reunasta reunaan + Draw Filled Lines Piirrä täytetyt viivat + Tick Values Asteikon arvot + Override Calculated Values Ohita lasketut arvot + Divisions Jaot + Tick Marks Asteikkomerkit + Tick Marks per Division Asteikkomerkkejä jakoa kohden + Draw Tick Marks Between Labels Piirrä asteikkomerkit nimien väliin + Add Labels Lisää nimet + Maximum must be more than Minimum. Suurimman on oltava pienintä suurempi. + Column Graph Pylväskaavio + Stacked Column Graph Pinottu pylväskaavio + Bar Graph Palkkikaavio + Stacked Bar Graph Pinottu palkkikaavio + Line Graph Viivakaavio + Area Graph Aluekaavio + Scatter Graph Hajontakaavio + Pie Graph Ympyräkaavio + Radar Graph Säteittäinen kaavio Vector Halftone Vektorirasteri spot spotti Text Teksti diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 318bbbeb44..58239c33f0 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1407,6 +1407,40 @@ font-technology Variable Variables Graph Graphe Graph Data Données du graphe Graph Type Type de graphe + Graph Options Options du graphe + Left Axis Axe gauche + Right Axis Axe droit + Category Axis Axe des catégories + Separate Scales Échelles distinctes + Add Drop Shadow Ajouter une ombre portée + Add Legend Across Top Ajouter la légende en haut + First Row in Front Première ligne au premier plan + First Column in Front Première colonne au premier plan + Legend Légende + Column Width Largeur des colonnes + Bar Width Largeur des barres + Cluster Width Largeur des groupes + Mark Data Points Marquer les points de données + Connect Data Points Relier les points de données + Edge-to-Edge Lines Lignes bord à bord + Draw Filled Lines Tracer des lignes pleines + Tick Values Valeurs des graduations + Override Calculated Values Remplacer les valeurs calculées + Divisions Divisions + Tick Marks Graduations + Tick Marks per Division Graduations par division + Draw Tick Marks Between Labels Tracer les graduations entre les étiquettes + Add Labels Ajouter des étiquettes + Maximum must be more than Minimum. Le maximum doit être supérieur au minimum. + Column Graph Graphe à colonnes + Stacked Column Graph Graphe à colonnes empilées + Bar Graph Graphe à barres + Stacked Bar Graph Graphe à barres empilées + Line Graph Graphe linéaire + Area Graph Graphe de zones + Scatter Graph Graphe de dispersion + Pie Graph Graphe à secteurs + Radar Graph Graphe radar Graph Design Conception de graphe Graph Marker Marqueur de graphe New Design Nouvelle conception diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 716d851655..6489e8b8ce 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -1533,6 +1533,40 @@ Graph Design ગ્રાફ ડિઝાઇન Graph Marker ગ્રાફ માર્કર Graph Type ગ્રાફ પ્રકાર + Graph Options ગ્રાફ વિકલ્પો + Left Axis ડાબી અક્ષ + Right Axis જમણી અક્ષ + Category Axis શ્રેણી અક્ષ + Separate Scales અલગ સ્કેલ + Add Drop Shadow ડ્રોપ શેડો ઉમેરો + Add Legend Across Top ઉપર લેજન્ડ ઉમેરો + First Row in Front પ્રથમ પંક્તિ આગળ + First Column in Front પ્રથમ કૉલમ આગળ + Legend લેજન્ડ + Column Width કૉલમ પહોળાઈ + Bar Width બાર પહોળાઈ + Cluster Width જૂથ પહોળાઈ + Mark Data Points ડેટા પોઇન્ટ ચિહ્નિત કરો + Connect Data Points ડેટા પોઇન્ટ જોડો + Edge-to-Edge Lines કિનારીથી કિનારી સુધી રેખાઓ + Draw Filled Lines ભરેલી રેખાઓ દોરો + Tick Values ટિક મૂલ્યો + Override Calculated Values ગણતરી કરેલાં મૂલ્યો બદલો + Divisions વિભાગો + Tick Marks ટિક ચિહ્નો + Tick Marks per Division વિભાગ દીઠ ટિક ચિહ્નો + Draw Tick Marks Between Labels લેબલ વચ્ચે ટિક ચિહ્નો દોરો + Add Labels લેબલ ઉમેરો + Maximum must be more than Minimum. મહત્તમ ન્યૂનતમ કરતાં વધુ હોવું જોઈએ. + Column Graph કૉલમ ગ્રાફ + Stacked Column Graph સ્ટેક્ડ કૉલમ ગ્રાફ + Bar Graph બાર ગ્રાફ + Stacked Bar Graph સ્ટેક્ડ બાર ગ્રાફ + Line Graph રેખા ગ્રાફ + Area Graph ક્ષેત્ર ગ્રાફ + Scatter Graph સ્કેટર ગ્રાફ + Pie Graph પાઇ ગ્રાફ + Radar Graph રડાર ગ્રાફ Graphic Pen… ગ્રાફિક પેન… Graphic Style ગ્રાફિક સ્ટાઇલ Graphic Style Libraries ગ્રાફિક સ્ટાઇલ લાઇબ્રેરીઓ diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 78c0a9a7eb..d3685c8b9a 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -2101,6 +2101,40 @@ antiAlias Sharp शार्प Graph Design ग्राफ़ डिजाइन Graph Marker ग्राफ़ मार्कर Graph Type ग्राफ़ टाइप + Graph Options ग्राफ़ विकल्प + Left Axis बायाँ एक्सिस + Right Axis दायाँ एक्सिस + Category Axis श्रेणी एक्सिस + Separate Scales अलग स्केल + Add Drop Shadow ड्रॉप शैडो जोड़ें + Add Legend Across Top ऊपर लेजेंड जोड़ें + First Row in Front पहली पंक्ति आगे + First Column in Front पहला कॉलम आगे + Legend लेजेंड + Column Width कॉलम चौड़ाई + Bar Width बार चौड़ाई + Cluster Width समूह चौड़ाई + Mark Data Points डेटा पॉइंट चिह्नित करें + Connect Data Points डेटा पॉइंट जोड़ें + Edge-to-Edge Lines किनारे से किनारे तक रेखाएँ + Draw Filled Lines भरी हुई रेखाएँ बनाएँ + Tick Values टिक मान + Override Calculated Values परिकलित मानों को बदलें + Divisions विभाजन + Tick Marks टिक चिह्न + Tick Marks per Division प्रति विभाजन टिक चिह्न + Draw Tick Marks Between Labels लेबलों के बीच टिक चिह्न बनाएँ + Add Labels लेबल जोड़ें + Maximum must be more than Minimum. अधिकतम, न्यूनतम से अधिक होना चाहिए। + Column Graph कॉलम ग्राफ़ + Stacked Column Graph स्टैक्ड कॉलम ग्राफ़ + Bar Graph बार ग्राफ़ + Stacked Bar Graph स्टैक्ड बार ग्राफ़ + Line Graph लाइन ग्राफ़ + Area Graph एरिया ग्राफ़ + Scatter Graph स्कैटर ग्राफ़ + Pie Graph पाई ग्राफ़ + Radar Graph रडार ग्राफ़ Graphic ग्राफिक Graphic Pen ग्राफ़िक पेन Graphic Pen… ग्राफ़िक पेन… diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 7f2f03afb2..e656bfb5a3 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -1759,6 +1759,40 @@ file-filter Templates Sablonok Graph Diagram Graph Data Diagramadatok Graph Type Diagramtípus + Graph Options Diagrambeállítások + Left Axis Bal tengely + Right Axis Jobb tengely + Category Axis Kategóriatengely + Separate Scales Külön skálák + Add Drop Shadow Vetett árnyék hozzáadása + Add Legend Across Top Jelmagyarázat felül + First Row in Front Első sor elöl + First Column in Front Első oszlop elöl + Legend Jelmagyarázat + Column Width Oszlopszélesség + Bar Width Sávszélesség + Cluster Width Csoportszélesség + Mark Data Points Adatpontok jelölése + Connect Data Points Adatpontok összekötése + Edge-to-Edge Lines Széltől szélig érő vonalak + Draw Filled Lines Kitöltött vonalak rajzolása + Tick Values Osztásértékek + Override Calculated Values Számított értékek felülírása + Divisions Osztások + Tick Marks Osztásjelek + Tick Marks per Division Osztásjelek osztásonként + Draw Tick Marks Between Labels Osztásjelek a címkék között + Add Labels Címkék hozzáadása + Maximum must be more than Minimum. A maximumnak nagyobbnak kell lennie a minimumnál. + Column Graph Oszlopdiagram + Stacked Column Graph Halmozott oszlopdiagram + Bar Graph Sávdiagram + Stacked Bar Graph Halmozott sávdiagram + Line Graph Vonaldiagram + Area Graph Területdiagram + Scatter Graph Pontdiagram + Pie Graph Kördiagram + Radar Graph Sugárdiagram Select Segments Szakaszok kijelölése Artistic Művészi Film Grain… Filmszemcse… diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index c7c6b956db..897825f1d9 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3331,6 +3331,40 @@ theme Appearance Tampilan Create Graph Buat grafik Graph Data Data grafik Graph Type Jenis grafik + Graph Options Opsi grafik + Left Axis Sumbu kiri + Right Axis Sumbu kanan + Category Axis Sumbu kategori + Separate Scales Skala terpisah + Add Drop Shadow Tambahkan bayangan jatuh + Add Legend Across Top Tambahkan legenda di atas + First Row in Front Baris pertama di depan + First Column in Front Kolom pertama di depan + Legend Legenda + Column Width Lebar kolom + Bar Width Lebar batang + Cluster Width Lebar kelompok + Mark Data Points Tandai titik data + Connect Data Points Hubungkan titik data + Edge-to-Edge Lines Garis dari tepi ke tepi + Draw Filled Lines Gambar garis terisi + Tick Values Nilai tanda skala + Override Calculated Values Timpa nilai terhitung + Divisions Pembagian + Tick Marks Tanda skala + Tick Marks per Division Tanda skala per pembagian + Draw Tick Marks Between Labels Gambar tanda skala di antara label + Add Labels Tambahkan label + Maximum must be more than Minimum. Maksimum harus lebih besar dari minimum. + Column Graph Grafik kolom + Stacked Column Graph Grafik kolom bertumpuk + Bar Graph Grafik batang + Stacked Bar Graph Grafik batang bertumpuk + Line Graph Grafik garis + Area Graph Grafik area + Scatter Graph Grafik sebar + Pie Graph Grafik pai + Radar Graph Grafik radar Vector Halftone Halftone vektor spot spot Text Teks diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index f832a5baf3..83a454af1b 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -1434,6 +1434,40 @@ file-filter Templates Modelli Graph Grafico Graph Data Dati grafico Graph Type Tipo di grafico + Graph Options Opzioni grafico + Left Axis Asse sinistro + Right Axis Asse destro + Category Axis Asse delle categorie + Separate Scales Scale separate + Add Drop Shadow Aggiungi ombra esterna + Add Legend Across Top Aggiungi legenda in alto + First Row in Front Prima riga in primo piano + First Column in Front Prima colonna in primo piano + Legend Legenda + Column Width Larghezza colonne + Bar Width Larghezza barre + Cluster Width Larghezza gruppi + Mark Data Points Contrassegna punti dati + Connect Data Points Collega punti dati + Edge-to-Edge Lines Linee da bordo a bordo + Draw Filled Lines Disegna linee piene + Tick Values Valori delle tacche + Override Calculated Values Sostituisci valori calcolati + Divisions Divisioni + Tick Marks Tacche + Tick Marks per Division Tacche per divisione + Draw Tick Marks Between Labels Disegna tacche tra le etichette + Add Labels Aggiungi etichette + Maximum must be more than Minimum. Il massimo deve essere maggiore del minimo. + Column Graph Grafico a colonne + Stacked Column Graph Grafico a colonne in pila + Bar Graph Grafico a barre + Stacked Bar Graph Grafico a barre in pila + Line Graph Grafico a linee + Area Graph Grafico ad area + Scatter Graph Grafico a dispersione + Pie Graph Grafico a torta + Radar Graph Grafico radar Graph Design Design del grafico Graph Marker Indicatore del grafico New Design Nuovo design diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 3abb388f49..aa79ddaf31 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -3836,6 +3836,40 @@ file-filter Templates テンプレート Gradient (. or Shift+.) グラデーション (. または Shift+.) Graph Data グラフデータ Graph Type グラフの種類 + Graph Options グラフオプション + Left Axis 左軸 + Right Axis 右軸 + Category Axis 項目軸 + Separate Scales 目盛りを別にする + Add Drop Shadow ドロップシャドウを追加 + Add Legend Across Top 凡例を上に表示 + First Row in Front 最初の行を前面に + First Column in Front 最初の列を前面に + Legend 凡例 + Column Width 棒の幅 + Bar Width 横棒の幅 + Cluster Width グループの幅 + Mark Data Points データポイントにマーカーを表示 + Connect Data Points データポイントを線でつなぐ + Edge-to-Edge Lines 端から端までの線 + Draw Filled Lines 線を塗りつぶして描く + Tick Values 目盛りの値 + Override Calculated Values 計算値を上書き + Divisions 分割数 + Tick Marks 目盛り + Tick Marks per Division 分割ごとの目盛り + Draw Tick Marks Between Labels ラベルの間に目盛りを描く + Add Labels ラベルを追加 + Maximum must be more than Minimum. 最大値は最小値より大きくしてください。 + Column Graph 棒グラフ + Stacked Column Graph 積み上げ棒グラフ + Bar Graph 横向き棒グラフ + Stacked Bar Graph 横向き積み上げ棒グラフ + Line Graph 折れ線グラフ + Area Graph 面グラフ + Scatter Graph 散布図 + Pie Graph 円グラフ + Radar Graph レーダーチャート Graph Design グラフのデザイン Graph Marker グラフのマーカー New Design 新規デザイン diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 55f726dc38..8d68d5db9f 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -3177,6 +3177,40 @@ theme Appearance იერსახე Create Graph გრაფიკის შექმნა Graph Data გრაფიკის მონაცემები Graph Type გრაფიკის ტიპი + Graph Options გრაფიკის პარამეტრები + Left Axis მარცხენა ღერძი + Right Axis მარჯვენა ღერძი + Category Axis კატეგორიების ღერძი + Separate Scales ცალკე სკალები + Add Drop Shadow ჩრდილის დამატება + Add Legend Across Top ლეგენდის დამატება ზემოთ + First Row in Front პირველი მწკრივი წინ + First Column in Front პირველი სვეტი წინ + Legend ლეგენდა + Column Width სვეტის სიგანე + Bar Width ზოლის სიგანე + Cluster Width ჯგუფის სიგანე + Mark Data Points მონაცემთა წერტილების მონიშვნა + Connect Data Points მონაცემთა წერტილების შეერთება + Edge-to-Edge Lines ხაზები კიდიდან კიდემდე + Draw Filled Lines შევსებული ხაზების დახატვა + Tick Values დანაყოფების მნიშვნელობები + Override Calculated Values გამოთვლილი მნიშვნელობების შეცვლა + Divisions დანაყოფები + Tick Marks დანაყოფის ნიშნები + Tick Marks per Division ნიშნები თითო დანაყოფზე + Draw Tick Marks Between Labels ნიშნების დახატვა წარწერებს შორის + Add Labels წარწერების დამატება + Maximum must be more than Minimum. მაქსიმუმი მინიმუმზე მეტი უნდა იყოს. + Column Graph სვეტოვანი გრაფიკი + Stacked Column Graph დაწყობილი სვეტოვანი გრაფიკი + Bar Graph ზოლოვანი გრაფიკი + Stacked Bar Graph დაწყობილი ზოლოვანი გრაფიკი + Line Graph ხაზოვანი გრაფიკი + Area Graph არეების გრაფიკი + Scatter Graph გაფანტული გრაფიკი + Pie Graph წრიული გრაფიკი + Radar Graph რადარული გრაფიკი Vector Halftone ვექტორული ნახევარტონი spot სპოტ Text ტექსტი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index abe2b4bc28..6a10e0bc69 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -3824,6 +3824,40 @@ file-filter Templates 템플릿 Gradient (. or Shift+.) 그레이디언트 (. 또는 Shift+.) Graph Data 그래프 데이터 Graph Type 그래프 유형 + Graph Options 그래프 옵션 + Left Axis 왼쪽 축 + Right Axis 오른쪽 축 + Category Axis 범주 축 + Separate Scales 별도 눈금 + Add Drop Shadow 드롭 섀도 추가 + Add Legend Across Top 위쪽에 범례 추가 + First Row in Front 첫 행을 앞에 + First Column in Front 첫 열을 앞에 + Legend 범례 + Column Width 세로 막대 폭 + Bar Width 가로 막대 폭 + Cluster Width 묶음 폭 + Mark Data Points 데이터 요소 표시 + Connect Data Points 데이터 요소 연결 + Edge-to-Edge Lines 가장자리 간 선 + Draw Filled Lines 채워진 선 그리기 + Tick Values 눈금 값 + Override Calculated Values 계산된 값 재정의 + Divisions 구간 + Tick Marks 눈금 표시 + Tick Marks per Division 구간당 눈금 표시 + Draw Tick Marks Between Labels 레이블 사이에 눈금 표시 그리기 + Add Labels 레이블 추가 + Maximum must be more than Minimum. 최대값은 최소값보다 커야 합니다. + Column Graph 세로 막대 그래프 + Stacked Column Graph 누적 세로 막대 그래프 + Bar Graph 가로 막대 그래프 + Stacked Bar Graph 누적 가로 막대 그래프 + Line Graph 선 그래프 + Area Graph 영역 그래프 + Scatter Graph 분산형 그래프 + Pie Graph 원형 그래프 + Radar Graph 방사형 그래프 Graph Design 그래프 디자인 Graph Marker 그래프 마커 New Design 새 디자인 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index ed281382a4..468b22ec1b 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -3849,6 +3849,40 @@ theme Appearance Vormgeving Create Graph Diagram maken Graph Data Diagramgegevens Graph Type Diagramtype + Graph Options Diagramopties + Left Axis Linkeras + Right Axis Rechteras + Category Axis Categorie-as + Separate Scales Aparte schalen + Add Drop Shadow Slagschaduw toevoegen + Add Legend Across Top Legenda bovenaan toevoegen + First Row in Front Eerste rij vooraan + First Column in Front Eerste kolom vooraan + Legend Legenda + Column Width Kolombreedte + Bar Width Staafbreedte + Cluster Width Groepbreedte + Mark Data Points Gegevenspunten markeren + Connect Data Points Gegevenspunten verbinden + Edge-to-Edge Lines Lijnen van rand tot rand + Draw Filled Lines Gevulde lijnen tekenen + Tick Values Maatstreepwaarden + Override Calculated Values Berekende waarden negeren + Divisions Verdelingen + Tick Marks Maatstreepjes + Tick Marks per Division Maatstreepjes per verdeling + Draw Tick Marks Between Labels Maatstreepjes tussen labels tekenen + Add Labels Labels toevoegen + Maximum must be more than Minimum. Het maximum moet groter zijn dan het minimum. + Column Graph Kolomdiagram + Stacked Column Graph Gestapeld kolomdiagram + Bar Graph Staafdiagram + Stacked Bar Graph Gestapeld staafdiagram + Line Graph Lijndiagram + Area Graph Vlakdiagram + Scatter Graph Spreidingsdiagram + Pie Graph Cirkeldiagram + Radar Graph Radardiagram Vector Halftone Vectorhalftoon spot spot Text Tekst diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 08e96e6a35..421dc8329f 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3479,6 +3479,40 @@ theme Appearance Wygląd Create Graph Utwórz wykres Graph Data Dane wykresu Graph Type Typ wykresu + Graph Options Opcje wykresu + Left Axis Lewa oś + Right Axis Prawa oś + Category Axis Oś kategorii + Separate Scales Oddzielne skale + Add Drop Shadow Dodaj cień + Add Legend Across Top Dodaj legendę u góry + First Row in Front Pierwszy wiersz z przodu + First Column in Front Pierwsza kolumna z przodu + Legend Legenda + Column Width Szerokość kolumny + Bar Width Szerokość słupka + Cluster Width Szerokość grupy + Mark Data Points Oznacz punkty danych + Connect Data Points Połącz punkty danych + Edge-to-Edge Lines Linie od krawędzi do krawędzi + Draw Filled Lines Rysuj wypełnione linie + Tick Values Wartości podziałki + Override Calculated Values Zastąp obliczone wartości + Divisions Podziały + Tick Marks Znaczniki podziałki + Tick Marks per Division Znaczniki na podział + Draw Tick Marks Between Labels Rysuj znaczniki między etykietami + Add Labels Dodaj etykiety + Maximum must be more than Minimum. Maksimum musi być większe niż minimum. + Column Graph Wykres kolumnowy + Stacked Column Graph Skumulowany wykres kolumnowy + Bar Graph Wykres słupkowy + Stacked Bar Graph Skumulowany wykres słupkowy + Line Graph Wykres liniowy + Area Graph Wykres warstwowy + Scatter Graph Wykres punktowy + Pie Graph Wykres kołowy + Radar Graph Wykres radarowy Vector Halftone Półton wektorowy spot dodatkowy Text Tekst diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 79c4d9dc8e..9b537c9a19 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4943,6 +4943,40 @@ axis Both Ambos Gradient (. or Shift+.) Gradiente (. ou Shift+.) Graph Data Dados do Gráfico Graph Type Tipo de Gráfico + Graph Options Opções do Gráfico + Left Axis Eixo Esquerdo + Right Axis Eixo Direito + Category Axis Eixo de Categorias + Separate Scales Escalas Separadas + Add Drop Shadow Adicionar Sombra Projetada + Add Legend Across Top Adicionar Legenda na Parte Superior + First Row in Front Primeira Linha na Frente + First Column in Front Primeira Coluna na Frente + Legend Legenda + Column Width Largura da Coluna + Bar Width Largura da Barra + Cluster Width Largura do Grupo + Mark Data Points Marcar Pontos de Dados + Connect Data Points Conectar Pontos de Dados + Edge-to-Edge Lines Linhas de Borda a Borda + Draw Filled Lines Desenhar Linhas Preenchidas + Tick Values Valores das Marcas + Override Calculated Values Substituir Valores Calculados + Divisions Divisões + Tick Marks Marcas de Escala + Tick Marks per Division Marcas por Divisão + Draw Tick Marks Between Labels Desenhar Marcas entre Rótulos + Add Labels Adicionar Rótulos + Maximum must be more than Minimum. O máximo deve ser maior que o mínimo. + Column Graph Gráfico de Colunas + Stacked Column Graph Gráfico de Colunas Empilhadas + Bar Graph Gráfico de Barras + Stacked Bar Graph Gráfico de Barras Empilhadas + Line Graph Gráfico de Linhas + Area Graph Gráfico de Áreas + Scatter Graph Gráfico de Dispersão + Pie Graph Gráfico de Pizza + Radar Graph Gráfico de Radar New Design Novo Design Delete Design Excluir Design Paste Design Colar Design diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 9f608618e7..69c377b12d 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -1423,6 +1423,40 @@ file-filter Templates Шаблоны Graph Диаграмма Graph Data Данные диаграммы Graph Type Тип диаграммы + Graph Options Параметры диаграммы + Left Axis Левая ось + Right Axis Правая ось + Category Axis Ось категорий + Separate Scales Раздельные шкалы + Add Drop Shadow Добавить тень + Add Legend Across Top Добавить легенду сверху + First Row in Front Первая строка спереди + First Column in Front Первый столбец спереди + Legend Легенда + Column Width Ширина столбца + Bar Width Ширина полосы + Cluster Width Ширина группы + Mark Data Points Отмечать точки данных + Connect Data Points Соединять точки данных + Edge-to-Edge Lines Линии от края до края + Draw Filled Lines Рисовать заполненные линии + Tick Values Значения делений + Override Calculated Values Заменить вычисленные значения + Divisions Деления + Tick Marks Метки делений + Tick Marks per Division Меток на деление + Draw Tick Marks Between Labels Рисовать метки между подписями + Add Labels Добавить подписи + Maximum must be more than Minimum. Максимум должен быть больше минимума. + Column Graph Столбчатая диаграмма + Stacked Column Graph Столбчатая диаграмма с накоплением + Bar Graph Линейчатая диаграмма + Stacked Bar Graph Линейчатая диаграмма с накоплением + Line Graph График + Area Graph Диаграмма с областями + Scatter Graph Точечная диаграмма + Pie Graph Круговая диаграмма + Radar Graph Лепестковая диаграмма Graph Design Дизайн диаграммы Graph Marker Маркер диаграммы New Design Новый дизайн diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 6156ca23d5..92837a92b6 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -1372,6 +1372,40 @@ font-technology Variable Variabla Graph Diagram Graph Data Diagramdata Graph Type Diagramtyp + Graph Options Diagramalternativ + Left Axis Vänster axel + Right Axis Höger axel + Category Axis Kategoriaxel + Separate Scales Separata skalor + Add Drop Shadow Lägg till slagskugga + Add Legend Across Top Lägg till förklaring överst + First Row in Front Första raden längst fram + First Column in Front Första kolumnen längst fram + Legend Förklaring + Column Width Stapelbredd + Bar Width Liggande stapelbredd + Cluster Width Gruppbredd + Mark Data Points Markera datapunkter + Connect Data Points Förbind datapunkter + Edge-to-Edge Lines Linjer från kant till kant + Draw Filled Lines Rita fyllda linjer + Tick Values Skalstrecksvärden + Override Calculated Values Åsidosätt beräknade värden + Divisions Indelningar + Tick Marks Skalstreck + Tick Marks per Division Skalstreck per indelning + Draw Tick Marks Between Labels Rita skalstreck mellan etiketter + Add Labels Lägg till etiketter + Maximum must be more than Minimum. Maximum måste vara större än minimum. + Column Graph Stapeldiagram + Stacked Column Graph Staplat stapeldiagram + Bar Graph Liggande stapeldiagram + Stacked Bar Graph Staplat liggande stapeldiagram + Line Graph Linjediagram + Area Graph Ytdiagram + Scatter Graph Punktdiagram + Pie Graph Cirkeldiagram + Radar Graph Polärdiagram Graph Design Diagramdesign Graph Marker Diagrammarkör New Design Ny design diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 7120d44707..a3104e828f 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1346,6 +1346,40 @@ font-technology Variable Değişken Graph Grafik Graph Data Grafik Verileri Graph Type Grafik Türü + Graph Options Grafik Seçenekleri + Left Axis Sol Eksen + Right Axis Sağ Eksen + Category Axis Kategori Ekseni + Separate Scales Ayrı Ölçekler + Add Drop Shadow Alt Gölge Ekle + Add Legend Across Top Göstergeyi Üste Ekle + First Row in Front İlk Satır Önde + First Column in Front İlk Sütun Önde + Legend Gösterge + Column Width Sütun Genişliği + Bar Width Çubuk Genişliği + Cluster Width Küme Genişliği + Mark Data Points Veri Noktalarını İşaretle + Connect Data Points Veri Noktalarını Bağla + Edge-to-Edge Lines Kenardan Kenara Çizgiler + Draw Filled Lines Dolgulu Çizgiler Çiz + Tick Values Onay İşareti Değerleri + Override Calculated Values Hesaplanan Değerleri Geçersiz Kıl + Divisions Bölümler + Tick Marks Ölçek İşaretleri + Tick Marks per Division Bölüm Başına Ölçek İşareti + Draw Tick Marks Between Labels Etiketler Arasına Ölçek İşaretleri Çiz + Add Labels Etiket Ekle + Maximum must be more than Minimum. En çok, en azdan büyük olmalıdır. + Column Graph Sütun Grafik + Stacked Column Graph Yığılmış Sütun Grafik + Bar Graph Çubuk Grafik + Stacked Bar Graph Yığılmış Çubuk Grafik + Line Graph Çizgi Grafik + Area Graph Alan Grafik + Scatter Graph Dağılım Grafik + Pie Graph Pasta Grafik + Radar Graph Radar Grafik Graph Design Grafik Tasarımı Graph Marker Grafik İşaretleyici New Design Yeni Tasarım diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 84f296b0a6..521149139c 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -1428,6 +1428,40 @@ file-filter Templates Шаблони Graph Діаграма Graph Data Дані діаграми Graph Type Тип діаграми + Graph Options Параметри діаграми + Left Axis Ліва вісь + Right Axis Права вісь + Category Axis Вісь категорій + Separate Scales Окремі шкали + Add Drop Shadow Додати тінь + Add Legend Across Top Додати легенду вгорі + First Row in Front Перший рядок попереду + First Column in Front Перший стовпець попереду + Legend Легенда + Column Width Ширина стовпця + Bar Width Ширина смуги + Cluster Width Ширина групи + Mark Data Points Позначати точки даних + Connect Data Points З'єднувати точки даних + Edge-to-Edge Lines Лінії від краю до краю + Draw Filled Lines Малювати заповнені лінії + Tick Values Значення поділок + Override Calculated Values Замінити обчислені значення + Divisions Поділки + Tick Marks Позначки поділок + Tick Marks per Division Позначок на поділку + Draw Tick Marks Between Labels Малювати позначки між підписами + Add Labels Додати підписи + Maximum must be more than Minimum. Максимум має бути більшим за мінімум. + Column Graph Стовпчикова діаграма + Stacked Column Graph Стовпчикова діаграма з накопиченням + Bar Graph Лінійчата діаграма + Stacked Bar Graph Лінійчата діаграма з накопиченням + Line Graph Графік + Area Graph Діаграма з областями + Scatter Graph Точкова діаграма + Pie Graph Кругова діаграма + Radar Graph Пелюсткова діаграма Graph Design Дизайн діаграми Graph Marker Маркер діаграми New Design Новий дизайн diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index e8b9e5758f..39409effc1 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -1679,6 +1679,40 @@ file-filter Templates Mẫu Chop Design Cắt thiết kế Scale Design Co giãn thiết kế Graph Type Loại biểu đồ + Graph Options Tùy chọn biểu đồ + Left Axis Trục trái + Right Axis Trục phải + Category Axis Trục danh mục + Separate Scales Thang đo riêng + Add Drop Shadow Thêm đổ bóng + Add Legend Across Top Thêm chú giải ở trên cùng + First Row in Front Hàng đầu tiên ở trước + First Column in Front Cột đầu tiên ở trước + Legend Chú giải + Column Width Độ rộng cột + Bar Width Độ rộng thanh + Cluster Width Độ rộng nhóm + Mark Data Points Đánh dấu điểm dữ liệu + Connect Data Points Nối các điểm dữ liệu + Edge-to-Edge Lines Đường từ mép đến mép + Draw Filled Lines Vẽ đường tô đầy + Tick Values Giá trị vạch chia + Override Calculated Values Ghi đè giá trị đã tính + Divisions Số khoảng chia + Tick Marks Vạch chia + Tick Marks per Division Vạch chia mỗi khoảng + Draw Tick Marks Between Labels Vẽ vạch chia giữa các nhãn + Add Labels Thêm nhãn + Maximum must be more than Minimum. Giá trị tối đa phải lớn hơn giá trị tối thiểu. + Column Graph Biểu đồ cột + Stacked Column Graph Biểu đồ cột chồng + Bar Graph Biểu đồ thanh + Stacked Bar Graph Biểu đồ thanh chồng + Line Graph Biểu đồ đường + Area Graph Biểu đồ vùng + Scatter Graph Biểu đồ phân tán + Pie Graph Biểu đồ tròn + Radar Graph Biểu đồ radar Graphic Đồ họa Graphic Style Kiểu đồ họa Graphic Style Libraries Thư viện kiểu đồ họa diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 719968086f..29f2b424eb 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -1364,6 +1364,40 @@ file-filter Templates 模板 Graph 图表 Graph Data 图表数据 Graph Type 图表类型 + Graph Options 图表选项 + Left Axis 左轴 + Right Axis 右轴 + Category Axis 类别轴 + Separate Scales 分开刻度 + Add Drop Shadow 添加投影 + Add Legend Across Top 在顶部添加图例 + First Row in Front 第一行在前 + First Column in Front 第一列在前 + Legend 图例 + Column Width 列宽 + Bar Width 条形宽度 + Cluster Width 簇宽度 + Mark Data Points 标记数据点 + Connect Data Points 连接数据点 + Edge-to-Edge Lines 边到边线条 + Draw Filled Lines 绘制填充线 + Tick Values 刻度值 + Override Calculated Values 覆盖计算值 + Divisions 刻度数 + Tick Marks 刻度线 + Tick Marks per Division 每个刻度的刻度线数 + Draw Tick Marks Between Labels 在标签之间绘制刻度线 + Add Labels 添加标签 + Maximum must be more than Minimum. 最大值必须大于最小值。 + Column Graph 柱形图 + Stacked Column Graph 堆积柱形图 + Bar Graph 条形图 + Stacked Bar Graph 堆积条形图 + Line Graph 折线图 + Area Graph 面积图 + Scatter Graph 散点图 + Pie Graph 饼图 + Radar Graph 雷达图 Graph Design 图表设计 Graph Marker 图表标记 New Design 新建设计 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 121a8b8c02..018e2ff788 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -1399,6 +1399,40 @@ file-filter Templates 範本 Graph 圖表 Graph Data 圖表資料 Graph Type 圖表類型 + Graph Options 圖表選項 + Left Axis 左軸 + Right Axis 右軸 + Category Axis 類別軸 + Separate Scales 分開刻度 + Add Drop Shadow 加入投影 + Add Legend Across Top 在頂端加入圖例 + First Row in Front 第一列在前 + First Column in Front 第一欄在前 + Legend 圖例 + Column Width 直條寬度 + Bar Width 橫條寬度 + Cluster Width 群組寬度 + Mark Data Points 標示資料點 + Connect Data Points 連接資料點 + Edge-to-Edge Lines 邊到邊線條 + Draw Filled Lines 繪製填色線條 + Tick Values 刻度值 + Override Calculated Values 覆寫計算值 + Divisions 刻度數 + Tick Marks 刻度記號 + Tick Marks per Division 每個刻度的記號數 + Draw Tick Marks Between Labels 在標籤之間繪製刻度記號 + Add Labels 加入標籤 + Maximum must be more than Minimum. 最大值必須大於最小值。 + Column Graph 直條圖 + Stacked Column Graph 堆疊直條圖 + Bar Graph 橫條圖 + Stacked Bar Graph 堆疊橫條圖 + Line Graph 折線圖 + Area Graph 區域圖 + Scatter Graph 散佈圖 + Pie Graph 圓形圖 + Radar Graph 雷達圖 Graph Design 圖表設計 Graph Marker 圖表標記 New Design 新增設計 diff --git a/crates/ui-egui/src/menus/invoke.rs b/crates/ui-egui/src/menus/invoke.rs index 3aab5e1e44..3f89c73020 100644 --- a/crates/ui-egui/src/menus/invoke.rs +++ b/crates/ui-egui/src/menus/invoke.rs @@ -131,9 +131,7 @@ pub(crate) fn graph_dialog(app: &mut VectorcraftApp, id: &str) -> Result Date: Sat, 14 Nov 2026 10:48:08 -0800 Subject: [PATCH 07/52] Graphs: a value axis side without its own scale shows the scale drawn on it With Separate Scales off, or with no series on a side, the axis page shows the tick values of the scale the graph draws on that side instead of the bounds kept for it, and its Override Calculated Values is dimmed. --- crates/ui-egui/src/dialogs/graph_type.rs | 41 ++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs/graph_type.rs b/crates/ui-egui/src/dialogs/graph_type.rs index 14bc371e74..7563a1f42c 100644 --- a/crates/ui-egui/src/dialogs/graph_type.rs +++ b/crates/ui-egui/src/dialogs/graph_type.rs @@ -656,9 +656,22 @@ fn value_page(ui: &mut egui::Ui, d: &mut Dialog, right: bool) { // Without Separate Scales the right axis shows the left axis' tick values, and with it a side // without series shows the other side's. let own_scale = scale_used(d, right); - check(ui, d, scale.overridden, tl!("Override Calculated Values"), own_scale); + // A side without a scale of its own shows the tick values of the scale drawn on it. + let drawn = if own_scale { + scale + } else if right { + &LEFT + } else { + &RIGHT + }; + check(ui, d, drawn.overridden, tl!("Override Calculated Values"), own_scale); ui.add_enabled_ui(own_scale && d.bool(scale.overridden), |ui| { - let ((lo, hi), count) = (bounds(d, scale), divisions(d, scale)); + let ((lo, hi), count) = if own_scale || d.bool(drawn.overridden) { + (bounds(d, drawn), divisions(d, drawn)) + } else { + let (lo, hi, count) = calculated(d, drawn); + ((lo, hi), count) + }; for (key, label, shown) in [(scale.min, tl!("Minimum:"), lo), (scale.max, tl!("Maximum:"), hi)] { widgets::label_row(ui, label, LABEL_W, |ui| { if let Some(v) = widgets::plain_field(ui, ("graph-type", key), shown, "", 4, NUMBER_W) { @@ -1230,6 +1243,30 @@ mod tests { } } + /// A value axis side without a scale of its own shows the tick values of the scale drawn on it, + /// not bounds kept for it. + #[test] + fn a_side_without_its_own_scale_shows_the_scale_drawn_on_it() { + let mut app = app_with_graph("column"); + app.run(COMMAND, json!({"valueAxis": "both", "rightAxisMin": 100, "rightAxisMax": 200})).unwrap(); + open(&mut app).unwrap(); + assert!(app.ui.dialog.as_ref().unwrap().bool("rightOverrideValues")); + set(&mut app, PAGE, json!("rightAxis")); + let mut h = harness(app); + let shown = |h: &Harness, name: &str| { + let node = h.get_by_role_and_label(Role::TextInput, name); + node.accesskit_node().value().as_deref().and_then(|v| v.trim().parse::().ok()) + }; + assert_eq!((shown(&h, "Minimum:"), shown(&h, "Maximum:")), (Some(0.0), Some(4.0)), "the left scale, calculated"); + let overridden = h.get_by_role_and_label(Role::CheckBox, "Override Calculated Values"); + assert!(overridden.accesskit_node().is_disabled()); + // With Separate Scales and a series on the right axis, the side shows its own bounds. + set(h.state_mut(), "separateScales", json!(true)); + set(h.state_mut(), RIGHT_SERIES, json!([1])); + h.run_steps(3); + assert_eq!((shown(&h, "Minimum:"), shown(&h, "Maximum:")), (Some(100.0), Some(200.0))); + } + /// OK changes the graph and the series the dialog opened on, even when the selection changed /// while it was open. #[test] From 5ab24e23bf4c85da69f27347e7f2db62d4f56ef4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 10:56:48 -0800 Subject: [PATCH 08/52] Graphs: an axis value that is not a number reaches graph.setType from Graph Type Override Calculated Values fills only the axis values that are missing, so a value that is not a number is sent as it is and the command refuses it instead of the dialog putting a calculated value in its place. The right axis page without a scale of its own is described in docs/mcp.md. --- crates/ui-egui/src/dialogs/graph_type.rs | 21 +++++++++++++++++++-- docs/mcp.md | 6 ++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/dialogs/graph_type.rs b/crates/ui-egui/src/dialogs/graph_type.rs index 7563a1f42c..107b98357f 100644 --- a/crates/ui-egui/src/dialogs/graph_type.rs +++ b/crates/ui-egui/src/dialogs/graph_type.rs @@ -412,12 +412,14 @@ fn settle(d: &mut Dialog) { continue; } let ((lo, hi), count) = (bounds(d, axis), divisions(d, axis)); + // A value that is not a number stays, and `graph.setType` refuses it. + let missing = |d: &Dialog, key: &str| d.fields.get(key).is_none_or(Value::is_null); for (key, value) in [(axis.min, json!(lo)), (axis.max, json!(hi))] { - if number(d, key).is_none() { + if missing(d, key) { d.fields.insert(key.into(), value); } } - if number(d, axis.ticks).is_none_or(|n| n < 1.0) { + if missing(d, axis.ticks) || number(d, axis.ticks).is_some_and(|n| n < 1.0) { d.fields.insert(axis.ticks.into(), json!(count)); } } @@ -1148,6 +1150,21 @@ mod tests { assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), None); set(&mut app, RIGHT_SERIES, json!([1])); assert!(problem(app.ui.dialog.as_ref().unwrap()).is_some()); + // A value that is not a number is not replaced by a calculated one: the command refuses it. + open(&mut app).unwrap(); + set(&mut app, "axisMax", json!("ten")); + settle(app.ui.dialog.as_mut().unwrap()); + assert_eq!(app.ui.dialog.as_ref().unwrap().fields["axisMax"], "ten"); + let before = steps(&app); + assert!(crate::dialogs::confirm(&mut app).is_err()); + assert_eq!((steps(&app), query(&mut app)["axisMax"].as_f64()), (before, Some(20.0))); + open(&mut app).unwrap(); + for (key, value) in [("rightOverrideValues", json!(true)), ("rightAxisMin", json!(5)), ("rightAxisMax", json!(1))] { + set(&mut app, key, value); + } + set(&mut app, "valueAxis", json!("both")); + set(&mut app, "separateScales", json!(true)); + set(&mut app, RIGHT_SERIES, json!([1])); // A pie graph has no value axis to refuse. set(&mut app, "type", json!("pie")); assert_eq!(problem(app.ui.dialog.as_ref().unwrap()), None); diff --git a/docs/mcp.md b/docs/mcp.md index f241010b04..f9c901f2da 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -10144,8 +10144,10 @@ the whole graph, as the command applies them; `type` or `valueAxis` is `null` wh OK then leaves each series as it is. OK runs `graph.setType` with the fields: `legend` for every type but pie, and the three pie options for a pie graph. When the selection changed while the dialog was open, it also sends `id`, and `seriesIndexes` while series are picked and a `type` or `valueAxis` goes to them, so it changes the graph and the series -the dialog opened on. With Separate Scales, a value axis side that no series is on draws the other side's scale, and -its Override Calculated Values is dimmed. With nothing changed it closes without a step of history. An overridden value +the dialog opened on. A value axis side without a scale of its own (the right side without Separate Scales, or with +Separate Scales a side that no series is on) shows the tick values of the scale drawn on it, and its Override Calculated +Values is dimmed. A value of `axisMin`, `axisMax` or `ticks` (or of the right axis' three) that is not a number is sent +as it is, and `graph.setType` refuses it. With nothing changed it closes without a step of history. An overridden value axis whose maximum is not more than its minimum is the error "Maximum must be more than Minimum." and the dialog stays open. The types the dialog dims for picked series (those that cannot go in the graph), the options it dims for a type and the pages it lists are VectorCraft's own rules. From af64492f1c660cc8c1ab935878f19b87a9ed13e2 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Sun, 15 Nov 2026 01:41:41 +0530 Subject: [PATCH 09/52] Graphic Styles: built-in Neon & Glow graphic style library --- ROADMAP.md | 3 +- crates/doc/src/style_libs.rs | 71 +++++++++++++++++++++++++++++ crates/engine/src/tests/stylelib.rs | 54 ++++++++++++++++++++++ docs/gaps.md | 14 +++--- docs/target-app-parity.md | 7 +-- 5 files changed, 139 insertions(+), 10 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index dabed3eb94..177e71c446 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ **Stage: alpha** · next: beta, ~13 points (ready for real work ~62% → ~75%, and reliable `.ai` exchange) and ~170–270 h away -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-10 · **Change:** minor (docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate decremented (4–14 → 3–13 h); previously: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: Raster effects 85% → 88%, gallery thumbnails and in-dialog preview in; headline numbers unchanged; Symbols area ~87% → ~88%: dynamic instance parts take opacity, blend, gradient and pattern on the canvas; G5 docs sync for Overlap and Pattern auto corners; previously minor: Tools stays beside the canvas with left-side panels; Hindi catalog draft complete under the translation tests; contributor loanword terminology reviewed; wider proofreading welcome; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; new gradients follow document color mode; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) VectorCraft is a clean-room, open-source, pure-Rust reimplementation of the Adobe Illustrator workflow. It runs on macOS, Windows, Linux, FreeBSD and the web (WASM), and agents can drive all of it over MCP, the CLI and a JSON @@ -223,6 +223,7 @@ The full earlier record of what landed is kept in [docs/roadmap.md](docs/roadmap | Date | Change | Summary | |---|---|---| +| 2026-11-15 | minor | Graphic Styles: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate decremented (4–14 → 3–13 h). | | 2026-11-14 | minor | Gujarati (#6613): contributor proofreading completed for all 387 additions, with 11 wording corrections; 4,673 reviewed catalog rows. Status/error messages remain partial; web selection requires a bundled Gujarati face. Scores and estimates unchanged. | | 2026-11-10 | minor | Tidy-up, no content change: the unheaded change bullets at the top of the file and a revision row inside the headline-numbers table move to this table under their commit dates. Scores and estimates unchanged. | | 2026-11-10 | minor | Raster effects: Effect Gallery thumbnails and an in-dialog preview (an original drawing through each filter). Features-table Raster effects 85% → 88%, hours 1–2 → none. Headline numbers unchanged, so the progress log is unchanged. | diff --git a/crates/doc/src/style_libs.rs b/crates/doc/src/style_libs.rs index 1952060663..34faf1f9c4 100644 --- a/crates/doc/src/style_libs.rs +++ b/crates/doc/src/style_libs.rs @@ -162,6 +162,7 @@ pub const STYLE_LIBRARIES: &[BuiltinStyleLibrary] = &[ BuiltinStyleLibrary { id: "blends-transparency", name: "Blends and Transparency", make: blends_transparency }, BuiltinStyleLibrary { id: "game-hud", name: "Game HUD", make: game_hud }, BuiltinStyleLibrary { id: "status-effects", name: "Status Effects", make: status_effects }, + BuiltinStyleLibrary { id: "neon-glow", name: "Neon & Glow", make: neon_glow }, ]; /// Built-in library `id`, made once. @@ -619,6 +620,44 @@ fn status_effects() -> Vec { ] } +/// Neon & Glow: original multi-layer procedural styles with neon tubes, laser beams, and glowing halos. +fn neon_glow() -> Vec { + vec![ + style( + "Cyan Neon", + vec![S(StrokeLayer { opacity: 0.7, ..round("#00e5ff", 6.0) }), S(round("#ffffff", 1.5))], + vec![fx("stylize.dropShadow", json!({"mode": "screen", "opacity": 85.0, "x": 0.0, "y": 0.0, "blur": 8.0, "color": "#00e5ff"}))], + ), + GraphicStyle { + blend: BlendMode::Screen, + ..style( + "Magenta Laser", + vec![S(StrokeLayer { blend: BlendMode::Screen, ..round("#ff007f", 5.0) }), S(round("#ffffff", 1.5))], + vec![fx("stylize.outerGlow", json!({"mode": "screen", "opacity": 90.0, "blur": 8.0, "color": "#ff007f"}))], + ) + }, + style( + "Amber Tube", + vec![S(StrokeLayer { opacity: 0.8, ..round("#ff8c00", 6.0) }), S(round("#ffea00", 1.5))], + vec![fx("stylize.outerGlow", json!({"mode": "screen", "opacity": 85.0, "blur": 8.0, "color": "#ff8c00"}))], + ), + style( + "Electric Lime", + vec![S(StrokeLayer { opacity: 0.75, ..round("#39ff14", 6.0) }), S(round("#ffffff", 1.5))], + vec![fx("stylize.outerGlow", json!({"mode": "screen", "opacity": 90.0, "blur": 8.0, "color": "#39ff14"}))], + ), + style( + "Pulse Violet", + vec![S(StrokeLayer { opacity: 0.75, ..round("#7b2cbf", 5.0) }), S(round("#e0aaff", 1.5))], + vec![ + fx("stylize.innerGlow", json!({"mode": "screen", "opacity": 75.0, "blur": 6.0, "color": "#c77dff", "source": "edge"})), + fx("stylize.outerGlow", json!({"mode": "screen", "opacity": 85.0, "blur": 8.0, "color": "#7b2cbf"})), + ], + ), + style("Cobalt Phosphor", vec![S(round("#0047ab", 6.0)), S(round("#ffffff", 1.5))], vec![fx("blur.gaussian", json!({"radius": 2.0}))]), + ] +} + #[cfg(test)] mod tests { use super::*; @@ -750,4 +789,36 @@ mod tests { let Paint::Gradient(gp) = g.appearance.fill_paint() else { panic!("a gradient") }; assert!(gp.swatch.is_none() && gp.gradient.stops.iter().all(|s| s.swatch.is_none() && s.tint == 1.0)); } + + #[test] + fn neon_and_glow_styles_are_defined_with_multi_strokes_and_effects() { + let lib = builtin_style_library("neon-glow").expect("neon-glow library exists"); + assert_eq!(lib.name, "Neon & Glow"); + assert_eq!(lib.len(), 6); + let names: Vec<&str> = lib.styles.iter().map(|g| g.name.as_str()).collect(); + assert_eq!(names, ["Cyan Neon", "Magenta Laser", "Amber Tube", "Electric Lime", "Pulse Violet", "Cobalt Phosphor"]); + for g in &lib.styles { + let strokes = g.appearance.items.iter().filter(|i| matches!(i, AppearanceItem::Stroke(_))).count(); + assert!(strokes >= 2, "{} has {} strokes, expected >= 2", g.name, strokes); + assert!(!g.appearance.effects.is_empty(), "{} has effects", g.name); + } + let cyan = lib.style("Cyan Neon").unwrap(); + assert_eq!(cyan.appearance.effects[0].id, "stylize.dropShadow"); + let magenta = lib.style("Magenta Laser").unwrap(); + assert_eq!(magenta.blend, BlendMode::Screen); + let pulse = lib.style("Pulse Violet").unwrap(); + let pulse_fx: Vec<&str> = pulse.appearance.effects.iter().map(|e| e.id.as_str()).collect(); + assert_eq!(pulse_fx, ["stylize.innerGlow", "stylize.outerGlow"]); + let cobalt = lib.style("Cobalt Phosphor").unwrap(); + assert_eq!(cobalt.appearance.effects[0].id, "blur.gaussian"); + } + + #[test] + fn neon_glow_round_trips_through_vcstyles() { + let lib = builtin_style_library("neon-glow").unwrap(); + let text = write(&lib); + assert!(sniff(&text)); + let read_back = read(&text, "Fallback").unwrap(); + assert_eq!(*lib, read_back); + } } diff --git a/crates/engine/src/tests/stylelib.rs b/crates/engine/src/tests/stylelib.rs index fd8f2c7e24..e8623900fd 100644 --- a/crates/engine/src/tests/stylelib.rs +++ b/crates/engine/src/tests/stylelib.rs @@ -45,6 +45,7 @@ fn builtin_libraries_are_listed_with_original_styles_using_catalogued_effects() assert!(libs.iter().any(|l| l["id"] == "game-hud" && l["name"] == "Game HUD"), "{libs:?}"); assert!(libs.iter().any(|l| l["id"] == "status-effects" && l["name"] == "Status Effects"), "{libs:?}"); assert!(libs.iter().any(|l| l["id"] == "textures" && l["name"] == "Textures" && l["count"] == 8), "{libs:?}"); + assert!(libs.iter().any(|l| l["id"] == "neon-glow" && l["name"] == "Neon & Glow" && l["count"] == 6), "{libs:?}"); for l in libs { let id = l["id"].as_str().unwrap(); let g = run(&mut s, "graphicStyle.library", json!({"library": id})); @@ -69,6 +70,9 @@ fn builtin_libraries_are_listed_with_original_styles_using_catalogued_effects() let texture_names: Vec<&str> = textures["styles"].as_array().unwrap().iter().map(|x| x["name"].as_str().unwrap()).collect(); let expected = ["Fine Grain", "Canvas Weave", "Burlap Sack", "Cracked Glaze", "Mosaic Floor", "Quilted Squares", "Leaded Glass", "Damp Paper"]; assert_eq!(texture_names, expected); + let neon = run(&mut s, "graphicStyle.library", json!({"library": "neon-glow"})); + let neon_names: Vec<&str> = neon["styles"].as_array().unwrap().iter().map(|x| x["name"].as_str().unwrap()).collect(); + assert_eq!(neon_names, ["Cyan Neon", "Magenta Laser", "Amber Tube", "Electric Lime", "Pulse Violet", "Cobalt Phosphor"]); let id = rect(&mut s, 10.0, 20.0, 40.0, 30.0); let r = run(&mut s, "graphicStyle.addFromLibrary", json!({"library": "game-hud", "name": "Mana Glow", "apply": true, "ids": [id.0]})); assert_eq!((names(&r["added"]), r["applied"].as_str()), (vec!["Mana Glow"], Some("Mana Glow"))); @@ -419,3 +423,53 @@ fn every_builtin_style_paints_visibly_on_a_rectangle() { } } } + +#[test] +fn neon_and_glow_library_adds_and_applies_multi_stroke_styles() { + let mut s = session(); + let list = run(&mut s, "graphicStyle.libraries", json!({})); + let libs = list["libraries"].as_array().unwrap(); + let at = libs.iter().position(|l| l["id"] == "neon-glow").expect("neon-glow listed"); + assert_eq!(libs[at]["name"], "Neon & Glow"); + assert_eq!(libs[at]["count"], 6); + + let (_, lib) = cmd::stylelib::library(&s, "neon-glow").unwrap(); + assert_eq!(lib.len(), 6); + + let want = [ + ("Cyan Neon", 2, "stylize.dropShadow"), + ("Magenta Laser", 2, "stylize.outerGlow"), + ("Amber Tube", 2, "stylize.outerGlow"), + ("Electric Lime", 2, "stylize.outerGlow"), + ("Pulse Violet", 2, "stylize.innerGlow"), + ("Cobalt Phosphor", 2, "blur.gaussian"), + ]; + + for (i, (name, stroke_count, first_effect)) in want.iter().enumerate() { + let id = rect(&mut s, 10.0 + 30.0 * i as f64, 15.0, 25.0, 25.0); + let before_undo = undo_len(&s); + let r = run(&mut s, "graphicStyle.addFromLibrary", json!({"library": "neon-glow", "name": name, "apply": true, "ids": [id.0]})); + assert_eq!((names(&r["added"]), r["applied"].as_str()), (vec![*name], Some(*name))); + assert_eq!(undo_len(&s), before_undo + 1, "{name}"); + + let node = doc(&s).node(id).unwrap(); + let strokes = node.appearance.items.iter().filter(|it| matches!(it, vectorcraft_doc::AppearanceItem::Stroke(_))).count(); + assert_eq!(strokes, *stroke_count, "{name}"); + assert_eq!(node.appearance.effects[0].id, *first_effect, "{name}"); + } + + // Adding existing style dedupes and creates no new undo step. + let before = (undo_len(&s), doc(&s).graphic_styles.len()); + let r = run(&mut s, "graphicStyle.addFromLibrary", json!({"library": "neon-glow", "name": "Cyan Neon"})); + assert_eq!((names(&r["added"]), names(&r["existing"])), (vec![], vec!["Cyan Neon"])); + assert_eq!((undo_len(&s), doc(&s).graphic_styles.len()), before); + + // Round-trip through serialize / open + let b64 = run(&mut s, "document.serialize", json!({}))["dataBase64"].as_str().unwrap().to_string(); + run(&mut s, "document.open", json!({"name": "neon.vectorcraft", "dataBase64": b64})); + for (name, _, _) in want { + let d = doc(&s); + let st = d.graphic_style(name).unwrap(); + assert!(st.same_look(lib.style(name).unwrap()), "{name}"); + } +} diff --git a/docs/gaps.md b/docs/gaps.md index 36dd83cd3c..7bf6fd2cfc 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-14 · **Change:** minor (G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate 4–14 → 3–13 h; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ## Feature submission evidence @@ -34,6 +34,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); estimate decremented (4–14 → 3–13 h). | | 2026-11-14 | minor | G12: Symbols panel context menu: right-click on a symbol in thumbnail or list view displays a context menu (Place Symbol Instance, Edit Symbol, Duplicate Symbol, Delete Symbol, Break Link to Symbol, Select All Instances), selecting the symbol first if unselected; scores and estimates unchanged. | | 2026-11-14 | minor | G5: Weather Icons joins Basic Shapes, UI Frames, Map Markers, Inventory Icons and Skill Icons as a sixth built-in symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow; original procedural vector symbols generated in code, no default 9-slice); estimate decremented (5–15 → 4–14 h). | | 2026-11-14 | minor | G12: Layers panel row context menu (Options…, Duplicate, Delete, Lock Others/Show All/Hide Others/Unlock All, Locate Object, Collect for Export) with selection handling and undo tracking. Scores and estimates unchanged. | @@ -95,7 +96,7 @@ stage ([ROADMAP.md](../ROADMAP.md)). | 8 | [G2 Photoshop-style raster effects and the Effect Gallery](#g2-photoshop-style-raster-effects-and-the-effect-gallery) | 0 | no | [effects-parity.md](effects-parity.md) | | 9 | [G13 Illustrator 2026 (30.x) additions](#g13-illustrator-2026-30x-additions) | 13–23 | no | [target-app-parity.md](target-app-parity.md) | | 10 | [G14 Pen hardware beyond Windows pressure](#g14-pen-hardware-beyond-windows-pressure) | 4–10 | Wayland pressure | [hardware-parity.md](hardware-parity.md) | -| 11 | [G5 Brushes, symbols and libraries](#g5-brushes-symbols-and-libraries) | 4–14 | no | [target-app-parity.md](target-app-parity.md) | +| 11 | [G5 Brushes, symbols and libraries](#g5-brushes-symbols-and-libraries) | 3–13 | no | [target-app-parity.md](target-app-parity.md) | | 12 | [G3 3D and Materials](#g3-3d-and-materials) | 25–45 | no | [effects-parity.md](effects-parity.md) | | 13 | [G7 Views and windows](#g7-views-and-windows) | 15–25 | no | [ui-parity.md](ui-parity.md) | | 14 | [G6 Automation and scripting](#g6-automation-and-scripting) | 4–8 | no | [target-app-parity.md](target-app-parity.md) | @@ -671,17 +672,18 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi Direct Selection of a path, compound path or type inside a dynamic instance also takes opacity and blend (`transparency.set`) and a gradient or pattern fill or stroke (`paint.setFill` / `paint.setStroke`, Eyedropper), for that instance only; - graphic style libraries (Window › Graphic Style Libraries; ten original libraries generated in code, including + graphic style libraries (Window › Graphic Style Libraries; eleven original libraries generated in code, including Game HUD with Health Fill, Mana Glow, Damage Flash, Quest Outline, Coin Shine and Boss Alert, Status Effects - with Poison Tint, Freeze Edge, Burn Aura, Stun Pulse, Stealth Fade and Shield Buff, Painted and Sketched with + with Poison Tint, Freeze Edge, Burn Aura, Stun Pulse, Stealth Fade and Shield Buff, Neon & Glow with Cyan Neon, + Magenta Laser, Amber Tube, Electric Lime, Pulse Violet and Cobalt Phosphor, Painted and Sketched with Washed Blue, Bristle Ochre, Pastel Heather, Charcoal Shade, Ink Contour, Wet Ink and Fine Pen, and Textures with Fine Grain, Canvas Weave, Burlap Sack, Cracked Glaze, Mosaic Floor, Quilted Squares, Leaded Glass and Damp Paper, painted with the texture effects; User Defined; Other Library…; `graphicStyle.libraries`, `graphicStyle.addFromLibrary`). -- **Missing:** more built-in brush libraries beyond the eight shipped (and further graphic-style libraries beyond the ten shipped, and further symbol libraries beyond Basic +- **Missing:** more built-in brush libraries beyond the eight shipped (and further graphic-style libraries beyond the eleven shipped, and further symbol libraries beyond Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write; Global Edit of rotated copies as matches. -- **Estimate:** 4–14 h. +- **Estimate:** 3–13 h. ## G3 3D and Materials diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index c6375f3aa3..043e962d56 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-14 · **Change:** minor (Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-15 · **Change:** minor (G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -58,6 +58,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); area score and estimate unchanged. | | 2026-11-14 | minor | G5: Weather Icons joins Basic Shapes, UI Frames, Map Markers, Inventory Icons and Skill Icons as a sixth built-in symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow; original procedural vector symbols generated in code, no default 9-slice); area score and estimate unchanged. | | 2026-11-14 | minor | Pencil and Paintbrush: a closed stroke (Alt at the release, or ending within Close Paths When Ends Are Within of its start) is fitted as the open stroke would be and closed by a straight segment back to its start, instead of curving on past both ends (`pencil_alt_closes_a_stroke_straight_back_to_its_start` in `crates/engine/src/tests/draw2.rs`). Scores and estimates unchanged. | | 2026-11-13 | minor | Pencil cursors: the continuation cursor (a short rising line) shows over an open end of a selected path before any press, freehand too, and while a continuing stroke nears another selected path's open end it connects to; the straight-line cursor is a short level line; a continued path, a straight line too, shows the closing cursor and closes within Close Paths When Ends Are Within of its other end, and with Alt at the release (`a_continued_stroke_shows_where_it_connects_or_closes` in `crates/tools/src/draw2/gesture/tests.rs`, `pencil_extend_closes_as_closed_says` in `crates/engine/src/tests/draw2.rs`). Scores and estimates unchanged. | @@ -559,7 +560,7 @@ since 2026-10-01. | **Interaction fidelity:** modifiers, cursors, small behaviours | ~30–40% | The dedicated pass hasn't started, and there has been no side-by-side session with Illustrator yet. A power user notices this first | | **Look & feel** | ~75–80% | Measured against Illustrator 2026 screenshots (2026-10-02); the panels added since haven't been re-measured | | **File interop** | ~85% | SVG/SVGZ, PDF and PDF-compatible `.ai` (and legacy version 7 `.ai` out, keeping layers, groups and type as text), EPS, DXF, EMF/WMF, raster formats, PSD export and PSD/PSB placement (merged image), Place and Links, Package, Print, clipboard flavours. Affinity documents (Affinity 1–3) open natively as editable art, checked against 51 pinned public files (33 current `.af`), with selected saved-thumbnail comparisons and every-board native/SVG/PDF/PSD checks for current files; Affinity export is missing and effects, adjustments and brushes don't import. Affinity isn't an Illustrator feature, so this doesn't raise the parity score. The editing copy inside an Illustrator EPS or `.ai` is read for its structure: layers, groups, names, hidden objects and type, colours, gradients, transparency, images and every artboard (see Out of scope for what it doesn't read yet); DWG has no open spec | -| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eight (including Game HUD and Status Effects) and brush libraries nine (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media) beside User Defined and Other Library… | +| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries nine (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media) beside User Defined and Other Library… | | **Performance** | unverified | Multithreaded, off-thread rendering and caches are in place. The last budget run (2026-10-01, loaded machine) measured 290 ms for a 50k-path fit against a 16 ms budget. Re-run `vectorcraft-cli perf` on an idle machine | | **Robustness** | good, new | ~2,840 tests, property tests, no panics in shipped code (lints, the `guard` safety net, import fuzzing), Data Recovery. Missing: a corpus of real-world files, Windows/Linux/browser QA | | **Platforms and 1.0 polish** | ~60% | The macOS app and the web build work, and Finder opens every readable format with the macOS app (#295, #354); on macOS the menus are in the system menu bar, laid out as a Mac app's, with the in-window menus as a fallback (`--in-window-menus`; verified on Windows and by cross-compilation, not yet by hand on a Mac); hybrid-graphics laptops render on the power-saving GPU by default on Windows and macOS (#306), and Windows starts on Direct3D 12, falling back to OpenGL, and loads no Vulkan driver unless `WGPU_BACKEND` asks for it (#545: Vulkan flickered black on an Intel GPU, DX12 and OpenGL didn't; #806: a faulty Vulkan driver crashed the app before its window appeared; verified by unit tests and the reporter's runs with `WGPU_BACKEND`), and Linux on the GPU the desktop runs on, since a Wayland compositor may refuse frames from the other one; a window that fails on its GPU while starting up starts again on the next one instead of crashing (#502; the dual-GPU Wayland case is verified by unit tests and cross-compilation, not on such hardware); web drops land in the document they were dropped on (#359); desktop drops carry no pointer position (winit 0.30), so a dropped document opens as a tab of its own and a picture or text is placed in the middle of the view, while the web places anything dropped on the canvas and opens what is dropped off it, as Illustrator does (#472); a web page that loses its WebGPU device or WebGL context restarts its graphics with the same documents (#369); on Linux/Wayland the clipboard reads the compositor's own (data-control) and copied image files paste, but files can't be dropped on the window under native Wayland until eframe moves to winit 0.31 (#398; the Wayland side is verified by compilation only), so Preferences › Performance › Linux Display Server › X11 (XWayland) opens the window through XWayland, where drops work (#1151; verified by unit tests and cross-compilation, not on a Wayland desktop); on Linux the Paste menu checks the system clipboard on a background thread, so a clipboard owner that never answers no longer freezes the window, while Windows and macOS keep their quick in-line check (#510; the X11 hang verified by the contributor, here by headless tests); on KDE Plasma 6.3+ under Wayland, pens and pen displays reach the app only under XWayland (`WAYLAND_DISPLAY=`) or with KWin's `KWIN_WAYLAND_EMULATE_TABLET=1`, since winit 0.30 has no Wayland tablet input (#491, not verified on hardware); Windows/Linux packaging and accessibility are pending | @@ -1624,7 +1625,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur On the canvas, the renderer no longer draws the picture of the art below back as an image each time it copies the backdrop of a non-isolated group that blends: it keeps that picture and draws the art that follows over it. At 2880 × 1800, 50 translucent groups with Multiply members take 65 ms a frame instead of 299 ms on 8 threads (`vectorcraft-cli bench`), and the frames have the same pixels. Type inside a group, layer, symbol instance, blend or repeat keeps its opacity, blend mode, opacity mask, Opacity & Mask Define Knockout Shape, own effects, perspective and visibility when the effects on the container outline it. Hidden type with a geometry effect of its own is left out of exports. PDF export writes a knockout group as one PDF knockout group (`/K true`, with `/I true` when the group isolates; ISO 32000-1, 11.4.6.3), so a knockout group of any size opens again in VectorCraft as a knockout group, and the form nesting of the file does not grow with the number of elements. When an element's opacity or mask defines its knockout shape, or it paints translucently, each element is drawn through one soft mask of the overlapping elements above it instead; past 65,536 objects in a group's masks (or 2,048 elements) the group is a PDF knockout group, with a warning that its translucent elements knock out fully. SVG export draws each element of a knockout group through one mask of the overlapping elements above it, and the masks refer to one copy of each element's shape, so the elements stay siblings and the file nests no deeper with more elements; past 65,536 shapes in a group's masks (or 2,048 elements) the group is written as a plain group, with a warning. Evidence: `pdf/src/tests/blend.rs`, `svg/tests/it/blend_export.rs`, `pdf/tests/gradient_forms.rs` (a gradient in a knockout group reads back in place). - - **Graphic styles:** styles keep opacity and blend mode, capture groups and type, apply on top with Alt, and link to the objects using them; Redefine, Break Link, Graphic Style Options, Select All Unused, Sort by Name, and Select > Same Graphic Style / Appearance Attribute. The panel has list and thumbnail views with rendered previews, merge, reorder and drag and drop, plus a Control bar Style picker; ten generated style libraries (including Game HUD, Status Effects, Painted and Sketched, whose seven styles each repaint a solid fill with one watercolor, dry brush, pastel, charcoal or ink effect, and Textures) save and load as `.vcstyles`. + - **Graphic styles:** styles keep opacity and blend mode, capture groups and type, apply on top with Alt, and link to the objects using them; Redefine, Break Link, Graphic Style Options, Select All Unused, Sort by Name, and Select > Same Graphic Style / Appearance Attribute. The panel has list and thumbnail views with rendered previews, merge, reorder and drag and drop, plus a Control bar Style picker; eleven generated style libraries (including Game HUD, Status Effects, Neon & Glow, Painted and Sketched, whose seven styles each repaint a solid fill with one watercolor, dry brush, pastel, charcoal or ink effect, and Textures) save and load as `.vcstyles`. The built-in Textures graphic style library (`graphicStyle.addFromLibrary {library: "textures"}`) has eight styles that paint their fills and strokes with the texture effects: Fine Grain (Grain), Canvas Weave and Burlap Sack (Texturizer), Cracked Glaze (Craquelure), Mosaic Floor (Mosaic Tiles), Quilted Squares (Patchwork), Leaded Glass (Stained Glass) and Damp Paper (Water Paper). The help page names new graphic styles for textures ([What's new](https://helpx.adobe.com/illustrator/desktop/new-features/whats-new.html)) without naming them, so the styles, their names and their settings are VectorCraft's own (`tests::stylelib::textures_styles_apply_their_texture_effects_and_keep_their_params_through_save_and_open`). In the Graphic Styles panel, Shift-click selects a range of styles and Ctrl/Cmd-click adds or removes one. Applying a style to several objects, and Redefine Graphic Style, give the objects one shared copy of the style's appearance instead of a copy each; an object that is edited later gets its own copy, and an object whose placed gradients are fitted to its own bounds gets its own. The undo history's memory estimate counts a shared appearance once. Saved files are unchanged (`crates/engine/src/tests/styles.rs`). From 9f7e74ece0ceea9da57c64c6d2a7cbef74f274c0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 14:45:00 -0800 Subject: [PATCH 10/52] Color Settings: RGB and CMYK policies keep, take off or convert a document's profiles on open edit.colorSettings takes rgbPolicy (off, preserveEmbedded, convert) and cmykPolicy (the same and preserveNumbers), kept in Color Settings.json. document.open, File > New from Template and File > Revert apply the policy of each model to a profile the file is tagged with that is not the working space: Preserve Embedded Profiles keeps it, Off and Preserve Numbers take it off and keep the numbers, and Convert to Working Space converts that model's colors into the working space and takes it off. The replies list a warning per profile, and a changed document opens with unsaved changes. The Separations panel's Color Settings section has the two lists. A colorMode asked for on open converts after the policy, through the document's own profiles. Document Color Mode also converts the points of freeform gradient swatches. --- crates/color/src/cms.rs | 100 ++++++++++++++- crates/color/src/cms/icc.rs | 42 ++++++ crates/color/src/cms/tests.rs | 36 ++++++ crates/color/src/cms/tests_icc.rs | 15 +++ crates/engine/src/cmd/colormgmt.rs | 132 ++++++++++++++++++- crates/engine/src/cmd/fileio/load.rs | 58 +++++++-- crates/engine/src/cmd/fileio/save.rs | 13 +- crates/engine/tests/color_settings.rs | 156 ++++++++++++++++++++++- crates/ui-egui/src/i18n/bg.tsv | 5 + crates/ui-egui/src/i18n/bs.tsv | 5 + crates/ui-egui/src/i18n/ca.tsv | 5 + crates/ui-egui/src/i18n/cs.tsv | 5 + crates/ui-egui/src/i18n/da.tsv | 5 + crates/ui-egui/src/i18n/de.tsv | 5 + crates/ui-egui/src/i18n/el.tsv | 5 + crates/ui-egui/src/i18n/es.tsv | 5 + crates/ui-egui/src/i18n/fi.tsv | 5 + crates/ui-egui/src/i18n/fr.tsv | 5 + crates/ui-egui/src/i18n/gu.tsv | 5 + crates/ui-egui/src/i18n/hi.tsv | 5 + crates/ui-egui/src/i18n/hu.tsv | 5 + crates/ui-egui/src/i18n/id.tsv | 5 + crates/ui-egui/src/i18n/it.tsv | 5 + crates/ui-egui/src/i18n/ja.tsv | 5 + crates/ui-egui/src/i18n/ka.tsv | 5 + crates/ui-egui/src/i18n/ko.tsv | 5 + crates/ui-egui/src/i18n/nl.tsv | 5 + crates/ui-egui/src/i18n/pl.tsv | 5 + crates/ui-egui/src/i18n/pt-br.tsv | 5 + crates/ui-egui/src/i18n/ru.tsv | 5 + crates/ui-egui/src/i18n/sv.tsv | 5 + crates/ui-egui/src/i18n/tr.tsv | 5 + crates/ui-egui/src/i18n/uk.tsv | 5 + crates/ui-egui/src/i18n/vi.tsv | 5 + crates/ui-egui/src/i18n/zh-hans.tsv | 5 + crates/ui-egui/src/i18n/zh-hant.tsv | 5 + crates/ui-egui/src/panels/separations.rs | 33 ++++- docs/mcp.md | 15 ++- docs/target-app-parity.md | 1 + 39 files changed, 717 insertions(+), 24 deletions(-) diff --git a/crates/color/src/cms.rs b/crates/color/src/cms.rs index 7fd8707a99..eb7ddf9b7c 100644 --- a/crates/color/src/cms.rs +++ b/crates/color/src/cms.rs @@ -94,6 +94,50 @@ impl Intent { } } +/// A color management policy (Edit → Color Settings): what opening a document does with a profile +/// it is tagged with that is not the working space of its model. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub enum Policy { + /// The document loses the profile; its color numbers stay as they are. + Off, + /// The document keeps the profile. + #[default] + PreserveEmbedded, + /// The colors are converted from the profile into the working space, which keeps their + /// appearance, and the document loses the profile. + Convert, + /// CMYK only: the document loses the profile; its color numbers stay as they are. + PreserveNumbers, +} + +impl Policy { + /// The RGB policies, in menu order. + pub const RGB: [Policy; 3] = [Policy::Off, Policy::PreserveEmbedded, Policy::Convert]; + /// The CMYK policies, in menu order. + pub const CMYK: [Policy; 4] = [Policy::Off, Policy::PreserveEmbedded, Policy::Convert, Policy::PreserveNumbers]; + /// Parse an id of [`Policy::id`]. + pub fn parse(s: &str) -> Option { + [Policy::Off, Policy::PreserveEmbedded, Policy::Convert, Policy::PreserveNumbers].into_iter().find(|p| p.id() == s) + } + pub fn id(&self) -> &'static str { + match self { + Policy::Off => "off", + Policy::PreserveEmbedded => "preserveEmbedded", + Policy::Convert => "convert", + Policy::PreserveNumbers => "preserveNumbers", + } + } + pub fn label(&self) -> &'static str { + match self { + Policy::Off => "Off", + Policy::PreserveEmbedded => "Preserve Embedded Profiles", + Policy::Convert => "Convert to Working Space", + Policy::PreserveNumbers => "Preserve Numbers", + } + } +} + #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum ProfileKind { @@ -134,11 +178,25 @@ pub struct ColorSettings { pub intent: Intent, /// Black-point compensation. pub bpc: bool, + /// The color management policy for RGB profiles (one of [`Policy::RGB`]). Settings saved + /// without one take the default. + #[serde(default)] + pub rgb_policy: Policy, + /// The color management policy for CMYK profiles. Settings saved without one take the default. + #[serde(default)] + pub cmyk_policy: Policy, } impl Default for ColorSettings { fn default() -> Self { - Self { rgb: SRGB.into(), cmyk: GENERIC_CMYK.into(), intent: Intent::RelativeColorimetric, bpc: true } + Self { + rgb: SRGB.into(), + cmyk: GENERIC_CMYK.into(), + intent: Intent::RelativeColorimetric, + bpc: true, + rgb_policy: Policy::default(), + cmyk_policy: Policy::default(), + } } } @@ -518,6 +576,41 @@ impl Cms { Color::Rgb { r, g, b } } + /// An RGB or CMYK colour of this context's space as the colour of the same model in `dest`'s + /// space that looks the same, converted with `intent` (Edit → Color Settings › Convert to + /// Working Space). RGB converts directly from profile to profile, with this context's + /// black-point compensation. CMYK converts between two loaded profiles through ProPhoto RGB + /// ([`IccProfile::to_same_model_of`]), and through Lab when either space is built in. Grey and + /// Lab colours stay as they are. + pub fn convert_into(&self, dest: &Cms, c: &Color, intent: Intent) -> Color { + match *c { + Color::Rgb { r, g, b } => { + let icc = |s: &RgbSpace| match s { + RgbSpace::Icc(p) => Some(p.clone()), + RgbSpace::Srgb => builtin_rgb_cache(SRGB), + }; + let [r, g, b] = icc(&self.rgb) + .zip(icc(&dest.rgb)) + .and_then(|(s, d)| s.to_rgb_of(&d, &[r, g, b], intent, self.settings.bpc)) + .unwrap_or_else(|| dest.srgb_to_rgb(self.rgb_to_srgb([r, g, b]))); + Color::Rgb { r, g, b } + } + Color::Cmyk { c, m, y, k } => { + let inks = [c, m, y, k].map(|v| v.clamp(0.0, 1.0)); + let direct = match (&self.cmyk, &dest.cmyk) { + (CmykSpace::Icc(s), CmykSpace::Icc(d)) => s.to_same_model_of(d, &inks, intent), + _ => None, + }; + let [c, m, y, k] = match direct.as_deref() { + Some(&[c, m, y, k]) => [c, m, y, k], + _ => dest.lab_to_cmyk(self.cmyk_to_lab(inks), intent), + }; + Color::Cmyk { c, m, y, k } + } + Color::Gray { .. } | Color::Lab { .. } => *c, + } + } + /// How far (ΔE2000) the best CMYK reproduction of `c` is from `c` (0 for CMYK/grey colours). pub fn gamut_error(&self, c: &Color) -> f32 { match c { @@ -966,8 +1059,11 @@ pub fn working_settings() -> ColorSettings { } /// Replace the working settings (Edit → Color Settings) and make them the active settings (fails, -/// leaving both unchanged, if a profile is unknown). +/// leaving both unchanged, if a profile is unknown or the RGB policy is Preserve Numbers). pub fn set_active(settings: &ColorSettings) -> Result<(), CmsError> { + if !Policy::RGB.contains(&settings.rgb_policy) { + return Err(CmsError::Unsupported(format!("the RGB policy can't be {}", settings.rgb_policy.id()))); + } let cms = Arc::new(Cms::new(settings)?); *WORKING.write().unwrap_or_else(|e| e.into_inner()) = Some(cms.clone()); install(cms); diff --git a/crates/color/src/cms/icc.rs b/crates/color/src/cms/icc.rs index 0b09062b84..2ee6293c9e 100644 --- a/crates/color/src/cms/icc.rs +++ b/crates/color/src/cms/icc.rs @@ -34,6 +34,9 @@ type Xf = Option>; /// generation only lets the cache drop what reloads left behind. type DirectKey = (u64, u64, usize, bool); +/// The two transforms of [`IccProfile::to_same_model_of`]. +type SameModel = (Arc, Arc); + /// A parsed ICC profile plus lazily-built transforms to/from sRGB. pub struct IccProfile { pub name: String, @@ -49,6 +52,10 @@ pub struct IccProfile { /// Direct transforms into other RGB profiles ([`Self::to_rgb_of`]), by destination, intent /// and black-point compensation. direct: Mutex>)>>, + /// Transforms into other profiles of the same model ([`Self::to_same_model_of`]), keyed as + /// [`Self::direct`] is (black-point compensation always off): into ProPhoto RGB, and from it + /// into the destination. + same_model: Mutex)>>, } /// A transform from one profile into an RGB profile without passing through sRGB: into the @@ -99,6 +106,7 @@ impl IccProfile { to_srgb: Default::default(), from_srgb: Default::default(), direct: Mutex::new(Vec::new()), + same_model: Mutex::new(Vec::new()), }) } @@ -249,6 +257,40 @@ impl IccProfile { Some(Direct { to_linear, to_dest: Some(to_dest), black }) } + /// Device values of this profile → device values of `dest`, a profile of the same model, + /// converted with `intent` through ProPhoto RGB rather than sRGB, so colours outside sRGB + /// keep their place. `None` when `dest` is of another model or no transform can be built. + pub fn to_same_model_of(&self, dest: &IccProfile, v: &[f32], intent: Intent) -> Option> { + if dest.kind != self.kind || v.len() != self.channels() { + return None; + } + let generation = profiles_generation(); + let key = (dest.id, generation, intent_index(intent), false); + let (into, out_of) = { + let mut cache = self.same_model.lock().unwrap_or_else(|e| e.into_inner()); + cache.retain(|(k, _)| k.1 == generation); + match cache.iter().find(|(k, _)| *k == key) { + Some((_, xf)) => xf.clone(), + None => { + let wide = rgb_space(super::PROPHOTO_RGB); + let xf = wide.and_then(|w| { + let into = self.profile.create_transform_f32(self.layout(), &w, Layout::Rgb, Self::opts(intent)).ok()?; + let out_of = w.create_transform_f32(Layout::Rgb, &dest.profile, dest.layout(), Self::opts(intent)).ok()?; + Some((into, out_of)) + }); + cache.push((key, xf.clone())); + xf + } + } + }?; + let mut rgb = [0.0f32; 3]; + into.transform(v, &mut rgb).ok()?; + let rgb = rgb.map(|x| x.clamp(0.0, 1.0)); + let mut out = vec![0.0f32; dest.channels()]; + out_of.transform(&rgb, &mut out).ok()?; + Some(out.into_iter().map(|x| x.clamp(0.0, 1.0)).collect()) + } + /// Whether transforms can be built for this profile (checked at registration). pub fn usable(&self) -> bool { self.to_xf(Intent::RelativeColorimetric).is_some() && self.inverse_xf(Intent::RelativeColorimetric).is_some() diff --git a/crates/color/src/cms/tests.rs b/crates/color/src/cms/tests.rs index 7b22163525..95e465b623 100644 --- a/crates/color/src/cms/tests.rs +++ b/crates/color/src/cms/tests.rs @@ -442,3 +442,39 @@ fn a_document_gets_the_same_context_for_the_same_profiles() { let unknown = for_document(Some("no such profile"), Some(SRGB)); assert_eq!(unknown.settings(), &working_settings(), "an unknown profile or one of the other model leaves the working space"); } + +/// The color management policies parse from their ids, Preserve Numbers is a CMYK policy only, and +/// settings saved before the policies existed read with the default policy. +#[test] +fn policies_parse_and_default_in_saved_settings() { + for p in Policy::CMYK { + assert_eq!(Policy::parse(p.id()), Some(p)); + } + assert_eq!(Policy::parse("bogus"), None); + assert!(!Policy::RGB.contains(&Policy::PreserveNumbers)); + let old: ColorSettings = + serde_json::from_str(r#"{"rgb": "sRGB IEC61966-2.1", "cmyk": "Device CMYK (uncalibrated)", "intent": "perceptual", "bpc": false}"#).unwrap(); + assert_eq!((old.rgb_policy, old.cmyk_policy), (Policy::PreserveEmbedded, Policy::PreserveEmbedded)); + let saved = serde_json::to_value(ColorSettings { cmyk_policy: Policy::PreserveNumbers, ..Default::default() }).unwrap(); + assert_eq!((saved["rgbPolicy"].as_str(), saved["cmykPolicy"].as_str()), (Some("preserveEmbedded"), Some("preserveNumbers"))); +} + +/// Convert to Working Space keeps a color's appearance: an RGB color of a wide space converts into +/// sRGB, and a CMYK color of one CMYK space into another, with numbers that look the same. Grey and +/// Lab colors stay as they are. +#[test] +fn convert_into_keeps_the_appearance() { + let wide = Cms::new(&ColorSettings { rgb: WIDE_GAMUT_RGB.into(), cmyk: DEVICE_CMYK.into(), ..Default::default() }).unwrap(); + let working = cms(); + let rgb = Color::Rgb { r: 0.25, g: 0.4, b: 0.6 }; + let moved = wide.convert_into(&working, &rgb, Intent::RelativeColorimetric); + assert_ne!(moved, rgb, "the numbers change"); + assert!(de(wide.display_rgb(&rgb), working.display_rgb(&moved)) < 1.0, "{rgb:?} → {moved:?}"); + let ink = Color::Cmyk { c: 0.2, m: 0.4, y: 0.6, k: 0.1 }; + let moved = wide.convert_into(&working, &ink, Intent::RelativeColorimetric); + assert!(matches!(moved, Color::Cmyk { .. }) && moved != ink, "{ink:?} → {moved:?}"); + assert!(delta_e2000(wide.lab(&ink), working.lab(&moved)) < 3.0, "{ink:?} → {moved:?}"); + for c in [Color::Gray { k: 0.3 }, Color::Lab { l: 50.0, a: 10.0, b: -20.0 }] { + assert_eq!(wide.convert_into(&working, &c, Intent::RelativeColorimetric), c); + } +} diff --git a/crates/color/src/cms/tests_icc.rs b/crates/color/src/cms/tests_icc.rs index 1d312c09c3..2b8a82a36e 100644 --- a/crates/color/src/cms/tests_icc.rs +++ b/crates/color/src/cms/tests_icc.rs @@ -252,3 +252,18 @@ fn settings_built_before_a_reload_dont_leave_the_old_transform_to_the_new_ones() assert!(in_srgb.iter().zip(want).any(|(a, b)| (a - b).abs() > 0.05), "sRGB {in_srgb:?} vs ProPhoto {want:?}"); assert!(in_prophoto.iter().zip(want).all(|(a, b)| (a - b).abs() < 1e-4), "after the reload {in_prophoto:?}, want {want:?}"); } + +/// A CMYK profile converts into another CMYK profile, ink for ink, and refuses a profile +/// of another model or inks of the wrong count. +#[test] +fn cmyk_profiles_convert_into_each_other_directly() { + let generic = IccProfile::from_bytes(Some("A".into()), &icc_bytes(GENERIC_CMYK).unwrap()).unwrap(); + let device = IccProfile::from_bytes(Some("B".into()), &icc_bytes(DEVICE_CMYK).unwrap()).unwrap(); + let srgb = IccProfile::from_bytes(None, &icc_bytes(SRGB).unwrap()).unwrap(); + let inks = [0.2, 0.4, 0.6, 0.1]; + let out = generic.to_same_model_of(&device, &inks, Intent::RelativeColorimetric).unwrap(); + assert_eq!(out.len(), 4); + assert!(out.iter().zip(inks).any(|(a, b)| (a - b).abs() > 0.01), "{out:?}"); + assert!(generic.to_same_model_of(&srgb, &inks, Intent::RelativeColorimetric).is_none()); + assert!(generic.to_same_model_of(&device, &inks[..3], Intent::RelativeColorimetric).is_none()); +} diff --git a/crates/engine/src/cmd/colormgmt.rs b/crates/engine/src/cmd/colormgmt.rs index 4e4da57f9c..5f06b5166b 100644 --- a/crates/engine/src/cmd/colormgmt.rs +++ b/crates/engine/src/cmd/colormgmt.rs @@ -16,7 +16,7 @@ use std::collections::BTreeMap; use std::sync::Arc; use serde_json::{Value, json}; -use vectorcraft_color::cms::{self, ColorSettings, Intent, Model, ProofTarget}; +use vectorcraft_color::cms::{self, ColorSettings, Intent, Model, Policy, ProofTarget}; use vectorcraft_color::recolor::Neutral; use vectorcraft_color::{Color, Paint}; use vectorcraft_doc::ColorMode; @@ -37,7 +37,7 @@ pub fn specs() -> Vec { "Color Settings…", ["Edit"], Some("Cmd+Shift+K"), - "{rgb?: profile, cmyk?: profile, intent?: \"perceptual\"|\"relative\"|\"saturation\"|\"absolute\", bpc?: bool} set the working spaces → {rgb, cmyk, intent, bpc, profiles: [{name, kind, builtin}]}. The desktop app and vectorcraft-cli keep them in `Color Settings.json` next to the preferences and use them again at the next start (not with VECTORCRAFT_NO_PREFS); saved settings naming a profile that is gone leave the defaults", + "{rgb?: profile, cmyk?: profile, intent?: \"perceptual\"|\"relative\"|\"saturation\"|\"absolute\", bpc?: bool, rgbPolicy?: \"off\"|\"preserveEmbedded\"|\"convert\", cmykPolicy?: \"off\"|\"preserveEmbedded\"|\"convert\"|\"preserveNumbers\"} set the working spaces and the color management policies → {rgb, cmyk, intent, bpc, rgbPolicy, cmykPolicy, profiles: [{name, kind, builtin}]}. A policy decides what opening a document (document.open, File › Revert) does with an RGB or CMYK profile it is tagged with that is not the working space: preserveEmbedded (default) keeps it; off and preserveNumbers take it off and keep the color numbers; convert converts the colors of that model into the working space with the intent and takes it off. The open reply's warnings name each profile taken off or converted, and a document a policy changed opens with unsaved changes. The desktop app and vectorcraft-cli keep them in `Color Settings.json` next to the preferences and use them again at the next start (not with VECTORCRAFT_NO_PREFS); saved settings naming a profile that is gone leave the defaults", always, color_settings ), @@ -163,12 +163,26 @@ fn on_param(p: &Value, key: &str, cmd: &str) -> Result> { switch_or(p, key, false, cmd).map(Some) } +/// The policy `p` gives for `key`, one of `allowed`, or `None` when `p` leaves it out. +fn policy_param(p: &Value, key: &str, allowed: &[Policy], cmd: &str) -> Result> { + let Some(v) = text_param(p, key, cmd)? else { return Ok(None) }; + match Policy::parse(v).filter(|x| allowed.contains(x)) { + Some(x) => Ok(Some(x)), + None => { + let ids: Vec<&str> = allowed.iter().map(Policy::id).collect(); + Err(bad(cmd, format!("`{key}` must be one of {}", ids.join(", ")))) + } + } +} + fn settings_json(st: &ColorSettings) -> Value { json!({ "rgb": st.rgb, "cmyk": st.cmyk, "intent": st.intent.id(), "bpc": st.bpc, + "rgbPolicy": st.rgb_policy.id(), + "cmykPolicy": st.cmyk_policy.id(), "profiles": cms::profiles().iter().map(|p| json!({"name": p.name, "kind": p.kind, "builtin": p.builtin})).collect::>(), }) } @@ -205,6 +219,12 @@ fn color_settings(s: &mut Session, p: &Value) -> Result { st.intent = i; } st.bpc = switch_or(p, "bpc", st.bpc, C)?; + if let Some(v) = policy_param(p, "rgbPolicy", &Policy::RGB, C)? { + st.rgb_policy = v; + } + if let Some(v) = policy_param(p, "cmykPolicy", &Policy::CMYK, C)? { + st.cmyk_policy = v; + } if st != before { cms::set_active(&st).map_err(|e| bad(C, e.to_string()))?; // Saved for the next start when the app attached a settings file (#6335). @@ -530,7 +550,12 @@ pub(crate) fn set_color_mode(d: &mut vectorcraft_doc::Document, mode: ColorMode, if !convert { return 0; } - let conv = mode_converter(mode, intent, grays); + convert_colors(d, &mode_converter(mode, intent, grays)) +} + +/// Every color of `d` that [`set_color_mode`] converts, converted with `conv` → how many colors of +/// the art changed, as [`set_color_mode`] counts them. +fn convert_colors(d: &mut vectorcraft_doc::Document, conv: &dyn Fn(&Color) -> Color) -> usize { for sw in d.swatches_iter_mut() { match &mut sw.paint { Paint::Solid { color, .. } => *color = conv(color), @@ -538,6 +563,11 @@ pub(crate) fn set_color_mode(d: &mut vectorcraft_doc::Document, mode: ColorMode, for st in &mut g.gradient.stops { st.color = conv(&st.color); } + if let Some(freeform) = &mut g.freeform { + for point in &mut freeform.points { + point.color = conv(&point.color); + } + } } _ => {} } @@ -621,6 +651,102 @@ pub(crate) fn set_color_mode(d: &mut vectorcraft_doc::Document, mode: ColorMode, in_art } +/// Apply the color management policies of Edit → Color Settings to `d`, a document being opened: +/// each RGB or CMYK profile it is tagged with that is not the working space of its model is kept +/// (Preserve Embedded Profiles), taken off with the color numbers kept (Off, Preserve Numbers), or +/// taken off after the colors of that model were converted from it into the working space with the +/// working intent (Convert to Working Space). A profile that is not available here is taken off +/// by Off and Preserve Numbers and kept by Convert to Working Space, which has nothing to convert +/// from. → a note for each profile, and whether `d` changed. +pub(crate) fn apply_open_policies(d: &mut vectorcraft_doc::Document) -> (Vec, bool) { + let working = cms::working_settings(); + let (rgb, cmyk) = doc_profiles(d); + let mut notes = Vec::new(); + // What each model's policy does with its profile: `None` keeps it; `Some` takes it off, after + // converting the colors from the profile it holds. + let mut decide = |label: &str, tag: Option, working: &str, policy: Policy, kind: cms::ProfileKind| -> Option> { + let tag = tag.filter(|t| t != working)?; + let available = cms::profile(&tag).is_some_and(|p| p.kind == kind); + match policy { + Policy::PreserveEmbedded => None, + Policy::Off | Policy::PreserveNumbers => { + notes.push(format!( + "the {label} profile “{tag}” the file is tagged with was not used: Color Settings' {label} policy is {}", + policy.label() + )); + Some(None) + } + Policy::Convert if available => { + notes.push(format!( + "the {label} colors were converted from the profile “{tag}” the file is tagged with into the working space “{working}”" + )); + Some(Some(tag)) + } + Policy::Convert => { + notes.push(format!("the {label} profile “{tag}” the file is tagged with is not available, so its colors were not converted")); + None + } + } + }; + let rgb_do = decide("RGB", rgb, &working.rgb, working.rgb_policy, cms::ProfileKind::Rgb); + let cmyk_do = decide("CMYK", cmyk, &working.cmyk, working.cmyk_policy, cms::ProfileKind::Cmyk); + if rgb_do.is_none() && cmyk_do.is_none() { + return (notes, false); + } + let (from_rgb, from_cmyk) = (rgb_do.clone().flatten(), cmyk_do.clone().flatten()); + if from_rgb.is_some() || from_cmyk.is_some() { + let source = cms::for_document(from_rgb.as_deref(), from_cmyk.as_deref()); + let dest = cms::working(); + let intent = working.intent; + let (rgb_on, cmyk_on) = (from_rgb.is_some(), from_cmyk.is_some()); + let conv = |c: &Color| match c { + Color::Rgb { .. } if rgb_on => source.convert_into(&dest, c, intent), + Color::Cmyk { .. } if cmyk_on => source.convert_into(&dest, c, intent), + _ => *c, + }; + convert_colors(d, &conv); + convert_setting_colors(d, &conv); + } + if rgb_do.is_some() { + d.color_profiles.rgb = None; + } + if cmyk_do.is_some() { + d.color_profiles.cmyk = None; + } + (notes, true) +} + +/// The colors of `d` outside its art that [`convert_colors`] leaves, converted with `conv`: each +/// artboard's background, the transparency grid and simulated paper colors of Document Setup, and +/// the fill and stroke of the character and paragraph styles. +fn convert_setting_colors(d: &mut vectorcraft_doc::Document, conv: &dyn Fn(&Color) -> Color) { + for c in d.artboards.iter_mut().filter_map(|a| a.color.as_mut()) { + *c = conv(c); + } + for c in &mut d.setup.grid_colors { + *c = conv(c); + } + // A tint of a global swatch is the converted swatch's color at its tint, which + // [`convert_colors`] already gave it. + let bases = global_bases(d); + let mut f = |c: &Color, link: proof::Link| mode_color(c, link, &bases, conv); + for styles in [&mut d.char_styles, &mut d.para_styles] { + if !styles.iter().any(|s| s.attrs.contains_key("fill") || s.attrs.contains_key("stroke")) { + continue; + } + for def in styles.iter_mut() { + for key in ["fill", "stroke"] { + let Some(value) = def.attrs.get_mut(key) else { continue }; + let Ok(mut paint) = serde_json::from_value::(value.clone()) else { continue }; + map_paint_colors(&mut paint, &mut f); + if let Ok(v) = serde_json::to_value(&paint) { + *value = v; + } + } + } + } +} + /// [`proof::map_node_colors`] over `n`'s subtree, then [`map_more_colors`]. fn map_art_colors(n: &mut vectorcraft_doc::Node, f: &mut dyn FnMut(&Color, proof::Link) -> Color) { proof::map_node_colors(n, f); diff --git a/crates/engine/src/cmd/fileio/load.rs b/crates/engine/src/cmd/fileio/load.rs index 1a3c4c6e2c..4b28f5ca07 100644 --- a/crates/engine/src/cmd/fileio/load.rs +++ b/crates/engine/src/cmd/fileio/load.rs @@ -658,6 +658,17 @@ pub struct ReadFile { path: Option, /// What became of its linked files. links: Resolved, + /// Whether the color management policies changed the document ([`apply_policies`]). + policy_changed: bool, +} + +/// Edit › Color Settings: the color management policies keep, take off or convert from the +/// profiles the document `loaded` holds is tagged with, and their notes go to its warnings → +/// whether they changed the document. +fn apply_policies(loaded: &mut Loaded) -> bool { + let (notes, changed) = crate::cmd::colormgmt::apply_open_policies(&mut loaded.doc); + loaded.warnings.extend(notes); + changed } #[cfg(test)] @@ -678,19 +689,35 @@ impl ReadFile { /// ([`super::importer`]). pub fn read_for_open(name: &str, bytes: &[u8], path: Option, p: &Value, update_links: bool, low_res_proxy_eps: bool) -> Result { let opts = LoadOptions::from_params("document.open", p)?; - let mut loaded = match super::importer::pick(name, bytes, p)? { - Some(plugin) => super::importer::load(name, bytes, &plugin, p)?, - None => load_with(name, bytes, &opts)?, + let (mut loaded, policy_changed) = match super::importer::pick(name, bytes, p)? { + Some(plugin) => { + let mut loaded = super::importer::load(name, bytes, &plugin, p)?; + let changed = apply_policies(&mut loaded); + (loaded, changed) + } + None => { + // The color mode `p` asks for converts the colors after the policies did, through the + // profiles the document keeps. + let mut loaded = load_with(name, bytes, &LoadOptions { color_mode: None, ..opts.clone() })?; + let changed = apply_policies(&mut loaded); + if let Some(mode) = opts.color_mode.filter(|m| *m != loaded.doc.color_mode) { + let doc = &mut loaded.doc; + vectorcraft_color::cms::with_active(super::super::colormgmt::doc_cms(doc), || { + super::super::colormgmt::set_color_mode(doc, mode, true, None, opts.grays); + }); + } + (loaded, changed) + } }; let links = crate::cmd::links::resolve(&mut loaded.doc, crate::cmd::links::LinkBase::file(path.as_deref()), update_links, low_res_proxy_eps); Session::refresh_text_bounds(&mut loaded.doc); - Ok(ReadFile { loaded, opts, path, links }) + Ok(ReadFile { loaded, opts, path, links, policy_changed }) } /// The second half of [`open_bytes_with`]: open a file [`read_for_open`] read as the new active /// document → `document.open`'s result. pub fn open_read(s: &mut Session, file: ReadFile) -> Result { - open_loaded(s, file.loaded, file.links, file.path, &file.opts, false) + open_loaded(s, file.loaded, file.links, file.path, &file.opts, false, file.policy_changed) } /// File → New from Template: any readable file (at `path`, if it is one: its links are looked for @@ -702,14 +729,24 @@ pub fn open_template(s: &mut Session, name: &str, bytes: &[u8], path: Option<&st "only this Affinity file's embedded preview could be read: use File › Open to see it with its warning, or export SVG or PDF from Affinity first", )); } + let policy_changed = apply_policies(&mut loaded); let base = crate::cmd::links::LinkBase::file(path); let links = crate::cmd::links::resolve(&mut loaded.doc, base, s.prefs.update_links == "automatically", s.prefs.low_res_proxy_eps); - open_loaded(s, loaded, links, path.map(str::to_string), &LoadOptions::default(), true) + open_loaded(s, loaded, links, path.map(str::to_string), &LoadOptions::default(), true, policy_changed) } -/// Make a loaded file the new active document; `links` is what became of its linked files, and -/// `opts` are the options it was read with. -fn open_loaded(s: &mut Session, loaded: Loaded, links: Resolved, path: Option, opts: &LoadOptions, as_template: bool) -> Result { +/// Make a loaded file the new active document; `links` is what became of its linked files, `opts` +/// are the options it was read with, and `policy_changed` says whether the color management +/// policies changed it (it then opens with unsaved changes). +fn open_loaded( + s: &mut Session, + loaded: Loaded, + links: Resolved, + path: Option, + opts: &LoadOptions, + as_template: bool, + policy_changed: bool, +) -> Result { let Loaded { mut doc, format, warnings, restored, converted, native_pdf_compatible, .. } = loaded.with_grid_prefs(&s.prefs).with_unit_prefs(&s.prefs); // EPS now has an ordinary Save path. Its preview, partial-program and damaged-editing @@ -750,6 +787,9 @@ fn open_loaded(s: &mut Session, loaded: Loaded, links: Resolved, path: Option Result { let bytes = read_file(&path).map_err(|e| super::access::naming_in_error(e, &path))?; let Loaded { mut doc, native_pdf_compatible, .. } = load(&path, &bytes)?.with_grid_prefs(&s.prefs).with_unit_prefs(&s.prefs); doc.template = false; + // The color management policies apply as when the file is opened. + let (notes, policy_changed) = crate::cmd::colormgmt::apply_open_policies(&mut doc); // Back to the saved file: its recovery copy has nothing left to recover. let uid = s.doc()?.uid; crate::cmd::recovery::forget(s, uid); s.replace_document(index, doc); + if policy_changed { + s.doc_mut()?.mark_unsaved(); + } if let Some(pdf) = native_pdf_compatible { s.doc_mut()?.save_options.insert("pdfCompatible".into(), json!(pdf)); } - Ok(json!({ "path": path })) + let mut reply = json!({ "path": path }); + if !notes.is_empty() { + reply["warnings"] = json!(notes); + } + Ok(reply) } /// `file.formatOptions`: a writable format's options with the values Save would use. @@ -1352,7 +1361,7 @@ pub(super) fn specs() -> Vec { "Revert", ["File"], Some("F12"), - "{confirmed?: bool (the app's own: it asks first, then runs the command with it)} discard the changes: reload the saved file into the same tab (history cleared; the tab keeps its place and view). Saved, modified documents only; if the file can't be read the document is left as it is → {path}. The app asks first (a confirm dialog) unless confirmed: true", + "{confirmed?: bool (the app's own: it asks first, then runs the command with it)} discard the changes: reload the saved file into the same tab (history cleared; the tab keeps its place and view). Saved, modified documents only; if the file can't be read the document is left as it is → {path, warnings?: the notes of the color management policies of edit.colorSettings, which apply as at document.open}. The app asks first (a confirm dialog) unless confirmed: true", can_revert, revert ), diff --git a/crates/engine/tests/color_settings.rs b/crates/engine/tests/color_settings.rs index b02e34690b..988278b211 100644 --- a/crates/engine/tests/color_settings.rs +++ b/crates/engine/tests/color_settings.rs @@ -823,7 +823,13 @@ fn color_settings_come_back_in_the_next_session() { a.execute("edit.colorSettings", &json!({})).unwrap(); assert!(!file.exists(), "nothing to keep before the settings change"); a.execute("edit.colorSettings", &json!({"rgb": loaded, "cmyk": cms::DEVICE_CMYK, "intent": "perceptual", "bpc": false})).unwrap(); - let chosen = cms::ColorSettings { rgb: loaded.into(), cmyk: cms::DEVICE_CMYK.into(), intent: cms::Intent::Perceptual, bpc: false }; + let chosen = cms::ColorSettings { + rgb: loaded.into(), + cmyk: cms::DEVICE_CMYK.into(), + intent: cms::Intent::Perceptual, + bpc: false, + ..cms::ColorSettings::default() + }; assert_eq!(cms::active_settings(), chosen); // The next start begins with the defaults and without the loaded profile, which the profile @@ -865,3 +871,151 @@ fn saved_color_settings_that_cannot_be_used_leave_the_defaults() { assert!(!saved.bpc && saved.cmyk == cms::GENERIC_CMYK, "written over by the next change: {saved:?}"); } } + +/// Edit › Color Settings' color management policies decide what opening a document tagged with +/// profiles other than the working spaces does with them: Preserve Embedded Profiles keeps them, +/// Off and Preserve Numbers take them off and keep the color numbers, and Convert to Working Space +/// converts the colors into the working spaces, keeping how they look, and takes them off. A +/// document a policy changed opens with unsaved changes, and the open reply names each profile. +/// A profile that is the working space stays, and File › Revert applies the policies too. +#[test] +fn color_management_policies_keep_take_off_or_convert_a_tagged_profile() { + let _g = settings(); + let dir = fresh_dir("policies"); + let _reset = ColorSettingsReset { profile: None, paths: vec![dir.clone()] }; + std::fs::create_dir_all(&dir).unwrap(); + let tagged = dir.join("tagged.vectorcraft"); + let mut s = session(); + let (blue, ink) = (rect(&mut s, 0.0, 0.0, 10.0, 10.0), rect(&mut s, 20.0, 0.0, 10.0, 10.0)); + exec(&mut s, "paint.setFill", json!({"ids": [blue.0], "color": "#3366cc"})); + exec(&mut s, "paint.setFill", json!({"ids": [ink.0], "color": {"c": 20, "m": 40, "y": 60, "k": 10}})); + exec(&mut s, "edit.assignProfile", json!({"rgb": cms::WIDE_GAMUT_RGB, "cmyk": cms::DEVICE_CMYK})); + // An artboard background, a character style's fill and a freeform gradient swatch, colors + // outside the art. + let paper = vectorcraft_color::Color::Rgb { r: 0.9, g: 0.8, b: 0.6 }; + let free = rect(&mut s, 40.0, 0.0, 10.0, 10.0); + select(&mut s, &[free]); + exec(&mut s, "paint.setFill", json!({"gradient": {"kind": "freeform"}})); + exec(&mut s, "paint.freeform.setPoint", json!({"index": 0, "color": "#e6cc99", "stroke": false})); + { + let d = std::sync::Arc::make_mut(&mut s.doc_mut().unwrap().doc); + d.artboards[0].color = Some(paper); + let mut style = vectorcraft_doc::TextStyleDef { name: "Inked".into(), attrs: Default::default() }; + style.attrs.insert("fill".into(), serde_json::to_value(vectorcraft_color::Paint::solid(paper)).unwrap()); + d.char_styles.push(style); + let paint = d.node(free).unwrap().appearance.fill().unwrap().paint.clone(); + d.swatches.push(vectorcraft_color::Swatch { name: "Free".into(), paint, global: false, spot: false }); + } + exec(&mut s, "file.saveAs", json!({"path": tagged.to_str().unwrap()})); + let settings_colors = |s: &Session| { + let d = &s.doc().unwrap().doc; + let style = serde_json::from_value::(d.char_styles[0].attrs["fill"].clone()).unwrap(); + (d.artboards[0].color.unwrap(), style.color().unwrap()) + }; + // The first point of the freeform swatch and of the freeform fill. + let free_points = |s: &Session| { + let d = &s.doc().unwrap().doc; + let first = |p: &vectorcraft_color::Paint| match p { + vectorcraft_color::Paint::Gradient(g) => g.freeform.as_ref().map(|f| f.points[0].color), + _ => None, + }; + let swatch = d.swatches.iter().find(|w| w.name == "Free").and_then(|w| first(&w.paint)).unwrap(); + (swatch, first(&d.node(free).unwrap().appearance.fill().unwrap().paint).unwrap()) + }; + let (free0, _) = free_points(&s); + let fill = |s: &Session, id| s.doc().unwrap().doc.node(id).and_then(|n| n.appearance.fill()).and_then(|f| f.paint.color()).unwrap(); + let (blue0, ink0) = (fill(&s, blue), fill(&s, ink)); + let source = cms::for_document(Some(cms::WIDE_GAMUT_RGB), Some(cms::DEVICE_CMYK)); + let notes = |r: &serde_json::Value| r["warnings"].as_array().unwrap().iter().filter(|w| w.as_str().unwrap().contains("profile")).count(); + // A session that opened the file under the policies, and the open reply. + let open = |rgb: &str, cmyk: &str| { + let mut s = session(); + exec(&mut s, "edit.colorSettings", json!({"rgbPolicy": rgb, "cmykPolicy": cmyk})); + let r = exec(&mut s, "document.open", json!({"path": tagged.to_str().unwrap()})); + (r, s) + }; + + let (r, kept) = open("preserveEmbedded", "preserveEmbedded"); + assert_eq!(doc_profiles(&kept.doc().unwrap().doc), (Some(cms::WIDE_GAMUT_RGB.into()), Some(cms::DEVICE_CMYK.into()))); + assert_eq!((fill(&kept, blue), fill(&kept, ink), notes(&r)), (blue0, ink0, 0)); + assert!(!kept.doc().unwrap().is_dirty()); + + for (rgb, cmyk) in [("off", "off"), ("off", "preserveNumbers")] { + let (r, off) = open(rgb, cmyk); + assert_eq!(doc_profiles(&off.doc().unwrap().doc), (None, None), "{cmyk}"); + assert_eq!((fill(&off, blue), fill(&off, ink), notes(&r)), (blue0, ink0, 2), "{cmyk}: the numbers stay"); + assert!(off.doc().unwrap().is_dirty(), "{cmyk}: the document changed"); + } + + let (r, converted) = open("convert", "convert"); + assert_eq!(doc_profiles(&converted.doc().unwrap().doc), (None, None)); + assert_eq!(notes(&r), 2); + let working = cms::working(); + let (blue1, ink1) = (fill(&converted, blue), fill(&converted, ink)); + assert!(blue1 != blue0 && ink1 != ink0, "the numbers change: {blue1:?} {ink1:?}"); + assert!(cms::delta_e2000(source.lab(&blue0), working.lab(&blue1)) < 1.0, "{blue0:?} → {blue1:?}"); + assert!(cms::delta_e2000(source.lab(&ink0), working.lab(&ink1)) < 3.0, "{ink0:?} → {ink1:?}"); + assert!(converted.doc().unwrap().is_dirty()); + let (board, styled) = settings_colors(&converted); + assert_eq!(board, styled, "the artboard and the style convert alike"); + assert!(board != paper && cms::delta_e2000(source.lab(&paper), working.lab(&board)) < 1.0, "{paper:?} → {board:?}"); + assert_eq!(settings_colors(&kept), (paper, paper), "kept with the profile"); + let (swatch_point, fill_point) = free_points(&converted); + assert_eq!(swatch_point, fill_point, "the freeform swatch and fill convert alike"); + assert!(swatch_point != free0 && cms::delta_e2000(source.lab(&free0), working.lab(&swatch_point)) < 1.0, "{free0:?} → {swatch_point:?}"); + + // A color mode asked for on open converts the colors the policy converted, through the working + // spaces, also when the document in front draws through another profile. + let mut s2 = session(); + exec(&mut s2, "edit.assignProfile", json!({"rgb": cms::DISPLAY_P3})); + exec(&mut s2, "edit.colorSettings", json!({"rgbPolicy": "convert", "cmykPolicy": "convert"})); + exec(&mut s2, "document.open", json!({"path": tagged.to_str().unwrap(), "colorMode": "cmyk"})); + let intent = working.settings().intent; + let want = working.convert(&blue1, cms::Model::Cmyk, intent); + let got = fill(&s2, blue); + assert!(cms::delta_e2000(working.lab(&want), working.lab(&got)) < 0.01, "{want:?} vs {got:?}"); + + // A profile that is the working space is kept whatever the policy. + exec(&mut s, "edit.colorSettings", json!({"rgb": cms::WIDE_GAMUT_RGB})); + let (r, same) = open("off", "off"); + assert_eq!(doc_profiles(&same.doc().unwrap().doc), (Some(cms::WIDE_GAMUT_RGB.into()), None)); + assert_eq!(notes(&r), 1); + exec(&mut s, "edit.colorSettings", json!({"rgb": cms::SRGB})); + + // File › Revert reads the file again under the policies. + let (_, mut reverted) = open("preserveEmbedded", "preserveEmbedded"); + exec(&mut reverted, "paint.setFill", json!({"ids": [blue.0], "color": "#ff0000"})); + exec(&mut reverted, "edit.colorSettings", json!({"cmykPolicy": "preserveNumbers"})); + let r = exec(&mut reverted, "file.revert", json!({"confirmed": true})); + assert_eq!(doc_profiles(&reverted.doc().unwrap().doc), (Some(cms::WIDE_GAMUT_RGB.into()), None)); + assert_eq!((fill(&reverted, blue), notes(&r)), (blue0, 1)); +} + +/// The policies are checked, come back in the reply and in `Color Settings.json`, and a saved file +/// that gives the RGB policy Preserve Numbers, a CMYK policy only, leaves the defaults. +#[test] +fn color_management_policies_are_checked_and_kept() { + let _g = settings(); + let dir = fresh_dir("policies-kept"); + let _reset = ColorSettingsReset { profile: None, paths: vec![dir.clone()] }; + let file = dir.join("Color Settings.json"); + let mut s = session(); + s.attach_color_settings(file.clone()); + for bad in [json!({"rgbPolicy": "preserveNumbers"}), json!({"cmykPolicy": "keep"}), json!({"rgbPolicy": 1})] { + assert!(s.execute("edit.colorSettings", &bad).is_err(), "{bad}"); + } + assert!(!file.exists(), "a refused change keeps nothing"); + let r = exec(&mut s, "edit.colorSettings", json!({"rgbPolicy": "convert", "cmykPolicy": "preserveNumbers"})); + assert_eq!((r["rgbPolicy"].as_str(), r["cmykPolicy"].as_str()), (Some("convert"), Some("preserveNumbers"))); + let saved: cms::ColorSettings = serde_json::from_slice(&std::fs::read(&file).unwrap()).unwrap(); + assert_eq!((saved.rgb_policy, saved.cmyk_policy), (cms::Policy::Convert, cms::Policy::PreserveNumbers)); + cms::set_active(&cms::ColorSettings::default()).unwrap(); + std::fs::write( + &file, + json!({"rgb": cms::SRGB, "cmyk": cms::GENERIC_CMYK, "intent": "relative", "bpc": true, "rgbPolicy": "preserveNumbers"}).to_string(), + ) + .unwrap(); + let mut next = Session::new(); + next.attach_color_settings(file); + assert_eq!(cms::active_settings(), cms::ColorSettings::default()); +} diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 28e1f4b523..8d2498af3e 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -4987,6 +4987,11 @@ axis Both И двете @msg Imported library {name} Импортирана библиотека {name} RGB: RGB: CMYK: CMYK: + RGB Policy: Правило за RGB: + CMYK Policy: Правило за CMYK: + Preserve Embedded Profiles Запазване на вградените профили + Convert to Working Space Преобразуване в работното пространство + Preserve Numbers Запазване на числата Texture Текстура Craquelure… Кракелюр… Grain… Зърнистост… diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 7cf9916fd0..43cf138605 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -972,6 +972,11 @@ NTSC Colors NTSC boje RGB: RGB: CMYK: CMYK: + RGB Policy: RGB pravilo: + CMYK Policy: CMYK pravilo: + Preserve Embedded Profiles Zadrži ugrađene profile + Convert to Working Space Pretvori u radni prostor + Preserve Numbers Zadrži brojeve CMYK CMYK Texture Tekstura Craquelure… Krakelura… diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index c9f18653b4..fdc9056ad7 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -764,6 +764,11 @@ antiAlias Sharp Nítid CMYK Equivalents Equivalents CMYK CMYK profile in effect Perfil CMYK en vigor CMYK: CMYK: + RGB Policy: Política RGB: + CMYK Policy: Política CMYK: + Preserve Embedded Profiles Conserva els perfils incrustats + Convert to Working Space Converteix a l'espai de treball + Preserve Numbers Conserva els números Coarse Dots Punts gruixuts Collapse Panel Group Replega el grup de panells Collapse Panels to Icons Replega els panells a icones diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 1ffc7925ff..277336b9bf 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -991,6 +991,11 @@ NTSC Colors Barvy NTSC RGB: RGB: CMYK: CMYK: + RGB Policy: Zásada RGB: + CMYK Policy: Zásada CMYK: + Preserve Embedded Profiles Zachovat vložené profily + Convert to Working Space Převést do pracovního prostoru + Preserve Numbers Zachovat čísla CMYK CMYK Texture Textura Craquelure… Krakelování… diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 043fb6d76e..7dcb1001f8 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -914,6 +914,11 @@ NTSC Colors NTSC-farver RGB: RGB: CMYK: CMYK: + RGB Policy: RGB-politik: + CMYK Policy: CMYK-politik: + Preserve Embedded Profiles Bevar indlejrede profiler + Convert to Working Space Konverter til arbejdsfarverum + Preserve Numbers Bevar tal CMYK CMYK Texture Tekstur Craquelure… Krakelering… diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index a9a96c0ce7..ba276525f7 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5274,6 +5274,11 @@ theme Appearance Erscheinungsbild The key color becomes the stroke color. The other colors shift their hue by the same amount and keep their saturation and brightness. Die Hauptfarbe wird zur Konturfarbe. Die anderen Farben wandern ebenso weit um den Farbkreis wie die Hauptfarbe und behalten ihre Sättigung und Helligkeit. RGB: RGB: CMYK: CMYK: + RGB Policy: RGB-Richtlinie: + CMYK Policy: CMYK-Richtlinie: + Preserve Embedded Profiles Eingebettete Profile beibehalten + Convert to Working Space In Arbeitsfarbraum konvertieren + Preserve Numbers Werte beibehalten # PSD files. @msg not a PSD file keine PSD-Datei @msg Multichannel PSD files can't be read: save it in RGB, CMYK or Grayscale mode PSD-Dateien im Mehrkanalmodus können nicht gelesen werden: Speichern Sie die Datei im RGB-, CMYK- oder Graustufenmodus diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 90b7a0b4e5..ee7fee264c 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5239,6 +5239,11 @@ digits Malayalam Μαλαγιάλαμ @msg Imported library {name} Εισήχθη η βιβλιοθήκη {name} RGB: RGB: CMYK: CMYK: + RGB Policy: Πολιτική RGB: + CMYK Policy: Πολιτική CMYK: + Preserve Embedded Profiles Διατήρηση ενσωματωμένων προφίλ + Convert to Working Space Μετατροπή στον χώρο εργασίας + Preserve Numbers Διατήρηση αριθμών System Title Bar Γραμμή τίτλου συστήματος VectorCraft Title Bar on Every Desktop Γραμμή τίτλου του VectorCraft σε κάθε επιφάνεια εργασίας The VECTORCRAFT_TITLEBAR environment variable chooses the title bar while it is set. Όσο είναι ορισμένη, η μεταβλητή περιβάλλοντος VECTORCRAFT_TITLEBAR επιλέγει τη γραμμή τίτλου. diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 5fcc1a2f5c..5a61d59367 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5287,6 +5287,11 @@ axis Both Ambos @msg Imported library {name} Biblioteca {name} importada RGB: RGB: CMYK: CMYK: + RGB Policy: Norma RGB: + CMYK Policy: Norma CMYK: + Preserve Embedded Profiles Conservar perfiles incrustados + Convert to Working Space Convertir en espacio de trabajo + Preserve Numbers Conservar números Texture Textura Craquelure… Craquelado… Grain… Granulado… diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 8b2b690c80..97bf637c52 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -975,6 +975,11 @@ NTSC Colors NTSC-värit RGB: RGB: CMYK: CMYK: + RGB Policy: RGB-käytäntö: + CMYK Policy: CMYK-käytäntö: + Preserve Embedded Profiles Säilytä upotetut profiilit + Convert to Working Space Muunna työväriavaruuteen + Preserve Numbers Säilytä lukuarvot CMYK CMYK Texture Tekstuuri Craquelure… Krakelyyri… diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index fd43bff358..b7a1fc6a32 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5294,6 +5294,11 @@ axis Both Les deux @msg Imported library {name} Bibliothèque {name} importée RGB: RVB : CMYK: CMJN : + RGB Policy: Règle RVB : + CMYK Policy: Règle CMJN : + Preserve Embedded Profiles Conserver les profils incorporés + Convert to Working Space Convertir en espace de travail + Preserve Numbers Conserver les valeurs numériques Texture Texture Craquelure… Craquelure… Grain… Grain… diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index ab1ae3d432..667d276bed 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -471,6 +471,11 @@ CMYK Images CMYK ઇમેજ CMYK colours print with their own values; off, they go through the colour settings too. CMYK રંગો પોતાની કિંમતો સાથે છાપે છે; બંધ હોય ત્યારે તે રંગ સેટિંગમાંથી પણ પસાર થાય છે. CMYK: CMYK: + RGB Policy: RGB નીતિ: + CMYK Policy: CMYK નીતિ: + Preserve Embedded Profiles એમ્બેડ કરેલી પ્રોફાઇલ જાળવો + Convert to Working Space કાર્યકારી સ્પેસમાં રૂપાંતરિત કરો + Preserve Numbers સંખ્યાઓ જાળવો CSS Properties CSS ગુણધર્મો Calligraphic Brush કેલિગ્રાફિક બ્રશ Calligraphic Brush Options કેલિગ્રાફિક બ્રશ વિકલ્પો diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index bef5689fa5..aedaf8ddbc 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -884,6 +884,11 @@ antiAlias Sharp शार्प CMYK Images CMYK इमेज CMYK profile in effect इफ़ेक्ट में CMYK प्रोफ़ाइल CMYK: CMYK: + RGB Policy: RGB नीति: + CMYK Policy: CMYK नीति: + Preserve Embedded Profiles एम्बेड की गई प्रोफ़ाइल बनाए रखें + Convert to Working Space वर्किंग स्पेस में बदलें + Preserve Numbers संख्याएँ बनाए रखें Coarse Dots मोटे बिंदु Coincidence: संयोग: Collapse Panel Group पैनल समूह संक्षिप्त करें diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 8f531b4d8a..b044eb38ea 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -695,6 +695,11 @@ font-technology Variable Változó CMYK Equivalents CMYK-megfelelők CMYK profile in effect Érvényes CMYK-profil CMYK: CMYK: + RGB Policy: RGB-házirend: + CMYK Policy: CMYK-házirend: + Preserve Embedded Profiles Beágyazott profilok megtartása + Convert to Working Space Konvertálás a munkaszíntérbe + Preserve Numbers Számértékek megtartása Coarse Dots Durva pontok Collapse Panels to Icons Panelek ikonná csukása Collapse to Icons Ikonná csukás diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 8abbc41b00..35a927726d 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -914,6 +914,11 @@ NTSC Colors Warna NTSC RGB: RGB: CMYK: CMYK: + RGB Policy: Kebijakan RGB: + CMYK Policy: Kebijakan CMYK: + Preserve Embedded Profiles Pertahankan Profil Tersemat + Convert to Working Space Konversi ke Ruang Kerja + Preserve Numbers Pertahankan Angka CMYK CMYK Texture Tekstur Craquelure… Craquelure… diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index ef6e76cce3..4be170b11e 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5339,6 +5339,11 @@ axis Both Entrambi @msg Imported library {name} Libreria {name} importata RGB: RGB: CMYK: CMYK: + RGB Policy: Criterio RGB: + CMYK Policy: Criterio CMYK: + Preserve Embedded Profiles Mantieni profili incorporati + Convert to Working Space Converti nello spazio di lavoro + Preserve Numbers Mantieni valori numerici Texture Texture Craquelure… Craquelé… Grain… Granulosità… diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 4043f024f8..d26441b8ca 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5380,6 +5380,11 @@ swatch Bright Violet ビビッドバイオレット @msg Imported library {name} ライブラリ {name} を読み込みました RGB: RGB: CMYK: CMYK: + RGB Policy: RGB ポリシー: + CMYK Policy: CMYK ポリシー: + Preserve Embedded Profiles 埋め込まれたプロファイルを保持 + Convert to Working Space 作業用スペースに変換 + Preserve Numbers カラー値を保持 Texture テクスチャ Craquelure… クラッキング… Grain… 粒状… diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 9b46dcd7ec..1437e564a3 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -880,6 +880,11 @@ NTSC Colors NTSC ფერები RGB: RGB: CMYK: CMYK: + RGB Policy: RGB წესი: + CMYK Policy: CMYK წესი: + Preserve Embedded Profiles ჩაშენებული პროფილების შენარჩუნება + Convert to Working Space სამუშაო სივრცეში გადაყვანა + Preserve Numbers რიცხვების შენარჩუნება CMYK CMYK Texture ტექსტურა Craquelure… კრაკელიური… diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 34a56686fa..d2f496280b 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5307,6 +5307,11 @@ theme Appearance 외관 @msg Imported library {name} 라이브러리 {name}을(를) 가져왔습니다 RGB: RGB: CMYK: CMYK: + RGB Policy: RGB 정책: + CMYK Policy: CMYK 정책: + Preserve Embedded Profiles 포함된 프로필 유지 + Convert to Working Space 작업 공간으로 변환 + Preserve Numbers 숫자 유지 Texture 텍스처 Craquelure… 크랙… Grain… 그레인… diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 67cfffd967..f6a66b5564 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -1432,6 +1432,11 @@ NTSC Colors NTSC-kleuren RGB: RGB: CMYK: CMYK: + RGB Policy: RGB-beleid: + CMYK Policy: CMYK-beleid: + Preserve Embedded Profiles Ingesloten profielen behouden + Convert to Working Space Omzetten naar werkruimte + Preserve Numbers Waarden behouden CMYK CMYK Texture Textuur Craquelure… Craquelure… diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 191d0146fa..f167c200f0 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -932,6 +932,11 @@ NTSC Colors Kolory NTSC RGB: RGB: CMYK: CMYK: + RGB Policy: Zasada RGB: + CMYK Policy: Zasada CMYK: + Preserve Embedded Profiles Zachowaj osadzone profile + Convert to Working Space Konwertuj do przestrzeni roboczej + Preserve Numbers Zachowaj wartości liczbowe CMYK CMYK Texture Tekstura Craquelure… Spękania… diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index f52d729edd..c4fdce7bd1 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -3485,6 +3485,11 @@ imageTrace Outline Contorno NTSC Colors Cores NTSC RGB: RGB: CMYK: CMYK: + RGB Policy: Política RGB: + CMYK Policy: Política CMYK: + Preserve Embedded Profiles Preservar perfis incorporados + Convert to Working Space Converter para espaço de trabalho + Preserve Numbers Preservar números Texture Textura Craquelure… Craquelê… Grain… Granulação… diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 11a550881e..b4ddccd833 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5326,6 +5326,11 @@ axis Both Оба @msg Imported library {name} Импортирована библиотека {name} RGB: RGB: CMYK: CMYK: + RGB Policy: Правило RGB: + CMYK Policy: Правило CMYK: + Preserve Embedded Profiles Сохранять встроенные профили + Convert to Working Space Преобразовывать в рабочее пространство + Preserve Numbers Сохранять числа Texture Текстура Craquelure… Кракелюры… Grain… Зерно… diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 357609dc89..2389d8ba53 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5198,6 +5198,11 @@ axis Both Båda @msg Imported library {name} Importerade biblioteket {name} RGB: RGB: CMYK: CMYK: + RGB Policy: RGB-princip: + CMYK Policy: CMYK-princip: + Preserve Embedded Profiles Behåll inbäddade profiler + Convert to Working Space Konvertera till arbetsfärgrymd + Preserve Numbers Behåll värden Texture Textur Craquelure… Krakelering… Grain… Korn… diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 0dac2b58fd..359778502d 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5093,6 +5093,11 @@ axis Both Her İkisi @msg Imported library {name} İçe aktarılan kitaplık {name} RGB: RGB: CMYK: CMYK: + RGB Policy: RGB İlkesi: + CMYK Policy: CMYK İlkesi: + Preserve Embedded Profiles Gömülü Profilleri Koru + Convert to Working Space Çalışma Alanına Dönüştür + Preserve Numbers Sayıları Koru Texture Doku Craquelure… Küçük çatlak… Grain… Tahıl… diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 459e726af5..ea06f43bcc 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5323,6 +5323,11 @@ axis Both Обидві @msg Imported library {name} Імпортовано бібліотеку {name} RGB: RGB: CMYK: CMYK: + RGB Policy: Правило RGB: + CMYK Policy: Правило CMYK: + Preserve Embedded Profiles Зберігати вбудовані профілі + Convert to Working Space Перетворювати в робочий простір + Preserve Numbers Зберігати числа Texture Текстура Craquelure… Кракелюри… Grain… Зерно… diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 101174ad05..7400d9b219 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -607,6 +607,11 @@ font-technology Variable Biến thiên CMYK Equivalents Tương đương CMYK CMYK profile in effect Hồ sơ CMYK đang có hiệu lực CMYK: CMYK: + RGB Policy: Chính sách RGB: + CMYK Policy: Chính sách CMYK: + Preserve Embedded Profiles Giữ cấu hình nhúng + Convert to Working Space Chuyển sang không gian làm việc + Preserve Numbers Giữ giá trị số Coarse Dots Chấm thô Collapse Panels to Icons Thu gọn bảng thành biểu tượng Collapse to Icons Thu gọn thành biểu tượng diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index b3c6a4ddcb..199153051b 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5227,6 +5227,11 @@ imageTrace Outline 轮廓 None (Color Preview) 无 (颜色预览) Preserve 保留 CMYK: CMYK: + RGB Policy: RGB 策略: + CMYK Policy: CMYK 策略: + Preserve Embedded Profiles 保留嵌入的配置文件 + Convert to Working Space 转换为工作空间 + Preserve Numbers 保留数值 Art & Illustration 艺术和插画 Branding 品牌 Film & Video 影片和视频 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 7f0f53575e..bf2f2c5401 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5457,6 +5457,11 @@ axis Both 兩者 Interpolation 內插 RGB: RGB: CMYK: CMYK: + RGB Policy: RGB 原則: + CMYK Policy: CMYK 原則: + Preserve Embedded Profiles 保留內嵌描述檔 + Convert to Working Space 轉換為工作空間 + Preserve Numbers 保留數值 Texture 紋理 Craquelure… 龜裂紋… Grain… 顆粒… diff --git a/crates/ui-egui/src/panels/separations.rs b/crates/ui-egui/src/panels/separations.rs index 0cb6c726d4..6b7ce6b0e0 100644 --- a/crates/ui-egui/src/panels/separations.rs +++ b/crates/ui-egui/src/panels/separations.rs @@ -1,11 +1,12 @@ //! Separations Preview panel: process plates C/M/Y/K plus spot plates with eye toggles (one visible //! plate renders as greyscale ink coverage; Alt-click an eye to show only that plate), and the //! colour-management controls behind Edit → Color Settings… / Assign Profile… and View → Proof -//! Setup (working spaces, intent, black-point compensation, proof target, gamut check). +//! Setup (working spaces, color management policies, intent, black-point compensation, proof +//! target, gamut check). use egui::{Sense, Ui, vec2}; use serde_json::{Value, json}; -use vectorcraft_color::cms::{self, Intent, ProfileKind}; +use vectorcraft_color::cms::{self, Intent, Policy, ProfileKind}; use vectorcraft_render::proof; use crate::VectorcraftApp; @@ -100,7 +101,8 @@ fn settings_section(app: &mut VectorcraftApp, ui: &mut Ui) { } } -/// The section's rows: the RGB and CMYK working spaces, intent, black point compensation, Load +/// The section's rows: the RGB and CMYK working spaces, intent, black point compensation, the RGB +/// and CMYK color management policies, Load /// Profile… and Gamut Check, and the profile the active document is assigned. fn settings_rows(app: &mut VectorcraftApp, ui: &mut Ui) { let st = cms::working_settings(); @@ -127,6 +129,21 @@ fn settings_rows(app: &mut VectorcraftApp, ui: &mut Ui) { if widgets::check(ui, tl!("Use Black Point Compensation"), st.bpc, true) { run(app, "edit.colorSettings", json!({"bpc": !st.bpc})); } + // Color management policies: what opening a document does with a profile it is tagged with + // that is not the working space. + let policies: [(&str, &str, Policy, &[Policy]); 2] = + [("rgbPolicy", tl!("RGB Policy:"), st.rgb_policy, &Policy::RGB), ("cmykPolicy", tl!("CMYK Policy:"), st.cmyk_policy, &Policy::CMYK)]; + for (key, label, current, choices) in policies { + ui.horizontal(|ui| { + ui.label(label); + let labels: Vec<&str> = choices.iter().map(|p| policy_label(*p)).collect(); + if let Some(i) = widgets::dropdown_names(ui, key, policy_label(current), &labels, 210.0) + && let Some(p) = choices.get(i) + { + run(app, "edit.colorSettings", json!({ key: p.id() })); + } + }); + } ui.horizontal(|ui| { if widgets::flat_button(ui, tl!("Load Profile…"), 110.0).clicked() { // Its file dialog, shown off the UI thread, loads the profile when it answers. @@ -160,6 +177,16 @@ fn settings_rows(app: &mut VectorcraftApp, ui: &mut Ui) { } } +/// The name of color management policy `p` in the UI language. +fn policy_label(p: Policy) -> &'static str { + match p { + Policy::Off => tl!("Off"), + Policy::PreserveEmbedded => tl!("Preserve Embedded Profiles"), + Policy::Convert => tl!("Convert to Working Space"), + Policy::PreserveNumbers => tl!("Preserve Numbers"), + } +} + /// The status bar's line after Gamut Check finds `n` colors outside the CMYK gamut. pub(crate) fn gamut_check_status(n: usize) -> String { if n == 0 { diff --git a/docs/mcp.md b/docs/mcp.md index 5a5acfd66d..2830bfc44d 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1590,10 +1590,17 @@ preferences (the folder the desktop app uses, so both see the same ones; `VECTOR command, so `edit.colorSettings {"cmyk": "…"}` or a preset's output intent can name it in a later run. The copy is what counts: the original may move or be deleted. `color.removeProfile {name}` forgets a profile and its copy (not while it is a working space). -- **Color Settings** (`edit.colorSettings`): the RGB and CMYK working spaces, intent and black point - compensation go into `Color Settings.json` when they change, and are the active settings again at the next - start, after the profiles above are registered (#6335). Saved settings that name a profile that is no longer - there, or a damaged file, leave the defaults (logged), and the next change writes over the file. +- **Color Settings** (`edit.colorSettings`): the RGB and CMYK working spaces, intent, black point + compensation and color management policies go into `Color Settings.json` when they change, and are the active + settings again at the next start, after the profiles above are registered (#6335). Saved settings that name a + profile that is no longer there, or a damaged file, leave the defaults (logged), and the next change writes over + the file; settings saved without policies take the default, `preserveEmbedded`. `rgbPolicy` (`off`, + `preserveEmbedded`, `convert`) and `cmykPolicy` (the same and `preserveNumbers`) decide what `document.open` and + `file.revert` do with an RGB or CMYK profile the file is tagged with that is not the working space: keep it, take + it off and keep the color numbers (`off`, `preserveNumbers`), or convert the colors of that model into the working + space with the intent and take it off (`convert`; a profile that is not available stays). The reply's `warnings` + name each profile, and a document a policy changed opens with unsaved changes. A profile that is the working space + stays whatever the policy. `edit.assignProfile` tags the document only: colors show and convert through the profiles it assigns, and the working spaces and the file stay as they are. The profiles in use are those of the document in front, after `file.new`, `document.open`, `document.activate`, `file.close`, `file.revert`, `edit.undo`, `edit.redo` and a diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 3e29897763..bd53567172 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -741,6 +741,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Canvas through the display's profile on Windows and X11:** Preferences › Performance › Use Monitor Profile for Canvas (on by default) converts the canvas's art, artboard paper and transparency grid from sRGB into the ICC profile of the display that shows most of the main window, after any proof, as the help page describes the monitor's profile translating the document's colors for the monitor ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). Windows gives the display's default profile, and a display with Advanced Color on is left to Windows ([Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/wcs/advanced-color-icc-profiles)); X11 gives colord's profile for the output or the `_ICC_PROFILE` property. macOS converts the window itself, and a Wayland session stays sRGB. `ui.inspect` reports `displayProfile`. Tests in `color/src/cms/display.rs`, `ui-egui/src/display_profile.rs` and `canvas::tests::the_canvas_is_drawn_through_the_display_profile_while_the_preference_is_on`. - **Out-of-gamut warning after a profile change:** the out-of-gamut warning and its closest-color correction in the Color panel and Color Picker ([the help page](https://helpx.adobe.com/illustrator/using/adjusting-colors.html)) check the color against the document's assigned CMYK profile, else the working CMYK space, and update when Edit › Assign Profile… or Edit › Color Settings… changes that space or a loaded profile changes, without a change of color. Which CMYK space the warning uses is VectorCraft's own rule. Tests: `gamut_warning_follows_a_profile_change` and `gamut_warning_follows_a_profile_loaded_again` in `dialogs/color_picker/tests.rs`. - **Assign Profile and the working spaces:** Edit › Assign Profile… tags the document and leaves the working spaces of Edit › Color Settings… as they are, in Color Settings, the Separations panel and the settings saved for the next start. Colors show and convert through the profiles assigned; a change in Color Settings keeps the profiles the document in front is assigned in use, and removing an assigned profile in use puts the working space back in its place. The profiles in use follow the document in front: a new, opened or reverted document, a switch to another tab, a close, Undo and Redo of Assign Profile, a failed batch, each step of a batch, Export All Open and the update of placed documents put that document's profiles in use, and the working spaces where it is assigned none or no document is open. With Window › Arrange › Tile or floating document windows, each document behind the front one draws its art, paper and transparency grid through its own assigned profiles, and loading or removing a profile redraws the documents assigned it; placed documents inside it still draw through the front document's profiles. How documents behind the front one draw is VectorCraft's own rule. View › Proof Setup › Working CMYK simulates the working CMYK space of Color Settings in Proof Colors and Separations Preview, also in a document assigned another CMYK profile. Public references: [Changing the color profile for a document and About color working spaces](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) and [Soft-proof presets](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=134). Tests in `engine/tests/color_settings.rs`. +- **Color management policies:** Edit › Color Settings… (the Separations panel's Color Settings section and `edit.colorSettings`) has an RGB and a CMYK policy: Off, Preserve Embedded Profiles and Convert to Working Space, and Preserve Numbers for CMYK. Opening or reverting a document tagged with a profile other than the working space keeps it, takes it off with the color numbers kept, or converts that model's colors into the working space and takes it off. The policies are kept in `Color Settings.json`. Preserve Embedded Profiles as the default for both, and the per-model policy for a document tagged with both an RGB and a CMYK profile, are VectorCraft's own rules. Public reference: [Color management policy options](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf). Tests in `engine/tests/color_settings.rs` and `color/src/cms/tests.rs`. - **New Document's More Settings and Save Preset:** More Settings opens a pop-up over New Document with only Number of Artboards, the artboard layout, Change to Right-to-Left Layout, Spacing and Columns; Done, Escape or a click outside closes it and keeps the values. Save Preset turns the top of Preset Details into a Save Document Preset heading with the preset's name, Cancel and Save, and hides the document's name, Close and Create until the preset is saved or canceled; nothing in that mode creates a document. Save Preset's default name is the first "Preset N" no saved preset has. VectorCraft's own layout. Harness tests in `dialogs/new_document.rs` cover both. - **New Document profiles:** each built-in category's presets start documents from that category's profile, a native document holding the starting swatches, graphic styles, brushes, symbols and other assets, the ruler and Document Setup options and the print settings ([Create a custom new document profile](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/start-a-new-file/create-a-custom-new-document-profile.html)). New Document's Manage Profiles pop-up opens a profile to edit and resets one to the shipped profile (`file.newProfiles`, `file.newProfiles.edit`, `file.newProfiles.reset`; `file.new {profile}`). The profiles live in VectorCraft's own `New Document Profiles` folder next to the preferences; a profile that cannot be read or is larger than 64 MiB leaves the defaults and is reported. Tests: `tests::newdoc::an_edited_profile_starts_the_documents_of_its_category`, `the_profile_follows_the_preset_access_and_reset`, `profile_errors_name_the_file_by_its_name_outside_the_read_roots`, `a_damaged_or_oversized_profile_leaves_the_defaults_and_is_reported`, `profile_names_are_checked_and_editing_needs_the_folder`, `dialogs::new_document::tests::manage_profiles_edits_and_resets_the_profiles`. - **Control bar with the Artboard tool:** while the Artboard tool is in use, the Control bar shows the active artboard's controls in place of the object controls: Preset, Portrait and Landscape, New Artboard, Delete Artboard, the Name field, Artboard Options, Rearrange All Artboards, the Transform link, Move and Scale Artwork with Artboard and, while the bar has room, the reference point with X and Y, and W and H with the Constrain Width and Height Proportions link. Each runs the command its Properties or Transform panel counterpart runs (`artboard.setProps`, `artboard.new`, `artboard.delete`, `tool.options {tool: "artboard"}`), and the reference point is the one the Transform panel uses. In an 800-point window the controls up to the Transform link fit, Move and Scale Artwork with Artboard show as their boxes alone with their names in tooltips, and the link opens the Transform panel with the artboard's position and size. Pointer and key tests in `panels/artboards.rs` cover the controls, W about the reference point, the orientation and the name. Public reference: [Using multiple artboards](https://web.archive.org/web/20210925094818/https://helpx.adobe.com/illustrator/using/using-multiple-artboards.html) (archived copy). From ffe63354bc7e062e2b5f24dc66838ffed7b14d7e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 14:52:42 -0800 Subject: [PATCH 11/52] i18n: Danish rows for the composite font errors Danish joined the complete-message languages on main, so its catalog gets the 42 composite font error rows the other complete catalogs carry. --- crates/ui-egui/src/i18n/da.tsv | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index ca27bdd2f9..f71a172f0e 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -2164,6 +2164,48 @@ digits Malayalam Malayalam Composite Fonts Sammensatte skrifttyper Export Composite Fonts Eksportér sammensatte skrifttyper Import Composite Fonts Importér sammensatte skrifttyper +@msg each font must be {name, parts} hver skrifttype skal være {name, parts} +@msg unknown key `{k}`; a font takes name and parts ukendt nøgle `{k}`; en skrifttype tager name og parts +@msg each font needs a name hver skrifttype skal have et navn +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` kan ikke være navnet på en sammensat skrifttype (1 til {COMPOSITE_NAME_MAX} tegn, ingen kontroltegn) +@msg `{name}`: parts must be an object `{name}`: parts skal være et objekt +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: ukendt klasse `{k}`; klasserne er kanji, kana, punctuation, symbols, roman og numerals +@msg `{name}`: {_1} must be an object `{name}`: {_1} skal være et objekt +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: ukendt nøgle `{k}` i {_1} +@msg `{name}`: give the kanji part `{name}`: angiv delen kanji +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts et dokument har højst {COMPOSITE_FONTS_MAX} sammensatte skrifttyper +@msg two composite fonts are named `{_1}` to sammensatte skrifttyper hedder `{_1}` +@msg `{_1}` is the name of an installed font `{_1}` er navnet på en installeret skrifttype +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} er sat med `{font}`, en sammensat skrifttype +@msg give fonts: [{name, parts}…] angiv fonts: [{name, parts}…] +@msg path is empty path er tom +@msg fonts must be a list of composite fonts fonts skal være en liste med sammensatte skrifttyper +@msg names must be strings names skal være strenge +@msg no composite font named `{n}` ingen sammensat skrifttype hedder `{n}` +@msg names must be a list of names names skal være en liste med navne +@msg no composite fonts to export ingen sammensatte skrifttyper at eksportere +@msg not a composite fonts file: {e} ikke en fil med sammensatte skrifttyper: {e} +@msg not a composite fonts file: no compositeFonts list ikke en fil med sammensatte skrifttyper: ingen liste compositeFonts +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts filen indeholder mere end {COMPOSITE_FONTS_MAX} sammensatte skrifttyper +@msg the file is larger than 4 MB filen er større end 4 MB +@msg dataBase64 is not base64 dataBase64 er ikke base64 +@msg give one of path, data or dataBase64 angiv én af path, data eller dataBase64 +@msg the file holds no composite fonts filen indeholder ingen sammensatte skrifttyper +@msg the file holds two composite fonts named `{_1}` filen indeholder to sammensatte skrifttyper, der hedder `{_1}` +@msg `{_1}` can't name a composite font `{_1}` kan ikke være navnet på en sammensat skrifttype +@msg {k}: give a font {k}: angiv en skrifttype +@msg `{name}`: {k}: give a font `{name}`: {k}: angiv en skrifttype +@msg {k}: size must be {_1} to {_2}% {k}: size skal være {_1} til {_2}% +@msg `{name}`: {k}: size must be {_1} to {_2}% `{name}`: {k}: size skal være {_1} til {_2}% +@msg {k}: baseline must be {_1} to {_2}% {k}: baseline skal være {_1} til {_2}% +@msg `{name}`: {k}: baseline must be {_1} to {_2}% `{name}`: {k}: baseline skal være {_1} til {_2}% +@msg {k}: scale must be {_1} to {_2}% {k}: skaleringen skal være {_1} til {_2}% +@msg `{name}`: {k}: scale must be {_1} to {_2}% `{name}`: {k}: skaleringen skal være {_1} til {_2}% +@msg {k}: only kana, roman and numerals can be scaled {k}: kun kana, roman og numerals kan skaleres +@msg `{name}`: {k}: only kana, roman and numerals can be scaled `{name}`: {k}: kun kana, roman og numerals kan skaleres +@msg {k}: only kana can be scaled at the center {k}: kun kana kan skaleres fra midten +@msg `{name}`: {k}: only kana can be scaled at the center `{name}`: {k}: kun kana kan skaleres fra midten +@msg no composite font ingen sammensat skrifttype Delete Font Slet skrifttype Kanji Kanji Kana Kana From 4f60e14555395ed0cb49363b45c0563049b6e317 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 16:51:33 -0800 Subject: [PATCH 12/52] Selection: symbol instances are hit where their art draws past their box A click on a symbol instance hit only its art's geometric box, and a marquee touched only that box, so art that a clipping path's live geometry effects move past the box could be seen but not selected. - Outside its box, in Preview, a click hits an instance where its placed art hits (dynamic overrides and 9-slice placement included), and a marquee touches the placed art as it touches a group of that art. Outline view and layers with Preview off keep the box alone. - The quick reach of an instance takes in the regions of the clipping paths with live effects in its art, so the groups around it no longer cull those clicks. --- crates/doc/src/hit.rs | 184 ++++++++++++++++++++++++------------ crates/doc/src/hit/tests.rs | 88 +++++++++++++++++ crates/doc/src/node/ops.rs | 30 +++++- crates/doc/src/symbols.rs | 18 +++- docs/target-app-parity.md | 1 + 5 files changed, 256 insertions(+), 65 deletions(-) diff --git a/crates/doc/src/hit.rs b/crates/doc/src/hit.rs index 5885a0ff54..04b48634ed 100644 --- a/crates/doc/src/hit.rs +++ b/crates/doc/src/hit.rs @@ -504,7 +504,7 @@ fn object_hit(n: &Node, p: Point, opt: HitOptions, symbols: &SymbolBoxes, editab /// [`hit_test`] passing over the nodes `skip` names (and their contents), and with /// `editable_only` over the objects of layers and sublayers on a locked artboard, and over all of /// an isolated group on one ([`crate::LockedArtboards::holds`]). Symbol instances are measured by their art -/// ([`Node::geometric_bounds_with`]). +/// ([`Node::geometric_bounds_with`]), and are also hit outside that box where their art paints. fn hit_test_skipping(doc: &Document, p: Point, opt: HitOptions, skip: &dyn Fn(NodeId) -> bool, editable_only: bool) -> Option { let finish = |mut h: Hit| { h.contents_of = h.ancestry.iter().rev().copied().find(|a| doc.node(*a).is_some_and(edits_contents)); @@ -1055,9 +1055,17 @@ fn hit_leaf(n: &Node, p: Point, opt: HitOptions, symbols: &SymbolBoxes) -> Optio AppearanceItem::Fill(_) => (!opt.path_only && fill_contains(bp, *rule, p)).then_some(HitKind::Fill), }) } - NodeKind::Text(_) | NodeKind::PlacedDocument(_) | NodeKind::SymbolInstance { .. } => { + NodeKind::Text(_) | NodeKind::PlacedDocument(_) => { n.geometric_bounds_with(symbols).filter(|b| b.inflate(opt.tol, opt.tol).contains(p)).map(|_| HitKind::Bounds) } + // A symbol instance is hit within its bounds, and outside them where its art paints + // ([`instance_art_hit`]). + NodeKind::SymbolInstance { .. } => { + if n.geometric_bounds_with(symbols).is_some_and(|b| b.inflate(opt.tol, opt.tol).contains(p)) { + return Some(HitKind::Bounds); + } + instance_art_hit(n, p, opt, symbols) + } // A blend or an envelope is hit within its bounds, and outside them where its evaluated // art paints: a blend's keys and steps on a spine can reach past the keys and the spine, // and the strokes of an envelope's distorted contents past its bounds. @@ -1211,64 +1219,94 @@ fn moved(n: &Node, xf: vectorcraft_geom::Affine) -> Node { /// layer, is tested in outline ([`HitOptions::outline`]), as the canvas draws it. `None` when `inst` is not a symbol instance or /// no editable object of its art is under `p`. pub fn symbol_part_at(doc: &Document, inst: &Node, p: Point, opt: HitOptions) -> Option> { - struct Find<'a> { - art: &'a InstanceArt<'a>, - p: Point, - opt: HitOptions, - symbols: &'a SymbolBoxes<'a>, - } - impl Find<'_> { - fn hit(&self, n: &Node, whole: Option, opt: HitOptions) -> bool { - self.art.place(n, whole).is_some_and(|n| hit_any(&n, self.p, opt, self.symbols).is_some()) - } - fn skips_guide(&self, n: &Node) -> bool { - self.opt.skip_guides && matches!(n.kind, NodeKind::Path { guide: true, .. }) - } - /// `outline`: the view is in Outline, or a layer around `n` has Preview off. - fn find(&self, n: &Node, path: &mut Vec, whole: Option, outline: bool) -> bool { - if !n.visible || n.locked || n.is_template() || self.skips_guide(n) { - return false; - } - let outline = outline || previews_off(n); - let opt = HitOptions { outline, ..self.opt }; - let (NodeKind::Group { children, .. } | NodeKind::Layer { children, .. }) = &n.kind else { return self.hit(n, whole, opt) }; - if path.len() >= crate::symbol_overrides::MAX_PATH_DEPTH { - return self.hit(n, whole, opt); - } - let whole = self.art.whole(n, whole); - if n.clips() - && let Some(first) = children.first() - { - let Some(clip) = self.art.place_unclipped(first, whole) else { return false }; - if self.opt.clip_outlines && first.visible && !first.locked && !self.skips_guide(first) && clip_outline(&clip, self.p, opt).is_some() - { - path.push(0); - return true; - } - if !clip_contains(&clip, self.p, outline) { - return false; - } - } - for (i, c) in children.iter().enumerate().rev() { - // A Shaper group's original shapes are not drawn; symbol art has no isolation scope. - if shaper_hides(n, i, None) { - continue; - } - let Ok(i) = u32::try_from(i) else { continue }; - path.push(i); - if self.find(c, path, whole, outline) { - return true; - } - path.pop(); - } - false - } - } let art = InstanceArt::of(doc, inst)?; let symbols = doc.symbol_boxes(); let mut path = vec![]; let outline = opt.outline || below_preview_off(doc, inst, opt.scope); - Find { art: &art, p, opt, symbols: &symbols }.find(&art.art, &mut path, None, outline).then_some(path) + let find = FindPart { art: &art, p, opt, symbols: &symbols, whole_instance: false }; + find.find(&art.art, &mut path, None, outline).map(|_| path) +} + +/// The walk of a symbol instance's placed art that [`symbol_part_at`] and [`instance_art_hit`] make. +struct FindPart<'a> { + art: &'a InstanceArt<'a>, + p: Point, + opt: HitOptions, + symbols: &'a SymbolBoxes<'a>, + /// For [`instance_art_hit`]: locked and template objects of the art count, as the canvas draws + /// them, and clipping paths are not picked by their outline. + whole_instance: bool, +} + +impl FindPart<'_> { + fn hit(&self, n: &Node, whole: Option, opt: HitOptions) -> Option { + self.art.place(n, whole).and_then(|n| hit_any(&n, self.p, opt, self.symbols)) + } + + fn skips_guide(&self, n: &Node) -> bool { + self.opt.skip_guides && matches!(n.kind, NodeKind::Path { guide: true, .. }) + } + + /// What a click at `p` hits on object `n` of the art, with `path` the child indices that lead + /// to what it hits. `outline`: the view is in Outline, or a layer around `n` has Preview off. + fn find(&self, n: &Node, path: &mut Vec, whole: Option, outline: bool) -> Option { + if !n.visible || !self.whole_instance && (n.locked || n.is_template()) || self.skips_guide(n) { + return None; + } + let outline = outline || previews_off(n); + let opt = HitOptions { outline, ..self.opt }; + let (NodeKind::Group { children, .. } | NodeKind::Layer { children, .. }) = &n.kind else { return self.hit(n, whole, opt) }; + if path.len() >= crate::symbol_overrides::MAX_PATH_DEPTH { + return self.hit(n, whole, opt); + } + let whole = self.art.whole(n, whole); + if n.clips() + && let Some(first) = children.first() + { + let clip = self.art.place_unclipped(first, whole)?; + if !self.whole_instance + && self.opt.clip_outlines + && first.visible + && !first.locked + && !self.skips_guide(first) + && let Some(kind) = clip_outline(&clip, self.p, opt) + { + path.push(0); + return Some(kind); + } + if !clip_contains(&clip, self.p, outline) { + return None; + } + } + for (i, c) in children.iter().enumerate().rev() { + // A Shaper group's original shapes are not drawn; symbol art has no isolation scope. + if shaper_hides(n, i, None) { + continue; + } + let Ok(i) = u32::try_from(i) else { continue }; + path.push(i); + if let Some(kind) = self.find(c, path, whole, outline) { + return Some(kind); + } + path.pop(); + } + None + } +} + +/// What a click at `p` hits of symbol instance `n`'s art where the canvas draws it (`None` in +/// Outline, [`HitOptions::outline`]): its strokes, and the art that the live geometry effects of a +/// clipping path in it show past the art's box. `None` for an instance of a missing symbol, of a +/// symbol that holds an instance of itself or nests too deep ([`SymbolBoxes::art`]), and of art past +/// the 9-slice object limit ([`InstanceArt::of`]). +fn instance_art_hit(n: &Node, p: Point, opt: HitOptions, symbols: &SymbolBoxes) -> Option { + let NodeKind::SymbolInstance { symbol, .. } = &n.kind else { return None }; + if opt.outline || symbols.art(symbol).is_none() { + return None; + } + let art = InstanceArt::of(symbols.document(), n)?; + let opt = HitOptions { clip_outlines: false, ..opt }; + FindPart { art: &art, p, opt, symbols, whole_instance: true }.find(&art.art, &mut vec![], None, false) } /// Is `n` below a layer whose Preview is off, so that the canvas draws it in outline? As for clicks @@ -1435,7 +1473,8 @@ pub fn compound_part_at(n: &Node, p: Point, tol: f64) -> Option { /// Objects (children of layers, or of `scope` in isolation mode) touched by a marquee rect, leaving /// out those on a locked artboard ([`crate::LockedArtboards::holds_id`]). Symbol instances are measured -/// by their art ([`Node::geometric_bounds_with`]). The art of a clip group or of a layer with a +/// by their art ([`Node::geometric_bounds_with`]), and outside that box, except in outline, they are +/// touched where the live geometry effects of a clipping path in their art show it. The art of a clip group or of a layer with a /// clipping mask counts only when the marquee meets the region its clipping path clips to, and then /// only within that region's bounds. In isolation mode the clipping mask of the isolated container, /// or of the parent of the single object isolated, does not limit the marquee, as it does not limit @@ -1573,14 +1612,33 @@ fn marquee_with(doc: &Document, r: Rect, scope: Option, leaves: bool, wh } NodeKind::Compound { children, .. } => children.iter().any(|c| c.visible && touches(c, s, r, scope, whole_compounds, outline)), NodeKind::Repeat(spec) => spec.expand(Some(s.document())).iter().any(|copy| touches(copy, s, r, scope, whole_compounds, outline)), - // A box with no width or no height (an instance of a symbol that draws a straight - // line) is touched where the marquee crosses it. - _ => n.geometric_bounds_with(s).is_some_and(|b| { - let crosses = (b.width() == 0.0 || b.height() == 0.0) && b.x0 <= r.x1 && r.x0 <= b.x1 && b.y0 <= r.y1 && r.y0 <= b.y1; - b.intersect(r).area() > 0.0 || r.contains(b.origin()) || crosses - }), + // A symbol instance is touched by its box, and outside it where the live geometry + // effects of a clipping path in its art show the art. + NodeKind::SymbolInstance { .. } => box_touches(n, s, r) || !outline && instance_art_touches(n, s, r, whole_compounds), + _ => box_touches(n, s, r), } } + /// Does the marquee `r` touch the box of `n`? A box with no width or no height (an instance of + /// a symbol that draws a straight line) is touched where the marquee crosses it. + fn box_touches(n: &Node, s: &SymbolBoxes, r: Rect) -> bool { + n.geometric_bounds_with(s).is_some_and(|b| { + let crosses = (b.width() == 0.0 || b.height() == 0.0) && b.x0 <= r.x1 && r.x0 <= b.x1 && b.y0 <= r.y1 && r.y0 <= b.y1; + b.intersect(r).area() > 0.0 || r.contains(b.origin()) || crosses + }) + } + /// Does the marquee `r` touch the art of symbol instance `n` placed as the canvas draws it, as + /// it touches a group of that art? Only for art whose clipping paths have live geometry effects + /// ([`SymbolBoxes::art`]), and only when `r` meets the instance's reach + /// ([`Node::reach_bounds_with`]): elsewhere the art lies within the instance's box. + fn instance_art_touches(n: &Node, s: &SymbolBoxes, r: Rect, whole_compounds: bool) -> bool { + let NodeKind::SymbolInstance { symbol, .. } = &n.kind else { return false }; + let meets = |b: Rect| b.x0 <= r.x1 && r.x0 <= b.x1 && b.y0 <= r.y1 && r.y0 <= b.y1; + if s.art(symbol).is_none_or(|a| a.reshaped.is_none()) || !n.reach_bounds_with(s).is_some_and(meets) { + return false; + } + let Some(art) = InstanceArt::of(s.document(), n) else { return false }; + art.place(&art.art, None).is_some_and(|placed| placed.visible && touches(&placed, s, r, None, whole_compounds, false)) + } fn collect_leaves(n: &Node, s: &SymbolBoxes, r: Rect, scope: Option, whole_compounds: bool, outline: bool, out: &mut Vec) { match &n.kind { NodeKind::Layer { children, .. } | NodeKind::Group { children, .. } | NodeKind::Intertwine { children } => { diff --git a/crates/doc/src/hit/tests.rs b/crates/doc/src/hit/tests.rs index dde7365424..ffb32d851d 100644 --- a/crates/doc/src/hit/tests.rs +++ b/crates/doc/src/hit/tests.rs @@ -1852,6 +1852,94 @@ fn a_symbol_part_follows_the_region_its_clipping_layers_effects_give_it() { assert!(symbol_part_outline(&d, n, &[0, 1]).unwrap().elements().is_empty(), "nothing is drawn, so nothing is outlined"); } +/// A symbol instance whose art holds a clip group or a clipping layer with a live effect that moves +/// its clipping path is clicked, and touched by a marquee, where the moved region shows the art past +/// the art's box: inside a group, nested in another symbol's art, moved and scaled. In Outline view, +/// below a layer whose Preview is off, where the art is hidden and where no region is left, only the +/// box counts. +#[test] +fn a_symbol_instance_is_hit_where_a_moved_clipping_path_in_its_art_shows_the_art() { + use vectorcraft_geom::Affine; + set_clip_region(moved_clip_region); + // `effect` on the clipping path of a clip group (a clipping layer with `layer`), whose art is + // shown when `shown`; `xf` places the instance, which with `nest` shows a symbol whose art holds + // an instance of the clipped symbol. The instance is in a group: the group, the instance. + let build = |effect: &str, xf: Affine, nest: bool, shown: bool, layer: bool| { + let mut d = Document::new(600.0, 400.0); + let l = d.layers[0].id; + let (mut mask, mut art) = half_clipped(&mut d); + mask.appearance.effects.push(crate::Effect { id: effect.into(), ..test_move() }); + art.visible = shown; + let mut clip = if layer { + let mut layer = Node::layer(d.alloc_id(), "Masked", crate::LayerColor::Preset(2)); + if let NodeKind::Layer { children, .. } = &mut layer.kind { + *children = vec![Arc::new(mask), Arc::new(art)]; + } + layer + } else { + Node::group(d.alloc_id(), vec![Arc::new(mask), Arc::new(art)]) + }; + clip.set_clips(true); + let root = Node::group(d.alloc_id(), vec![Arc::new(clip)]); + d.symbols.push(crate::Symbol { dynamic: false, name: "Clipped".into(), art: Arc::new(root) }); + let mut symbol = "Clipped"; + if nest { + let inner = Node::new(d.alloc_id(), NodeKind::SymbolInstance { symbol: "Clipped".into(), xf: Affine::IDENTITY }); + let root = Node::group(d.alloc_id(), vec![Arc::new(inner)]); + d.symbols.push(crate::Symbol { dynamic: false, name: "Outer".into(), art: Arc::new(root) }); + symbol = "Outer"; + } + let (g, inst) = (d.alloc_id(), d.alloc_id()); + let instance = Node::new(inst, NodeKind::SymbolInstance { symbol: symbol.into(), xf }); + d.insert(Some(l), 0, Node::group(g, vec![Arc::new(instance)])).unwrap(); + (d, g, inst) + }; + let opt = HitOptions::default(); + let outline = HitOptions { outline: true, ..opt }; + let at = |d: &Document, x: f64, y: f64, opt: HitOptions| hit_test(d, Point::new(x, y), opt).map(|h| h.leaf); + // Across the art's top edge in the moved region, and past the art's right end. + let (edge, past) = (Rect::new(140.0, -5.0, 160.0, 5.0), Rect::new(240.0, -5.0, 260.0, 5.0)); + for layer in [false, true] { + let (d, g, inst) = build("test.move", Affine::IDENTITY, false, true, layer); + assert_eq!(at(&d, 150.0, 50.0, opt), Some(inst), "in the moved region, layer {layer}"); + assert_eq!(hit_test(&d, Point::new(150.0, 50.0), opt).map(|h| h.top_object(None)), Some(g)); + assert_eq!(at(&d, 50.0, 50.0, opt), Some(inst), "in the box"); + assert_eq!(at(&d, 250.0, 50.0, opt), None, "past the art"); + assert_eq!(at(&d, 150.0, 150.0, opt), None, "below the art"); + assert_eq!(at(&d, 150.0, 50.0, outline), None, "Outline view draws the plain clipping path"); + assert_eq!(marquee(&d, edge, None, false), [g], "layer {layer}"); + assert_eq!(marquee(&d, edge, None, true), [inst], "layer {layer}"); + assert!(marquee(&d, past, None, false).is_empty()); + assert!(marquee_in_view(&d, edge, None, false, true).is_empty(), "Outline view"); + } + // Preview off for the layer the instance is on. + let (mut d, _, _) = build("test.move", Affine::IDENTITY, false, true, false); + if let NodeKind::Layer { preview, .. } = &mut Arc::make_mut(&mut d.layers[0]).kind { + *preview = false; + } + assert_eq!(at(&d, 150.0, 50.0, opt), None, "Preview off"); + assert!(marquee(&d, edge, None, false).is_empty(), "Preview off"); + // Moved, scaled (the region moves 100 pt from the placed clipping path) and nested. + let (d, _, inst) = build("test.move", Affine::translate((10.0, 20.0)), false, true, false); + assert_eq!(at(&d, 160.0, 70.0, opt), Some(inst), "moved"); + let (d, _, inst) = build("test.move", Affine::scale(2.0), false, true, false); + assert_eq!(at(&d, 250.0, 100.0, opt), Some(inst), "scaled"); + assert_eq!(at(&d, 350.0, 100.0, opt), None, "scaled, past the region"); + let (d, g, inst) = build("test.move", Affine::IDENTITY, true, true, false); + assert_eq!(at(&d, 150.0, 50.0, opt), Some(inst), "nested"); + assert_eq!(marquee(&d, edge, None, false), [g], "nested"); + // Hidden art, and an effect that leaves no region: clicks find only the box. The marquee still + // touches the moved clipping path on the edge of its region, as in a clip group, unless no + // region is left. + for (effect, shown) in [("test.move", false), ("test.empty", true)] { + let (d, g, inst) = build(effect, Affine::IDENTITY, false, shown, false); + assert_eq!(at(&d, 150.0, 50.0, opt), None, "{effect}, shown {shown}"); + assert_eq!(at(&d, 50.0, 50.0, opt), Some(inst), "{effect}, shown {shown}: in the box"); + let touched: &[NodeId] = if shown { &[] } else { &[g] }; + assert_eq!(marquee(&d, edge, None, false), touched, "{effect}, shown {shown}"); + } +} + /// In a dynamic symbol's art that placing through its 9-slice guides could make more than /// [`crate::MAX_SYMBOL_NODES`] objects of, Direct Selection picks and outlines nothing, as the /// canvas draws nothing of it. At the art's natural size the same art is picked. diff --git a/crates/doc/src/node/ops.rs b/crates/doc/src/node/ops.rs index 1aad3a27cf..f7c8f87ded 100644 --- a/crates/doc/src/node/ops.rs +++ b/crates/doc/src/node/ops.rs @@ -228,7 +228,11 @@ impl Node { /// grown by the farthest a stroke in the art can reach. For an instance placed through 9-slice /// guides, that box also holds the art box placed by each cell's map /// ([`crate::NineSliceMap::placement_bounds`]). An instance whose art holds an instance of a - /// symbol with 9-slice guides at any depth is measured as its art placed by its transform. + /// symbol with 9-slice guides at any depth is measured as its art placed by its transform. An + /// instance whose art holds a clipping path with live geometry effects also takes in the region + /// they give it ([`crate::hit::set_clip_region`]): moved with the instance when it only moves its + /// art, otherwise placed by it and grown by as far as the region reaches past the art, times √2 + /// and the larger of 1 and the Frobenius norm of the transform's linear part. pub fn reach_bounds_with(&self, symbols: &SymbolBoxes) -> Option { symbols.quickly(|| self.reach(Some(symbols))) } @@ -268,6 +272,30 @@ impl Node { NodeKind::Layer { children, clip: true, .. } | NodeKind::Group { children, clip: true } => { vectorcraft_geom::union_opt(self.visual(symbols), children.first().and_then(|c| crate::hit::reshaped_clip_box(c))) } + // The live geometry effects of the clipping paths in the art can draw it past its box. + NodeKind::SymbolInstance { symbol, xf } => { + let Some((s, art, region)) = symbols.and_then(|s| { + let a = s.art(symbol)?; + Some((s, a, a.reshaped?)) + }) else { + return self.visual(symbols); + }; + let map = s.document().symbol_slice_map_of(symbol, art.geometric, *xf); + let placed = if moves_only(*xf) && map.is_none() { + xf.transform_rect_bbox(region) + } else { + // An effect can reach a fixed distance past the art or a distance in proportion + // to its size, as `SymbolBoxes::effects_reach` estimates it. + let g = art.geometric; + let all = region.union(g); + let past = [g.x0 - region.x0, region.x1 - g.x1, g.y0 - region.y0, region.y1 - g.y1].into_iter().fold(0.0_f64, f64::max); + let [a, b, c, d, _, _] = xf.as_coeffs(); + let grow = past * std::f64::consts::SQRT_2 * (a * a + b * b + c * c + d * d).sqrt().max(1.0); + map.map_or_else(|| xf.transform_rect_bbox(all), |m| m.placement_bounds(all)).inflate(grow, grow) + }; + let o = self.appearance.outset(); + vectorcraft_geom::union_opt(self.visual(symbols), self.projected(Some(placed)).map(|b| b.inflate(o, o))) + } _ => self.visual(symbols), } } diff --git a/crates/doc/src/symbols.rs b/crates/doc/src/symbols.rs index 944accfe4b..99a65ae1f7 100644 --- a/crates/doc/src/symbols.rs +++ b/crates/doc/src/symbols.rs @@ -47,6 +47,11 @@ pub(crate) struct ArtBox { /// Whether the art holds an instance of a symbol with 9-slice guides, or of a symbol whose art /// holds one at any depth. pub(crate) sliced: bool, + /// The box of the regions that the live geometry effects of the clipping paths in the art give + /// them ([`crate::hit::set_clip_region`]), and of the instances in the art whose art has such + /// regions, each measured by [`Node::reach_bounds_with`]. `None` when nothing in the art has + /// one. + pub(crate) reshaped: Option, } /// The art boxes of a document's symbols, which [`Node::geometric_bounds_with`], @@ -562,7 +567,18 @@ fn art_box(art: &Arc, symbols: &SymbolBoxes) -> Option { sliced |= symbols.doc.symbol_nine_slice(symbol).is_some() || symbols.art(symbol).is_some_and(|a| a.sliced); } }); - Some(ArtBox { geometric, visual, reach, effects, brush, sliced }) + let mut reshaped = None; + if effects { + art.walk(&mut |n| { + let b = match &n.kind { + NodeKind::SymbolInstance { symbol, .. } if symbols.art(symbol).is_some_and(|a| a.reshaped.is_some()) => n.reach(Some(symbols)), + _ if n.clips() => n.children().and_then(|c| c.first()).and_then(|c| crate::hit::reshaped_clip_box(c)), + _ => None, + }; + reshaped = vectorcraft_geom::union_opt(reshaped, b.filter(finite)); + }); + } + Some(ArtBox { geometric, visual, reach, effects, brush, sliced, reshaped }) } #[cfg(test)] diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index c6972468cc..525cac27e0 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -645,6 +645,7 @@ since 2026-10-01. - **Cut of picked anchors (#6361):** Edit › Cut removes direct-selected anchors from their path and from a compound path's member, with the segments attached to them, as Clear does. Picked segments still lose only those segments. When a path also has a picked segment, Cut removes and copies only its picked segments and ignores its picked anchors, on every contour, as Clear does; an anchor left without a surviving segment is removed with them. Regression tests: `cut_*_anchors_*` and `cut_of_an_anchor_with_a_segment_on_another_contour_leaves_the_source_as_clear_does` in `crates/engine/tests/it/copy_direct_selection.rs`. - **Escape in Selection tool drags:** Escape during a Selection tool move or Alt-drag copy, a bounding-box scale or rotation, a marquee, or a corner widget, pie widget or bracket drag cancels it: the art returns to its state at the press, no copy is left, no undo step is added, the release does nothing, and the tool stays chosen. This is VectorCraft's own behavior. Regression tests: `escape_cancels_*` in `select/tests.rs` and `pie.rs`, and `escape_cancels_a_selection_tool_move_copy_scale_or_rotation` in `tests/selectescape.rs`. - **Selection passes through raster effects:** clicks with the Selection, Direct Selection and Group Selection tools (Group Selection's repeated click included), the Selection tool's pointer and marquee, Direct Selection's marquee, pointer and anchor highlight, and Group Selection's marquee (E for enclosed objects included) leave out the area that a drop shadow, a glow, a blur or another raster effect paints beyond an object. A click on a shadow selects the object under it, or nothing over an empty canvas, a repeated Group Selection click there adds the groups of the object under it, and a press on the shadow of a selected object does not move it ([the help page](https://helpx.adobe.com/illustrator/using/selecting-objects.html)). Over a shadow, Direct Selection highlights only the anchors of the object under it, and Group Selection keeps its own pointer and highlights no anchor, as it does everywhere (VectorCraft's own rule). No setting changes this. This covers paths, groups, type, symbol instances and images. Regression tests: `crates/engine/src/tests/select_effects.rs`. +- **Symbol instances are selected where their art draws past their box:** a click or a marquee selects a symbol instance where a clipping path in its art, moved or reshaped by its live geometry effects, shows the art past the instance's box, as it selects a group of the same art; a click also selects it where a stroke in its art paints past the box ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects.html)). The rest is VectorCraft's own rule: inside the box the instance is selected as before; in Outline view and below a layer whose Preview is off only the box counts; hidden art and the area a raster effect paints are left out. This covers instances in groups, nested in other symbols' art, moved and scaled. Regression test: `a_symbol_instance_is_hit_where_a_moved_clipping_path_in_its_art_shows_the_art` in `crates/doc/src/hit/tests.rs`. - **Global Edit: Shift-click leaves a match out:** while Global Edit is on, a Shift-click with the Selection tool on a highlighted match, or on an object inside a matched group, leaves that match out (`select.globalEditExclude`): it is no longer highlighted and later edits leave it as it is; the object the edit started from stays, and Global Edit ends when fewer than two matches are left ([Update assets quickly with Global Edit](https://helpx.adobe.com/ph_fil/illustrator/how-to/global-editing-sensei.html)). Regression tests: `a_shift_click_*`, `an_object_left_out_*`, `a_group_left_out_*` and `leaving_out_all_but_one_*` in `crates/engine/src/tests/globaledit.rs`. - **Global Edit leaves out groups holding type or images:** Select › Start Global Edit on a group that holds type or an image, at any depth, refuses to start, and such a group is not taken as a match, as Global Edit does not take images or text ([Edit similar objects globally](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)). Regression test for a group holding type: `global_edit_needs_one_supported_object` in `crates/engine/src/tests/globaledit.rs`. - **Global Edit Options in the Control bar:** while Select › Start Global Edit can run, the Control bar shows a Global Edit Options dropdown that opens the same options as the Properties panel's (Match: Appearance, Size; On Artboards; Include Objects On Canvas; Result(s)); both set the same options. The dropdown is off while Global Edit is on; it sits after Recolor Artwork, ahead of the X/Y/W/H fields ([Edit similar objects globally](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)). Regression test: `the_control_bar_shows_the_global_edit_options` in `crates/ui-egui/src/chrome/tests.rs`. From cb5b3e92fdc7c81e6349da86ee9b951651085a7b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 17:24:52 -0800 Subject: [PATCH 13/52] Legacy .ai: a colorized warped image works out its coverage once Each piece of a colorized image cut by a Warp effect or an envelope decoded the image again to work out how much of the color each pixel shows, although the decoded image was already kept for the pieces that follow one another. The writer now keeps the coverage next to the decoded image, for the same data and type, and works it out again only when the image changes. The file written is unchanged. --- crates/eps/src/legacy_ai/tests.rs | 35 ++++++++++++++++++++++++++++++ crates/eps/src/legacy_ai/writer.rs | 32 ++++++++++++++++++++++++++- docs/target-app-parity.md | 1 + 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/crates/eps/src/legacy_ai/tests.rs b/crates/eps/src/legacy_ai/tests.rs index ad27eb4a03..15808c1798 100644 --- a/crates/eps/src/legacy_ai/tests.rs +++ b/crates/eps/src/legacy_ai/tests.rs @@ -790,6 +790,41 @@ fn colorized_images_keep_their_color() { assert_eq!(out.warnings, [IMAGE_ALPHA]); } +/// The pieces of a colorized warped image work out the image's coverage once, and an image with +/// other data works out its own: a black and white image's pieces are written as image masks +/// in its color, and a gray image's pieces with its color in their pixels. +#[test] +fn the_pieces_of_a_colorized_warped_image_work_out_its_coverage_once() { + // GUARDS: each piece of a colorized warped image decoded the image again for its coverage. + let mut doc = Document::new(400.0, 200.0); + doc.layers.clear(); + let layer = doc.add_layer(Some("Art")); + let paint = Paint::solid(Color::cmyk(0.0, 0.5, 1.0, 0.0)); + let checks: Vec = (0..16 * 16).map(|i| if (i % 16 + i / 16) % 2 == 0 { 0 } else { 255 }).collect(); + let ramp: Vec = (0..16 * 16).map(|i| (i % 16 * 16) as u8).collect(); + for (gray, x) in [(checks, 10.0), (ramp, 210.0)] { + let photo = colorized_image(&mut doc, (16, 16), gray, &paint, (x, 10.0)); + let NodeKind::Image(im) = &photo.kind else { panic!("{:?}", photo.kind) }; + let bend = move |p: vectorcraft_geom::Point| vectorcraft_geom::Point::new(p.x, p.y + 8.0 * ((p.x - x) / 160.0 * std::f64::consts::PI).sin()); + let warped = vectorcraft_doc::live::mesh_warp_image(&photo, im, &bend, 4, false, false); + doc.insert(Some(layer), usize::MAX, warped).unwrap(); + } + super::writer::COVERAGE_RUNS.with(|n| n.set(0)); + let out = write(&doc); + assert_eq!(super::writer::COVERAGE_RUNS.with(std::cell::Cell::get), 2, "once for each image"); + let text = String::from_utf8(out.bytes).unwrap(); + let images = rasters(&text); + assert_eq!(images.len(), 64, "32 pieces of each image"); + let xi = |piece: &Vec<&str>| piece.iter().find(|l| l.ends_with(" XI")).map(|l| l.to_string()).unwrap_or_default(); + assert!(images[..32].iter().all(|p| xi(p).ends_with(" 1 1 0 0 0 1 XI")), "{:?}", images[..32].iter().map(xi).collect::>()); + assert!(images[32..].iter().all(|p| xi(p).ends_with(" 8 3 0 0 0 0 XI")), "{:?}", images[32..].iter().map(xi).collect::>()); + // The first piece holds the whole image: each row of 16 pixels in two bytes, its black pixels 0 bits. + assert!(xi(&images[0]).ends_with(" ] 0 0 16 16 16 16 1 1 0 0 0 1 XI"), "{}", xi(&images[0])); + let data: Vec<&str> = images[0].iter().filter_map(|l| l.strip_prefix('%')).filter(|l| l.bytes().all(|b| b.is_ascii_hexdigit())).collect(); + assert_eq!(data.concat(), "5555AAAA".repeat(8)); + assert_eq!(out.warnings, [IMAGE_ALPHA]); +} + /// An image mask is only for a colorized image the writer draws as the document does: not one /// with an opacity mask turned on, and not one with more pixels than the writer writes. #[test] diff --git a/crates/eps/src/legacy_ai/writer.rs b/crates/eps/src/legacy_ai/writer.rs index 0b41c3defa..bd45fa3320 100644 --- a/crates/eps/src/legacy_ai/writer.rs +++ b/crates/eps/src/legacy_ai/writer.rs @@ -11,6 +11,15 @@ use super::{ }; use super::{CONIC, CONIC_WEDGES, DIAMOND, GRAPHS, HUE_STOPS, SPREAD, SPREAD_CAPPED}; +#[cfg(test)] +thread_local! { + /// How many times [`Writer::coverage`] has worked out an image's coverage on this thread. + pub(super) static COVERAGE_RUNS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// An image's coverage ([`ImageBlob::coverage`]): its width, its height and one byte a pixel. +type Coverage = (u32, u32, Arc>); + pub(super) struct Writer<'a> { doc: &'a Document, /// The document → art space. @@ -50,6 +59,9 @@ pub(super) struct Writer<'a> { /// The image decoded last (`None` when it can't be): the pieces of a warped image, which follow /// one another, decode it once. last_image: Option<(ImageBlob, Option>)>, + /// The coverage of [`Self::last_image`] once a colorized piece of it asked for it (`Some(None)` + /// when it can't be worked out), so the pieces of a colorized warped image work it out once. + last_coverage: Option>, /// The images written whole so far, by the address of their data (which each entry keeps). whole_images: std::collections::HashMap>>, } @@ -77,6 +89,7 @@ impl<'a> Writer<'a> { kumi: false, clips: vec![], last_image: None, + last_coverage: None, whole_images: std::collections::HashMap::new(), } } @@ -1074,7 +1087,7 @@ impl<'a> Writer<'a> { let fit = Affine::scale_non_uniform(f64::from(width.max(1)) / f64::from(w), f64::from(height.max(1)) / f64::from(h)); let coverage = match colorize { Some(paint) => { - let Some((_, _, coverage)) = ImageBlob::coverage(blob).filter(|(cw, ch, _)| (*cw, *ch) == (w, h)) else { + let Some((_, _, coverage)) = self.coverage(blob).filter(|(cw, ch, _)| (*cw, *ch) == (w, h)) else { self.warn(UNDECODED); return; }; @@ -1142,9 +1155,26 @@ impl<'a> Writer<'a> { } let img = image::load_from_memory(&blob.bytes).ok().map(Arc::new); self.last_image = Some((blob.clone(), img.clone())); + self.last_coverage = None; img } + /// The coverage of `blob` ([`ImageBlob::coverage`]), worked out once for images that follow one + /// another with the same data, as [`Self::decoded`] decodes them. + fn coverage(&mut self, blob: &ImageBlob) -> Option { + let last = self.last_image.as_ref().is_some_and(|(last, _)| Arc::ptr_eq(&last.bytes, &blob.bytes) && last.mime == blob.mime); + if last && let Some(coverage) = &self.last_coverage { + return coverage.clone(); + } + #[cfg(test)] + COVERAGE_RUNS.with(|n| n.set(n.get() + 1)); + let coverage = ImageBlob::coverage(blob).map(|(w, h, c)| (w, h, Arc::new(c))); + if last { + self.last_coverage = Some(coverage.clone()); + } + coverage + } + /// An image's lines (§8.4): `%AI5_File:`, `%AI5_BeginRaster`, matrix `m` as `[ a b c d tx ty ]` /// and the numbers `operands` with `XI`, `samples` in hex on comment lines of [`HEX_LINE`] /// digits, `%AI5_EndRaster`, then `F`. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index c6972468cc..70731c1a4f 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -633,6 +633,7 @@ since 2026-10-01. - **`.ai` files keep a linked image's Warp live and its link:** a linked image whose appearance is one Warp effect, with no opacity mask, is saved to the `.ai` editing data with an art style of that Warp, as an embedded one is: its bent pieces are its drawn look, and the image itself follows on `%_` lines as a placed file with its path, its folder relative to the document's and its preview. Before, it was saved as its drawn art and its live Warp was lost. Opening the file reads it as the linked image with its Warp live, its link, pixels, placement, name, opacity, hide and lock kept, under the same drawn-look comparison; a hidden image with a Warp, embedded or linked, is now compared with its look drawn shown, and keeps its Warp too. A linked image with a Warp in an opacity mask's art keeps its Warp and is embedded, with the existing warning for linked images in masks. Linked files stay connected to their source and track it by relative path ([the help page](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/manage-linked-and-embedded-files/links-panel-overview.html)); the placed-file form is the one the `.ai` reader reads (`crates/eps/src/import/ai/read/art.rs` `end_place`). eps `ai_editing::tests::a_linked_image_with_a_warp_reads_back_linked_with_its_warp_live`, `a_large_linked_image_with_a_warp_reads_back_from_its_preview`, `a_hidden_or_locked_image_with_a_warp_keeps_its_state`, `a_linked_image_with_a_warp_in_a_mask_is_embedded_with_its_warp_live`. Scores and hours unchanged. - **EPS writes a repeated image's samples once:** an image drawn more than once in an EPS file (the pieces of an envelope or a Warp effect, copies of one image, or one image in a symbol's instances) has its compressed samples written once in the setup, and each placement reads them from there: a reusable stream rewound for each placement at Language Level 3 ([PostScript Language Reference, 3rd ed., §3.13](https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf)), and an array of strings of at most 49,152 bytes fed to the image by a procedure at Level 2. An image drawn once is written where it is drawn, as before. The 256 MB limit on the page counts the samples once, so an envelope of a large photo no longer loses pieces to it. A colorized image is reused per ink (eps `tests::an_image_placed_twice_writes_its_samples_once_at_both_levels`, `tests::an_envelopes_image_pieces_draw_one_copy_of_its_samples`, `tests::each_ink_of_a_colorized_image_placed_twice_is_written_once`, `tests::samples_longer_than_a_string_are_reused_at_both_levels`, `tests::the_page_limit_counts_a_repeated_images_samples_once`). Scores and hours unchanged. - **`.ai` files write a warped image's pieces as the parts they show:** in the `.ai` editing data and in legacy `.ai` files, an embedded image cut to a clipping path (in the editing data, also an image under an opacity mask that clips) is written with all of its pixels the first time, and every later copy of the same pixels is written as the rectangle of them that the path or mask shows, 2 pixels more on each side, placed where it lies in the image. The pieces of a Warp effect, an envelope or their expanded art, 200 copies of the image for 10 × 10 cells before, now hold about 7 times the image's pixels in all for a 64 × 64 image. A copy whose opacity mask is left out, nested too deep or past the object limit, keeps all of its pixels. Each image's pixels are read once for the pieces that follow one another. An image cut to a rectangle of half its pixels or more, and the first copy written, keep all of their pixels. The `XI` operator's arguments give an image's location and size ([AI file-format specification, §8.1](https://web.archive.org/web/20050126105313/https://partners.adobe.com/public/developer/en/illustrator/sdk/AI7FileFormat.pdf)); the 2-pixel margin and the half-the-pixels limit are VectorCraft's own rules (eps `ai_editing::tests::the_pieces_of_a_warped_image_are_written_as_the_parts_they_show`, `masked_pieces_of_a_warped_image_are_written_as_the_parts_they_show`, `an_image_with_a_live_warp_writes_its_pixels_whole_once`, `a_clipped_image_written_first_keeps_all_of_its_pixels`, `a_masked_copy_whose_mask_is_left_out_keeps_all_of_its_pixels`, `a_masked_copy_nested_too_deep_for_its_mask_keeps_all_of_its_pixels`, `legacy_ai::tests::the_pieces_of_a_warped_image_are_written_as_the_parts_they_show`). Scores and hours unchanged. +- **Legacy `.ai` files work out a colorized warped image's coverage once:** for the pieces of a colorized image cut by a Warp effect, an envelope or their expanded art, a legacy `.ai` save works out how much of the color each pixel shows once for the pieces that follow one another, and no longer decodes the image again for each piece. The file written is unchanged (eps `legacy_ai::tests::the_pieces_of_a_colorized_warped_image_work_out_its_coverage_once`). Scores and hours unchanged. - **EPS writes a repeated freeform gradient's image once:** a freeform gradient whose image samples the same on more than one fill (copies of a shape moved with their points, or one shape in a symbol's instances) has its samples written once in the setup, as a repeated image's are, and a fill whose image differs (other colors, another size) gets its own. A freeform fill drawn once is written where it is drawn, as before, and a fill whose placement cannot be drawn, or that arrives when the page is already at the 256 MB limit, is no longer sampled first (eps `tests::a_freeform_gradients_image_drawn_twice_writes_its_samples_once`, `tests::freeform_gradients_sampled_differently_dont_share_an_image`, `tests::a_field_taken_back_at_the_page_limit_leaves_no_image_behind`). Scores and hours unchanged. - **PDF writes a warped image once:** with downsampling on, the pieces of an image bent by a Warp effect are resampled for the widest and the highest size any piece places the image at, so every piece paints one image XObject (a colorized image: one colorized image and its soft mask), instead of one image for each size a piece is placed at. Another placement of the same image is still resampled for its own size. Without downsampling, a colorized image and a CMYK image with a grayscale image mask on its grid are decoded and encoded once for all the sizes they are placed at (pdf `tests::compression::a_warped_image_is_written_once_for_all_its_pieces`, `tests::colorize::a_colorized_warped_image_is_written_once_for_all_its_pieces`, `export::images::tests::colorized_and_grid_masked_images_are_made_once_for_every_size_without_downsampling`). Scores and hours unchanged. - **Distort Appearance with Transform effect options:** with Envelope Options › Distort Appearance on, a path whose Transform effect has Scale Strokes & Effects or Transform Patterns on, or copies it with a gradient, is bent as the same per-copy art it draws and expands as outside the envelope: each copy's own stroke weight, dashes, pattern placement and gradient (effects `bake::tests`). Scores and hours unchanged. From ba567301238412764caaaecf3bf44e732d2b62aa Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 17:34:27 -0800 Subject: [PATCH 14/52] .ai editing data: opacity mask art in symbols and pattern tiles keeps live effects Objects in an opacity mask's art inside a symbol definition or a pattern tile are now written with their art styles, as mask art on the layers already is. A symbol or pattern whose mask art has Offset Path opens with the effect live in its definition, and its instances and pattern fills draw as before. Each definition is written with the styled objects of its own masks only, so art placed as copies inside it is not matched to another definition's original. - Mask art linked to a graphic style opens linked to it: the reader's style linking now goes into opacity masks' art. - Links in pattern tiles count toward the lost-link warning, the warning is checked after unused symbols and swatch-only patterns are written, and links in art left out at the object limit are no longer counted as kept. --- crates/eps/src/ai_editing.rs | 11 +- crates/eps/src/ai_editing/tests.rs | 289 ++++++++++++++++++++ crates/eps/src/ai_editing/writer.rs | 33 ++- crates/eps/src/ai_editing/writer/paints.rs | 12 +- crates/eps/src/ai_editing/writer/styles.rs | 42 ++- crates/eps/src/ai_editing/writer/symbols.rs | 3 + crates/eps/src/import/ai/read/document.rs | 10 +- docs/file-format-parity.md | 6 +- docs/target-app-parity.md | 1 + 9 files changed, 382 insertions(+), 25 deletions(-) diff --git a/crates/eps/src/ai_editing.rs b/crates/eps/src/ai_editing.rs index 3df902b97f..f6196165c2 100644 --- a/crates/eps/src/ai_editing.rs +++ b/crates/eps/src/ai_editing.rs @@ -270,6 +270,7 @@ fn export_within(doc: &Document, o: &AiEditingOptions, max_objects: usize) -> Re // The objects that may keep their effects in an art style, as they are before baking (not on // a large canvas, whose scale the styles' strokes and effects would need). let styled = writer::styled_objects(doc); + let (symbol_styled, pattern_styled) = writer::styled_definitions(doc); let own_styles = doc.graphic_styles != Document::new(1.0, 1.0).graphic_styles; let links = writer::style_links(doc); // Live geometry effects as their result, as the PDF part draws them. @@ -307,16 +308,14 @@ fn export_within(doc: &Document, o: &AiEditingOptions, max_objects: usize) -> Re w.reserve_swatch_gradients(); if scale == 1.0 { w.styled = styled; + (w.symbol_styled, w.pattern_styled) = (symbol_styled, pattern_styled); w.panel_styles(); - } else if !styled.is_empty() || own_styles || links > 0 { + } else if !styled.is_empty() || !symbol_styled.is_empty() || !pattern_styled.is_empty() || own_styles || links > 0 { w.warnings.push(writer::LARGE_CANVAS_STYLES.to_string()); } for layer in &doc.layers { w.layer(layer); } - if scale == 1.0 { - w.lost_links(links); - } // The symbols no instance uses too; their art adds definitions. w.symbols(); // The brushes, once the layers have said whether an object is written with one. @@ -324,6 +323,10 @@ fn export_within(doc: &Document, o: &AiEditingOptions, max_objects: usize) -> Re // The palette first: its gradient and pattern swatches add definitions. let mut palette = String::new(); w.palette(&mut palette); + // Once every definition is written: their opacity masks' art keeps links too. + if scale == 1.0 { + w.lost_links(links); + } let library = w.variable_library(); let first = to_art.transform_rect_bbox(board); let art = doc diff --git a/crates/eps/src/ai_editing/tests.rs b/crates/eps/src/ai_editing/tests.rs index a01f631638..7bbf761927 100644 --- a/crates/eps/src/ai_editing/tests.rs +++ b/crates/eps/src/ai_editing/tests.rs @@ -6751,6 +6751,159 @@ fn hidden_and_nested_mask_art_keep_live_offset_path() { } } +/// An image 60 × 40 points at (10, 10) whose opacity mask, of `art`, doesn't clip. +fn masked_image_node(doc: &mut Document, art: Node) -> Node { + let im = image_node(doc, ImageBlob::png(rgb_png()), (3, 2), Affine::new([60.0, 0.0, 0.0, 40.0, 10.0, 10.0]), None); + with_mask(im, art) +} + +/// A red square from (10, 10) to (70, 50) whose opacity mask, of `art`, doesn't clip. +fn masked_square(doc: &mut Document, art: Node) -> Node { + let sq = square(doc, Rect::new(10.0, 10.0, 70.0, 50.0), Color::rgb(1.0, 0.0, 0.0)); + with_mask(sq, art) +} + +/// `n` with an opacity mask of `art` that doesn't clip. +fn with_mask(mut n: Node, art: Node) -> Node { + n.extras_mut().mask = Some(OpacityMask { art: Arc::new(art), clip: false, invert: false, disabled: false, linked: true }.into()); + n +} + +/// The opacity mask art of the first object with one in `n`, its masks' art included. +fn mask_art_in(n: &Node) -> Option> { + let mut art = None; + vectorcraft_doc::swatches::walk_with_masks(n, &mut |m| { + if art.is_none() + && let Some(mask) = m.extras().mask.as_ref() + { + art = Some(mask.art.clone()); + } + }); + art +} + +/// The Offset Path distance of `n`'s one live effect, when that is all it has. +fn offset_path_of(n: &Node) -> Option { + match n.appearance.effects.as_slice() { + [e] if e.id == "path.offsetPath" => e.params.get("offset").and_then(serde_json::Value::as_f64), + _ => None, + } +} + +/// The opacity mask art of an image in a symbol's art keeps its live effects as an art style: a +/// black path with Offset Path reads back with the effect live on the definition's mask art, when +/// the mask's art root is hidden and when the symbol is used inside another symbol's art too, and +/// both instances draw as they did. +#[test] +fn a_symbols_mask_art_keeps_live_offset_path() { + let offset = fx("path.offsetPath", serde_json::json!({"offset": 6.0})); + let made = |effects: Vec, case: &str| { + let mut doc = Document::new(200.0, 100.0); + let layer = doc.layers[0].id; + let mut grown = styled_rect(&mut doc, "Grown", Rect::new(25.0, 20.0, 45.0, 40.0), solid(Color::BLACK), Paint::None, effects); + grown.visible = case != "hidden"; + let im = masked_image_node(&mut doc, grown); + doc.symbols.push(Symbol { dynamic: false, name: "Picture".into(), art: Arc::new(im) }); + let mut used = "Picture"; + if case == "nested" { + let inner = Node::new(doc.alloc_id(), NodeKind::SymbolInstance { symbol: "Picture".into(), xf: Affine::translate((5.0, 0.0)) }); + let dot = square(&mut doc, Rect::new(0.0, 0.0, 4.0, 4.0), Color::rgb(1.0, 0.0, 0.0)); + let frame = group(&mut doc, vec![inner, dot], false); + doc.symbols.push(Symbol { dynamic: false, name: "Frame".into(), art: Arc::new(frame) }); + used = "Frame"; + } + for x in [0.0, 100.0] { + let instance = Node::new(doc.alloc_id(), NodeKind::SymbolInstance { symbol: used.into(), xf: Affine::translate((x, 20.0)) }); + doc.insert(Some(layer), usize::MAX, instance).unwrap(); + } + doc + }; + for case in ["shown", "hidden", "nested"] { + let doc = made(vec![offset.clone()], case); + assert!(pixels_apart(&doc, &made(vec![], case)) > 0, "{case}: the effect draws nothing"); + let out = export_ai_editing(&doc, &opts()).unwrap(); + assert!(!out.warnings.iter().any(|w| w == writer::EFFECTS), "{case}: {:?}", out.warnings); + let back = read_back(&doc); + let picture = back.symbols.iter().find(|s| s.name == "Picture").unwrap_or_else(|| panic!("{case}: {:?}", back.symbols)); + let art = mask_art_in(&picture.art).unwrap_or_else(|| panic!("{case}: no masked image in {:?}", picture.art.kind)); + assert_eq!(offset_path_of(&art), Some(6.0), "{case}: {:?}", art.appearance.effects); + assert_eq!(pixels_apart(&doc, &back), 0, "{case}"); + } +} + +/// The opacity mask art of a square in a pattern's tile keeps its live effects as an art style: the +/// tile's black path with Offset Path reads back with the effect live, and the pattern fill draws as +/// it did. +#[test] +fn a_pattern_tiles_mask_art_keeps_live_offset_path() { + let offset = fx("path.offsetPath", serde_json::json!({"offset": 6.0})); + let made = |effects: Vec| { + let mut doc = Document::new(200.0, 100.0); + let layer = doc.layers[0].id; + let grown = styled_rect(&mut doc, "Grown", Rect::new(25.0, 20.0, 45.0, 40.0), solid(Color::BLACK), Paint::None, effects); + let sq = masked_square(&mut doc, grown); + let tile = Rect::new(0.0, 0.0, 80.0, 60.0); + doc.patterns.push(vectorcraft_doc::PatternDef { tile, ..vectorcraft_doc::PatternDef::new("Masked", vec![Arc::new(sq)]) }); + let fill = Paint::Pattern { pattern: "Masked".into(), xf: Affine::IDENTITY }; + let filled = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(0.0, 0.0, 160.0, 60.0)), Appearance::basic(fill, Paint::None, 0.0)); + doc.insert(Some(layer), usize::MAX, filled).unwrap(); + doc + }; + let doc = made(vec![offset]); + assert!(pixels_apart(&doc, &made(vec![])) > 0, "the effect draws nothing"); + let out = export_ai_editing(&doc, &opts()).unwrap(); + assert!(!out.warnings.iter().any(|w| w == writer::EFFECTS), "{:?}", out.warnings); + let back = read_back(&doc); + let def = back.pattern("Masked").unwrap_or_else(|| panic!("{:?}", back.patterns.iter().map(|p| &p.name).collect::>())); + let art = def.art.iter().find_map(|a| mask_art_in(a)).expect("a masked image in the tile"); + assert_eq!(offset_path_of(&art), Some(6.0), "{:?}", art.appearance.effects); + assert_eq!(pixels_apart(&doc, &back), 0); +} + +/// Each opacity mask's art keeps its own art style: masks on the layers, in a symbol's art and in a +/// pattern's tile with different Offset Path distances read back with their own distances, and a +/// symbol's mask art with an effect no art style holds (Roughen) reads back without a live effect. +#[test] +fn mask_art_styles_stay_with_their_own_art() { + let mut doc = Document::new(200.0, 100.0); + let layer = doc.layers[0].id; + let masked = |doc: &mut Document, effect: vectorcraft_doc::Effect| { + let grown = styled_rect(doc, "Grown", Rect::new(25.0, 20.0, 45.0, 40.0), solid(Color::BLACK), Paint::None, vec![effect]); + masked_image_node(doc, grown) + }; + let by = |d: f64| fx("path.offsetPath", serde_json::json!({"offset": d})); + let on_layer = masked(&mut doc, by(3.0)); + doc.insert(Some(layer), usize::MAX, on_layer).unwrap(); + let picture = masked(&mut doc, by(6.0)); + doc.symbols.push(Symbol { dynamic: false, name: "Picture".into(), art: Arc::new(picture) }); + let rough = masked(&mut doc, fx("distort.roughen", serde_json::json!({"size": 6.0, "relative": false, "points": "corner"}))); + doc.symbols.push(Symbol { dynamic: false, name: "Rough".into(), art: Arc::new(rough) }); + for (symbol, x) in [("Picture", 100.0), ("Rough", 120.0)] { + let instance = Node::new(doc.alloc_id(), NodeKind::SymbolInstance { symbol: symbol.into(), xf: Affine::translate((x, 40.0)) }); + doc.insert(Some(layer), usize::MAX, instance).unwrap(); + } + let grown = styled_rect(&mut doc, "Grown", Rect::new(25.0, 20.0, 45.0, 40.0), solid(Color::BLACK), Paint::None, vec![by(9.0)]); + let tile = masked_square(&mut doc, grown); + doc.patterns.push(vectorcraft_doc::PatternDef { + tile: Rect::new(0.0, 0.0, 80.0, 60.0), + ..vectorcraft_doc::PatternDef::new("Masked", vec![Arc::new(tile)]) + }); + let fill = Paint::Pattern { pattern: "Masked".into(), xf: Affine::IDENTITY }; + let filled = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(0.0, 60.0, 80.0, 100.0)), Appearance::basic(fill, Paint::None, 0.0)); + doc.insert(Some(layer), usize::MAX, filled).unwrap(); + let back = read_back(&doc); + let symbol_art = |name: &str| { + let s = back.symbols.iter().find(|s| s.name == name).unwrap_or_else(|| panic!("{name}: {:?}", back.symbols)); + mask_art_in(&s.art).unwrap_or_else(|| panic!("{name}: no masked image")) + }; + assert_eq!(offset_path_of(&image_mask_art(&back)), Some(3.0)); + assert_eq!(offset_path_of(&symbol_art("Picture")), Some(6.0)); + let tile = back.pattern("Masked").and_then(|p| p.art.iter().find_map(|a| mask_art_in(a))).expect("a masked image in the tile"); + assert_eq!(offset_path_of(&tile), Some(9.0)); + let rough = symbol_art("Rough"); + assert!(rough.appearance.effects.is_empty(), "{:?}", rough.appearance.effects); +} + /// A geometry effect on an opacity mask's art that no art style holds (Roughen) is applied to the /// art written, so the mask reads back drawing what it drew, but for pixels on its edge that the /// written points' rounding moves. @@ -6890,6 +7043,142 @@ fn a_filled_even_odd_object_is_written_as_its_drawn_look() { assert_eq!(n.extras().graphic_style, None); } +/// Links to graphic styles in pattern tiles count toward the warning about lost links: a tile's +/// object linked to a style, which is written without its link, warns; and so does an object on the +/// layers that loses its link while a tile's opacity mask art keeps its own. +#[test] +fn pattern_tile_style_links_count_toward_lost_links() { + let made = |linked_tile: bool| { + let mut doc = Document::new(200.0, 100.0); + let ap = Appearance::basic(black_fill(), Paint::None, 0.0); + let mut g = vectorcraft_doc::GraphicStyle::new("Solid", ap.clone()); + g.id = 7; + doc.graphic_styles.push(g); + let mut linked = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(25.0, 20.0, 45.0, 40.0)), ap.clone()); + linked.extras_mut().graphic_style = Some(7); + let art = if linked_tile { + linked + } else { + // An even-odd path is written without its link (see the test above). + let mut lost = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(100.0, 10.0, 140.0, 40.0)), ap); + lost.extras_mut().graphic_style = Some(7); + if let NodeKind::Path { rule, .. } = &mut lost.kind { + *rule = FillRule::EvenOdd; + } + put(&mut doc, lost); + masked_square(&mut doc, linked) + }; + doc.patterns.push(vectorcraft_doc::PatternDef { + tile: Rect::new(0.0, 0.0, 80.0, 60.0), + ..vectorcraft_doc::PatternDef::new("Linked", vec![Arc::new(art)]) + }); + let fill = Paint::Pattern { pattern: "Linked".into(), xf: Affine::IDENTITY }; + let filled = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(0.0, 50.0, 80.0, 100.0)), Appearance::basic(fill, Paint::None, 0.0)); + put(&mut doc, filled); + doc + }; + for linked_tile in [true, false] { + let doc = made(linked_tile); + let out = export_ai_editing(&doc, &opts()).unwrap(); + assert!(out.warnings.iter().any(|w| w == writer::STYLE_LINKS), "{linked_tile}: {:?}", out.warnings); + } + let back = read_back(&made(false)); + let tile = back.pattern("Linked").and_then(|p| p.art.iter().find_map(|a| mask_art_in(a))).expect("a masked square in the tile"); + assert!(tile.extras().graphic_style.is_some(), "the tile's mask art keeps its link"); +} + +/// An opacity mask's art linked to a graphic style reads back linked to it. +#[test] +fn opacity_mask_art_keeps_its_graphic_style_link() { + let mut doc = Document::new(200.0, 100.0); + let ap = Appearance::basic(black_fill(), Paint::None, 0.0); + let mut g = vectorcraft_doc::GraphicStyle::new("Solid", ap.clone()); + g.id = 7; + doc.graphic_styles.push(g); + let mut linked = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(25.0, 20.0, 45.0, 40.0)), ap); + linked.extras_mut().graphic_style = Some(7); + let sq = masked_square(&mut doc, linked); + put(&mut doc, sq); + let out = export_ai_editing(&doc, &opts()).unwrap(); + assert!(!out.warnings.iter().any(|w| w == writer::STYLE_LINKS), "{:?}", out.warnings); + let back = read_back(&doc); + let art = mask_art_in(&back.layers[0]).expect("a masked square"); + let id = art.extras().graphic_style.expect("the mask's art keeps its link"); + assert_eq!(back.graphic_style_by_id(id).map(|g| g.name.as_str()), Some("Solid")); +} + +/// A link written in a pattern tile's opacity mask art that the object limit then leaves out with +/// the rest of the tile is not counted as kept: at every limit where the style isn't written, the +/// export warns that the link is lost. +#[test] +fn mask_art_links_left_out_at_the_object_limit_are_reported_lost() { + let mut doc = Document::new(200.0, 100.0); + let layer = doc.layers[0].id; + let ap = Appearance::basic(black_fill(), Paint::None, 0.0); + let mut g = vectorcraft_doc::GraphicStyle::new("Solid", ap.clone()); + g.id = 7; + doc.graphic_styles.push(g); + let mut linked = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(25.0, 20.0, 45.0, 40.0)), ap); + linked.extras_mut().graphic_style = Some(7); + let mut art = vec![Arc::new(masked_square(&mut doc, linked))]; + for i in 0..6 { + let x = 2.0 + 12.0 * f64::from(i); + art.push(Arc::new(square(&mut doc, Rect::new(x, 52.0, x + 8.0, 58.0), Color::rgb(0.0, 0.0, 1.0)))); + } + doc.patterns.push(vectorcraft_doc::PatternDef { tile: Rect::new(0.0, 0.0, 80.0, 60.0), ..vectorcraft_doc::PatternDef::new("Linked", art) }); + let fill = Paint::Pattern { pattern: "Linked".into(), xf: Affine::IDENTITY }; + let filled = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(0.0, 0.0, 80.0, 60.0)), Appearance::basic(fill, Paint::None, 0.0)); + doc.insert(Some(layer), usize::MAX, filled).unwrap(); + let mut left_out = 0; + for max in 1..40 { + let out = export_within(&doc, &opts(), max).unwrap(); + let text = String::from_utf8_lossy(&out.program).into_owned(); + if !text.contains("(Solid) XW") { + left_out += 1; + assert!(out.warnings.iter().any(|w| w == writer::STYLE_LINKS), "{max}: {:?}", out.warnings); + } + } + assert!(left_out > 0 && left_out < 39, "{left_out}"); +} + +/// The links of opacity masks' art in a symbol no instance uses and in a pattern only the Swatches +/// panel holds are written with those definitions, after the layers, and count as kept: no warning +/// about lost links. +#[test] +fn mask_art_links_in_unused_definitions_are_not_reported_lost() { + let mut doc = Document::new(200.0, 100.0); + let ap = Appearance::basic(black_fill(), Paint::None, 0.0); + let mut g = vectorcraft_doc::GraphicStyle::new("Solid", ap.clone()); + g.id = 7; + doc.graphic_styles.push(g); + let linked = |doc: &mut Document| { + let mut n = Node::path(doc.alloc_id(), shapes::rectangle(Rect::new(25.0, 20.0, 45.0, 40.0)), ap.clone()); + n.extras_mut().graphic_style = Some(7); + masked_square(doc, n) + }; + let unused = linked(&mut doc); + doc.symbols.push(Symbol { dynamic: false, name: "Unused".into(), art: Arc::new(unused) }); + let tile = linked(&mut doc); + doc.patterns.push(vectorcraft_doc::PatternDef { + tile: Rect::new(0.0, 0.0, 80.0, 60.0), + ..vectorcraft_doc::PatternDef::new("Swatch only", vec![Arc::new(tile)]) + }); + let swatch = Swatch { + name: "Swatch only".into(), + paint: Paint::Pattern { pattern: "Swatch only".into(), xf: Affine::IDENTITY }, + global: false, + spot: false, + }; + swatches_plus(&mut doc, vec![swatch]); + let out = export_ai_editing(&doc, &opts()).unwrap(); + assert!(!out.warnings.iter().any(|w| w == writer::STYLE_LINKS), "{:?}", out.warnings); + let back = read_back(&doc); + let symbol = back.symbols.iter().find(|s| s.name == "Unused").and_then(|s| mask_art_in(&s.art)).expect("the unused symbol's mask art"); + assert!(symbol.extras().graphic_style.is_some(), "the symbol's mask art keeps its link"); + let tile = back.pattern("Swatch only").and_then(|p| p.art.iter().find_map(|a| mask_art_in(a))).expect("the swatch's mask art"); + assert!(tile.extras().graphic_style.is_some(), "the pattern's mask art keeps its link"); +} + /// A compound path filled by the non-zero rule keeps its effects, its gradient fill and its link to /// a graphic style. #[test] diff --git a/crates/eps/src/ai_editing/writer.rs b/crates/eps/src/ai_editing/writer.rs index 98b027f79d..8df30c69bc 100644 --- a/crates/eps/src/ai_editing/writer.rs +++ b/crates/eps/src/ai_editing/writer.rs @@ -28,7 +28,7 @@ mod variables; pub(super) use brushes::BRUSHES; #[cfg(test)] pub(super) use envelopes::ENVELOPES; -pub(super) use styles::{LARGE_CANVAS_STYLES, style_links, styled_objects}; +pub(super) use styles::{LARGE_CANVAS_STYLES, style_links, styled_definitions, styled_objects}; #[cfg(test)] pub(super) use styles::{PANEL_EMPTY, PANEL_STYLES, STYLE_LINKS, WARPED_IMAGES, same_appearance}; @@ -133,6 +133,10 @@ struct Charges { kept_objects: usize, kept_symbol_nodes: u64, left_out: usize, + /// The objects written with the graphic style they are linked to, and those of them in the + /// definitions written. + links: usize, + kept_links: usize, } pub(super) struct Writer<'a> { @@ -171,6 +175,8 @@ pub(super) struct Writer<'a> { definition_objects: usize, /// The objects of symbol art in those definitions ([`Self::symbol_nodes`]). definition_symbol_nodes: u64, + /// The objects in those definitions written with the graphic style they are linked to. + definition_links: usize, /// The most objects written ([`Self::take_objects`]): the most the reader reads, /// [`crate::import::MAX_EDITING_OBJECTS`]. pub(super) max_objects: usize, @@ -262,6 +268,12 @@ pub(super) struct Writer<'a> { /// The objects that may be written with an art style, as they were before baking, by id /// ([`styles::styled_objects`]). pub(super) styled: HashMap>, + /// The objects of the opacity masks' art in each symbol's art and each pattern's tile art that + /// may be written with an art style, by the symbol's or pattern's name + /// ([`styles::styled_definitions`]). [`Self::define_symbol`] and [`Self::define_pattern`] write + /// a definition's art with its own as [`Self::styled`]. + pub(super) symbol_styled: HashMap, + pub(super) pattern_styled: HashMap, /// The art styles written ([`styles`]). styles: styles::Styles, /// An object's drawn look is being written: no object in it is written with a style, and its @@ -350,6 +362,8 @@ impl<'a> Writer<'a> { symbol_scales: HashMap::new(), root_entries: None, styled: HashMap::new(), + symbol_styled: HashMap::new(), + pattern_styled: HashMap::new(), styles: styles::Styles::default(), in_look: false, drawn: 0, @@ -361,6 +375,7 @@ impl<'a> Writer<'a> { objects: 0, left_out: 0, definition_objects: 0, + definition_links: 0, definition_symbol_nodes: 0, max_objects: crate::import::MAX_EDITING_OBJECTS, last_samples: None, @@ -416,6 +431,8 @@ impl<'a> Writer<'a> { kept_objects: self.definition_objects, kept_symbol_nodes: self.definition_symbol_nodes, left_out: self.left_out, + links: self.styles.links_written, + kept_links: self.definition_links, } } @@ -429,15 +446,18 @@ impl<'a> Writer<'a> { fn keep_since(&mut self, c: Charges) { self.definition_objects = c.kept_objects + (self.objects - c.objects); self.definition_symbol_nodes = c.kept_symbol_nodes + (self.symbol_nodes - c.symbol_nodes); + self.definition_links = c.kept_links + (self.styles.links_written - c.links); } - /// Art written since `c` as `lines` is not used: the objects and symbol art charged since are - /// given back, except those of the definitions written since, and the images `lines` marks + /// Art written since `c` as `lines` is not used: the objects and symbol art charged since, and + /// the objects counted as written with their graphic style, are given back, except those of the + /// definitions written since, and the images `lines` marks /// are emptied (the others keep their indices). An image whose whole copy is among them is no /// longer written whole ([`Self::whole_images`]). fn give_back(&mut self, c: Charges, lines: &str) { self.objects = c.objects + (self.definition_objects - c.kept_objects); self.symbol_nodes = c.symbol_nodes + (self.definition_symbol_nodes - c.kept_symbol_nodes); + self.styles.links_written = c.links + (self.definition_links - c.kept_links); let mut emptied = HashSet::new(); for index in lines.split(PAYLOAD).skip(1).step_by(2) { if let Some((i, p)) = index.parse::().ok().and_then(|i| Some((i, self.payloads.get_mut(i)?))) { @@ -655,12 +675,11 @@ impl<'a> Writer<'a> { if n.extras().graph.is_some() && !self.in_look { self.warn(GRAPHS); } - // On the layers or in an opacity mask's art, outside art cut to a clipping object: with its - // art style, when it has one. + // On the layers or in an opacity mask's art (a symbol's and a pattern tile's included), + // outside art cut to a clipping object: with its art style, when it has one. if !self.in_look - && ((self.hidden == 0 && self.nest == 0) || self.mask_level == Some((self.hidden, self.nest))) + && ((self.hidden == 0 && self.nest == 0 && !self.in_symbol) || self.mask_level == Some((self.hidden, self.nest))) && self.clip.is_none() - && !self.in_symbol && let Some(orig) = self.styled.get(&n.id).cloned() && self.check_left(&orig) && let Some(name) = self.object_style(n, &orig) diff --git a/crates/eps/src/ai_editing/writer/paints.rs b/crates/eps/src/ai_editing/writer/paints.rs index d0a90ce86a..e2702b5714 100644 --- a/crates/eps/src/ai_editing/writer/paints.rs +++ b/crates/eps/src/ai_editing/writer/paints.rs @@ -483,6 +483,8 @@ impl Writer<'_> { self.gs.replace(Xy::OPAQUE), (self.clip.take(), std::mem::take(&mut self.shown)), self.block_end, + // The tile's masks' objects are written with their art styles, those of no other art. + (std::mem::replace(&mut self.styled, self.pattern_styled.get(name).cloned().unwrap_or_default()), self.mask_level.take()), ); // `Bg` places a gradient in a pattern's tile as on the canvas, mirrored top to bottom: its // placement is worked out in the tile's space turned y up. @@ -505,7 +507,15 @@ impl Writer<'_> { self.hidden -= 1; self.nest -= 1; let art; - (art, (self.to_art, self.grad_space, self.canvas), self.state, self.gs, (self.clip, self.shown), self.block_end) = saved; + ( + art, + (self.to_art, self.grad_space, self.canvas), + self.state, + self.gs, + (self.clip, self.shown), + self.block_end, + (self.styled, self.mask_level), + ) = saved; let art = std::mem::replace(&mut self.body, art); self.defining.pop(); if self.left_out_since(before) { diff --git a/crates/eps/src/ai_editing/writer/styles.rs b/crates/eps/src/ai_editing/writer/styles.rs index a8a2da677c..50aa4df931 100644 --- a/crates/eps/src/ai_editing/writer/styles.rs +++ b/crates/eps/src/ai_editing/writer/styles.rs @@ -26,7 +26,8 @@ pub(in crate::ai_editing) const PANEL_EMPTY: &str = pub(in crate::ai_editing) const WARPED_IMAGES: &str = "images with a Warp after the first 256 envelopes and images with a Warp are written as their drawn look, without their Warp, in the editing data for other apps"; pub(in crate::ai_editing) const STYLE_LINKS: &str = "links to graphic styles are left out of the editing data for other apps on type, images, symbol instances, knockout shapes and other objects that aren't written with their graphic style"; -/// How many objects of `doc`'s layers, opacity masks and symbols are linked to a graphic style. +/// How many objects of `doc`'s layers, opacity masks, symbols and pattern tiles are linked to a +/// graphic style. pub(in crate::ai_editing) fn style_links(doc: &Document) -> usize { fn count(n: &Node) -> usize { // Ruler guides are not written as objects. @@ -37,7 +38,9 @@ pub(in crate::ai_editing) fn style_links(doc: &Document) -> usize { let mask = n.extras().mask.as_ref().map_or(0, |m| count(&m.art)); own + mask + n.children().map_or(0, |c| c.iter().map(|m| count(m)).sum()) } - doc.layers.iter().map(|l| count(l)).sum::() + doc.symbols.iter().map(|s| count(&s.art)).sum::() + doc.layers.iter().map(|l| count(l)).sum::() + + doc.symbols.iter().map(|s| count(&s.art)).sum::() + + doc.patterns.iter().flat_map(|p| p.art.iter()).map(|a| count(a)).sum::() } /// The objects of `doc`'s layers and of their opacity masks' art that may be written with an art @@ -48,10 +51,30 @@ pub(in crate::ai_editing) fn style_links(doc: &Document) -> usize { /// Knockout Shape (the reader takes an object's transparency /// from its look, which doesn't carry it). A group's members are paths, compound paths or such /// groups, none with effects or anything baking changes. -pub(in crate::ai_editing) fn styled_objects(doc: &Document) -> HashMap> { - fn walk(nodes: &[Arc], out: &mut HashMap>) { +pub(in crate::ai_editing) fn styled_objects(doc: &Document) -> StyledMap { + styled_in(&doc.layers, true) +} + +/// The objects that may be written with an art style, by id, as they are before baking. +pub(in crate::ai_editing) type StyledMap = HashMap>; + +/// The objects of the opacity masks' art in each of `doc`'s symbols' art, by symbol name, and in +/// each of its patterns' tile art, by pattern name, that may be written with an art style, as +/// [`styled_objects`] finds them on the layers. A definition's own objects outside its masks' art +/// are not among them, and definitions without such objects are left out. +pub(in crate::ai_editing) fn styled_definitions(doc: &Document) -> (HashMap, HashMap) { + let symbols = doc.symbols.iter().map(|s| (s.name.clone(), styled_in(std::slice::from_ref(&s.art), false))); + let patterns = doc.patterns.iter().map(|p| (p.name.clone(), styled_in(&p.art, false))); + let kept = |(_, m): &(String, StyledMap)| !m.is_empty(); + (symbols.filter(kept).collect(), patterns.filter(kept).collect()) +} + +/// The objects of `nodes` that may be written with an art style ([`styled_objects`]): with `own`, +/// `nodes` and their members as well as their opacity masks' art, else their masks' art only. +fn styled_in(nodes: &[Arc], own: bool) -> StyledMap { + fn walk(nodes: &[Arc], own: bool, out: &mut StyledMap) { for n in nodes { - if candidate(n) { + if own && candidate(n) { out.insert(n.id, n.clone()); } if let Some(m) = n.extras().mask.as_ref() { @@ -59,7 +82,7 @@ pub(in crate::ai_editing) fn styled_objects(doc: &Document) -> HashMap HashMap { let doc = self.doc; // A new document's styles are what the reader gives a file without a style list; they are // still written when an object is linked to one of them, so that it keeps its link. - let linked = self.styled.values().any(|n| n.extras().graphic_style.is_some()); + let definitions = self.symbol_styled.values().chain(self.pattern_styled.values()).flat_map(HashMap::values); + let linked = self.styled.values().chain(definitions).any(|n| n.extras().graphic_style.is_some()); if !linked && doc.graphic_styles == Document::new(1.0, 1.0).graphic_styles { return; } diff --git a/crates/eps/src/ai_editing/writer/symbols.rs b/crates/eps/src/ai_editing/writer/symbols.rs index 0c8d2c7d3b..4d4bb2acba 100644 --- a/crates/eps/src/ai_editing/writer/symbols.rs +++ b/crates/eps/src/ai_editing/writer/symbols.rs @@ -252,6 +252,8 @@ impl Writer<'_> { self.root_entries.take(), std::mem::take(&mut self.wrote_pattern), (std::mem::take(&mut self.wrote_fixed), std::mem::replace(&mut self.inner_scale, 1.0)), + // The art's masks' objects are written with their art styles, those of no other art. + (std::mem::replace(&mut self.styled, self.symbol_styled.get(name).cloned().unwrap_or_default()), self.mask_level.take()), ); // Gradients' matrices and instances' matrices are written about the canvas point of art // space's origin, y up; `Bg` places a gradient on the art as it lies in the symbol's space. @@ -309,6 +311,7 @@ impl Writer<'_> { self.root_entries, self.wrote_pattern, (self.wrote_fixed, self.inner_scale), + (self.styled, self.mask_level), ) = saved; self.doc = page_doc; (self.in_look, self.drawn) = (in_look, drawn); diff --git a/crates/eps/src/import/ai/read/document.rs b/crates/eps/src/import/ai/read/document.rs index ba6a8bd2de..df51a99393 100644 --- a/crates/eps/src/import/ai/read/document.rs +++ b/crates/eps/src/import/ai/read/document.rs @@ -1393,8 +1393,9 @@ impl<'a> Reader<'a> { } /// Link the objects of `links` among `nodes` to their graphic style's id, each only when it has its -/// style's appearance and transparency (`styles`, whose ids are 1, 2, … in order). A path, which -/// has no contents, takes the style's contents slot. +/// style's appearance and transparency (`styles`, whose ids are 1, 2, … in order), their members +/// and their opacity masks' art included. A path, which has no contents, takes the style's contents +/// slot. fn link_styles(nodes: &mut [Arc], links: &HashMap, styles: &[GraphicStyle], depth: usize) { if depth > MAX_DEPTH { return; @@ -1413,6 +1414,11 @@ fn link_styles(nodes: &mut [Arc], links: &HashMap, styles: &[ n.extras_mut().graphic_style = Some(*id); } } + if n.extras().mask.is_some() + && let Some(m) = Arc::make_mut(n).extras_mut().mask.as_mut() + { + link_styles(std::slice::from_mut(&mut m.art), links, styles, depth + 1); + } if n.children().is_some_and(|c| !c.is_empty()) && let Some(c) = Arc::make_mut(n).children_mut() { diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md index bf52925f5c..76b51a1ced 100644 --- a/docs/file-format-parity.md +++ b/docs/file-format-parity.md @@ -106,7 +106,9 @@ private editing data. VectorCraft: Round Corners, Scribble, Convert to Shape, Offset Path, Outline Object or Outline Stroke, and groups with Pathfinder › Add. Groups keep them when their members are paths, compound paths or such groups, without effects of their own; when the group's effects change its members' outlines, a member's strokes are plain lines, and its fills are not pattern - fills written as tiles or gradients that fit their object. The look holds the object's vector art, without the shadow, glow or feather. Other objects with + fills written as tiles or gradients that fit their object. The look holds the object's vector art, without the shadow, glow or feather. + This holds for objects on the layers and in opacity masks' art, the masks' art in a symbol's art and in a pattern's tile + included; a symbol's or a pattern's other objects are written as described next. Other objects with live effects are written as their vector art with their geometry effects applied, and their other effects, such as Drop Shadow, the glows and Feather, are left out with a warning. A path, compound path or group linked to a graphic style names it when it has the style's appearance and the style is written; other links to graphic styles, those on a styled group's members included, are @@ -270,7 +272,7 @@ The app's own editing copy of a file (an EPS after its `%%EOF`, a `.ai`'s `AIPri A run of type in the editing data whose baseline direction is 1 opens with Standard Vertical Roman Alignment (https://helpx.adobe.com/illustrator/using/formatting-asian-characters.html) on, which is VectorCraft's own mapping: its half-width characters stand upright in vertical type, and horizontal type keeps the mark with no change to its layout. A run whose baseline direction is 2 or 3 (Tate-chu-yoko), or that names none in the run, its character style or the document's defaults, opens with it off. The scripting reference lists 1, 2 and 3 as the Standard, vertical rotated and Tate-chu-yoko baseline directions (https://web.archive.org/web/20170621180804/https://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2015_3/Illustrator%20VBScript%20Reference.pdf, page 256). A Scatter brush in the editing data whose last 15 numbers start with 1 comes into the Brushes panel in Tints. Each brush art section is read without its frame: an unnamed, unpainted rectangle with no settings of its own at the art's bounds (within 1/1000 pt), closed, or open with its first corner again at the end. A wider frame stays in the art, and an art group with a state or look of its own (hidden, locked, isolated, knockout, an opacity, a blend mode, a name, a mask, a note or an appearance) stays a group. -An object in a pattern's art or in a brush's art takes the file's art styles in the same way as an object on a layer: with a style VectorCraft reads, it comes in as itself with its effects live, not as the look it draws. An object in a pattern's art with a style in the file's style list keeps that graphic style's id. An art styles section inside a symbol's, a pattern's or a brush's art is skipped. +An object in a pattern's art or in a brush's art takes the file's art styles in the same way as an object on a layer: with a style VectorCraft reads, it comes in as itself with its effects live, not as the look it draws. An object in a pattern's art with a style in the file's style list keeps that graphic style's id, as does an object in an opacity mask's art. An art styles section inside a symbol's, a pattern's or a brush's art is skipped. Names in the editing data that aren't UTF-8 (layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets) are read as Windows-1252 unless `legacyNameEncoding` (`convert --legacy-name-encoding`) picks `macintosh`, `windows-949`, `shift_jis`, `gbk` or `big5`; the open result's warnings list the first three such names as read and count the rest. The text values of data sets are read in the same encoding. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index cad5851e98..d55e45e52c 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1740,6 +1740,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps envelopes made with a warp, a mesh or a top object editable: its editing copy holds each envelope's contents, shape, Fidelity, Envelope Options and Edit Contents state in the form VectorCraft's `.ai` envelope reader reads, beside its distorted art, so the file opens with the same live envelope, Edit Contents still switching between the contents and the envelope ([Edit the contents of envelopes](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/edit-the-contents-of-envelopes.html)). Envelopes of type, envelopes in opacity masks, pattern tiles or another envelope's contents, and envelopes the reader would open with another shape or other settings (a Fidelity that isn't a whole number, bounds margins kept with Distort Appearance off), and envelopes after the first 256 envelopes and images with a Warp in a file are written as their distorted art, with a warning (`envelopes_are_read_back_live` and `envelopes_the_reader_cannot_open_live_are_written_as_their_art` in `crates/eps/src/ai_editing/tests.rs`). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps writes eligible paths, compound paths and groups with live effects with an art style when the writer supports their appearance and effects (not a filled path that uses the even-odd rule, and none on a large canvas), which VectorCraft's `.ai` reader opens as the same appearance with its effects live (`objects_with_live_effects_are_read_back` and `every_effect_setting_written_on_an_object_is_read_back` in `crates/eps/src/ai_editing/tests.rs`; [file-format-parity.md](file-format-parity.md) lists the objects written without one and the effects they lose). The same holds for the objects of an opacity mask's art, a mask inside another mask's art and a hidden art root included, so a mask whose art has Offset Path opens drawing the image it masks as it did, with the effect live; geometry effects that no art style holds on a mask's art, such as Roughen, are written applied to the art, which opens drawing what it drew (`a_masked_image_with_live_offset_path_round_trips`, `hidden_and_nested_mask_art_keep_live_offset_path` and `a_masks_art_with_an_effect_no_style_holds_is_written_as_it_draws` in `crates/eps/src/ai_editing/tests.rs`). + Opacity masks in a symbol's art and in a pattern's tile are written the same way, so a symbol or pattern whose mask art has Offset Path opens with the effect live in its definition, and its instances and pattern fills draw as they did; each definition's mask art keeps its own style, and mask art linked to a graphic style opens still linked to it (`a_symbols_mask_art_keeps_live_offset_path`, `a_pattern_tiles_mask_art_keeps_live_offset_path`, `mask_art_styles_stay_with_their_own_art` and `opacity_mask_art_keeps_its_graphic_style_link` in `crates/eps/src/ai_editing/tests.rs`). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps writes point type, area type and type on a path as type in its editing copy, and objects next to it keep their own transparency (`crates/eps/src/ai_editing/tests.rs`, `cmd::fileio::tests_pdfedit::type_comes_back_from_the_editing_copy`; [file-format-parity.md](file-format-parity.md) lists what is written as outlines). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps the document's variables, data sets and the bindings of objects to variables in its editing copy, in the form the variable library reader above reads, so they come back when the file is opened. Bindings to layers, to type written as outlines, to graphs and to linked images written as other objects, data set values of graphs, and variables, data sets, bindings and values past the writer's limits are left out with a warning (#6024; `crates/eps/src/ai_editing/tests.rs` `variables_data_sets_and_bindings_are_read_back`; `crates/eps/src/ai_editing/writer/variables.rs` lists what is left out). A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps each wrap object's Text Wrap Options in its editing copy: the Offset, positive or negative, and Invert Wrap ([the help page](https://helpx.adobe.com/illustrator/desktop/design-with-text/add-manage-text/wrap-or-unwrap-text-around-objects.html)), in the form the `.ai` reader reads them (`text_wrap` in `crates/eps/src/import/ai/read/document.rs`), so they come back when the file is opened. An offset past the -1000 to 1000 pt the reader keeps is written as the nearer end of that range. On a large canvas the offset is written at the art's scale and comes back at its size. Art the writer draws for an object, such as a blend's steps or a symbol instance written as its art, has only that object's options, and a clipping path written as its fills and its strokes has its options once (`crates/eps/src/ai_editing/tests.rs` `text_wrap_options_are_written_and_read_back`, `drawn_art_keeps_only_its_objects_text_wrap`, `text_wrap_offsets_on_a_large_canvas_come_back_at_their_size`, `text_wrap_options_of_type_and_envelopes_are_read_back`, `a_clipping_path_written_as_its_paint_keeps_one_text_wrap`). From 2c5da43728f540ccf108b52fcccc8967ce851e66 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 17:49:15 -0800 Subject: [PATCH 15/52] Status bar: a background save or failed job keeps a newer status line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A save written in the background reported "Saved " when it finished, and a background job that failed reported "