mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 14:49:18 +00:00
i18n: the SVG variable-data warning names variable kinds in the interface language
Opening an SVG whose variable data holds variables that aren't text warns about them with a list of kinds and counts. The sentence was translated, but the list stayed in English and used the file's raw `trait` values (`visibility (2), fileref (1)`), and a missing `trait` and a `trait` written as `unknown` were counted together. - The engine's English warning now names the kinds Visibility, Linked File, Graph Data and Unknown (a variable without a `trait`). Any other `trait` is written as the file writes it, in backticks, with each backtick in it doubled, so a `trait` such as `Visibility` or one holding a comma stays a single entry. - The status bar shows those kinds through new `variable-kind` rows and joins the entries with `variable-list-two`, `variable-list-middle` and `variable-list-end` rows, in every complete-message catalog. A list in any other form is shown as before. - The French row puts the list after a colon instead of inside parentheses, and the Hindi row is reworded so it says that the variables that aren't text were left out.
This commit is contained in:
+6
-1
@@ -1029,7 +1029,12 @@ data larger than 8 MiB or holding more than 2,000,000 XML nodes is left out (the
|
||||
reads), each with a warning. With `outlineText`, the bound type is written as outlines, so its text variables open
|
||||
unbound (with a warning). `document.open` reads the variable data of an SVG back (unless the SVG reopens from
|
||||
Preserve Editing): its text variables and data sets, no active data set, and each text variable bound to the type
|
||||
object its `docRef` names; the art stays as the file draws it. Variable data that `variable.loadLibrary` would refuse
|
||||
object its `docRef` names; the art stays as the file draws it. Variables of other kinds are left out with one warning
|
||||
that names each kind once, in the order it first comes, with its count: ``variables that aren't text were left out:
|
||||
Visibility (2), Linked File (1), Unknown (1), `custom` (1)``. Visibility, Linked File and Graph Data are the
|
||||
`visibility`, `fileref` and `graphdata` traits, Unknown is a variable without a `trait`, and any other `trait` is
|
||||
written as the file writes it, in backticks, with each backtick in it doubled. The status bar shows the kinds VectorCraft
|
||||
names in the interface language. Variable data that `variable.loadLibrary` would refuse
|
||||
is left out with the warning "the file's variable data wasn't read", and the art opens. `svgz` takes the same options and writes the SVG gzipped (`.svgz` files also open,
|
||||
place and paste). `run_command document.save {path: "x.svg", svg: {…}}` saves as SVG (or `.svgz`).
|
||||
Colorized grayscale and 1-bit images export in their fill color; linked mode writes a coverage PNG, and Tiny 1.2 writes a colorized PNG.
|
||||
|
||||
@@ -848,6 +848,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Variables: Import Data Sets… (`dataset.import`) defines the variables a file's header names that the document lacks, unbound. `#Shown` defines a visibility variable, `@Photo` defines an image variable, and a header without a prefix defines a text variable. A header that is a variable's exact name keeps naming it, and any other `%` header (graph data files) is refused.
|
||||
- Variables: Load Variable Library… in the Variables panel menu (`variable.loadLibrary`) replaces the document's variables and data sets with a variable library's, read from its XML file, in one undo step: every data set is deleted, and every variable is deleted with its bindings and values, except a variable the library also declares with the same kind, which stays bound so the library's data sets change its objects (#4136); then the library's other variables are defined, unbound: text, visibility, image (linked file) and graph variables, and variables without a known `trait` as unknown. Its data sets take text values from each value's `p` elements, one paragraph each, visibility values from `true` or `false`, image values from a file's absolute path or `file:` URL, and graph values from a `data` element of series names and rows.
|
||||
- Variables: Save Variable Library… in the Variables panel menu (`variable.saveLibrary`) writes the document's variables of every kind and its data sets as a variable library's XML file, which Load Variable Library reads back with the same variables, kinds, data set names and values.
|
||||
- Variables: opening an SVG whose variable data holds variables that aren't text warns about them by kind (Visibility, Linked File, Graph Data, or Unknown for a variable without a `trait`) with a count for each, and the status bar shows those kinds and the list in the interface language. Any other `trait` stays as the file writes it, in backticks, so a `trait` such as `Visibility` or one with a comma stays a single entry. This is VectorCraft's own rule. Regression tests: `svg_variable_data_warning_names_each_kind_left_out` in `crates/engine/src/tests/variables.rs`, `svg_variable_kinds_left_out_translate_in_every_complete_catalog` in `crates/ui-egui/src/i18n/tests.rs`.
|
||||
- Variables: Variable Options… in the Variables panel menu, or a double click on a variable, shows the variable's name and kind, and OK changes either or both in one undo step (`variable.rename {name, newName?, kind?}`), as the [Work with variables](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/work-with-variables.html) page describes. VectorCraft's own rule for a kind change: objects that can't hold the new kind are unbound, and the variable's values in every data set are dropped.
|
||||
- JSON-lines control channel with real egui pointer and keyboard injection.
|
||||
- Variables: a type object holds one text variable. `variable.bind` and Make Text Dynamic refuse a second one and name the text variable the object has; a visibility variable can still share the object, and a document saved with two text variables on one object opens with both.
|
||||
|
||||
Reference in New Issue
Block a user