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:
dotCooCoo
2026-11-15 14:06:40 -08:00
parent bb218101c9
commit f260510ced
31 changed files with 372 additions and 13 deletions
+20 -5
View File
@@ -619,7 +619,21 @@ pub(crate) fn give_svg_library(doc: &mut Document, lib: Library, found: &HashMap
}
}
doc.variables = vars.into();
left_out_warning(other.iter().map(|v| v.trait_name.as_deref().unwrap_or_else(|| v.kind.label())))
left_out_warning(other.iter().map(|v| left_out_kind(v.kind, v.trait_name.as_deref())))
}
/// How the warning about variables that aren't text names the kind of one: Visibility, Linked File
/// or Graph Data for a `trait` VectorCraft reads, Unknown for a variable without a `trait`, and any
/// other `trait` as the file writes it, in backticks, each backtick in it doubled, so that a `trait`
/// such as `Unknown` or `a (1), b` reads as one kind the file names.
fn left_out_kind(kind: VariableKind, trait_name: Option<&str>) -> String {
match (kind, trait_name) {
(VariableKind::Visibility, _) => "Visibility".into(),
(VariableKind::Image, _) => "Linked File".into(),
(VariableKind::Graph, _) => "Graph Data".into(),
(_, None) => "Unknown".into(),
(_, Some(t)) => format!("`{}`", t.replace('`', "``")),
}
}
/// Load Variable Library: replace the document's variables and data sets with a variable library's
@@ -668,10 +682,11 @@ pub(super) fn load_library(s: &mut Session, p: &Value) -> Result<Value> {
Ok(json!({"variables": declared, "deleted": deleted, "deletedDataSets": deleted_sets, "names": names}))
}
/// The warning about variables that aren't text and were left out, given the kind of each: every
/// kind once, in the order it first comes, with how many variables have it. `None` without any.
fn left_out_warning<'a>(kinds: impl Iterator<Item = &'a str>) -> Option<String> {
let mut counted: Vec<(&str, usize)> = Vec::new();
/// The warning about variables that aren't text and were left out, given the kind of each
/// ([`left_out_kind`]): every kind once, in the order it first comes, with how many variables have
/// it. `None` without any.
fn left_out_warning(kinds: impl Iterator<Item = String>) -> Option<String> {
let mut counted: Vec<(String, usize)> = Vec::new();
for t in kinds {
match counted.iter_mut().find(|(k, _)| *k == t) {
Some((_, n)) => *n += 1,
+38 -2
View File
@@ -3474,12 +3474,12 @@ fn an_svg_without_readable_variable_data_opens_its_art() {
// A variable without a `trait` is of unknown kind: the SVG leaves it out like the other kinds
// that aren't text.
let (o, warnings) = svg_opened(&untraited, "untraited.svg");
assert!(warnings.contains(&json!("variables that aren't text were left out: unknown (1)")), "{warnings:?}");
assert!(warnings.contains(&json!("variables that aren't text were left out: Unknown (1)")), "{warnings:?}");
assert!(o.doc().unwrap().doc.variables.variables.is_empty());
// The values of the other kinds aren't read, so one that Load Variable Library would refuse
// leaves the text variables and their values as they open.
let (o, warnings) = svg_opened(&relative, "relative.svg");
assert!(warnings.contains(&json!("variables that aren't text were left out: fileref (1)")), "{warnings:?}");
assert!(warnings.contains(&json!("variables that aren't text were left out: Linked File (1)")), "{warnings:?}");
let vars = &o.doc().unwrap().doc.variables;
assert_eq!(vars.variables.iter().map(|v| v.name.as_str()).collect::<Vec<_>>(), ["T"]);
assert_eq!(vars.dataset("D").map(|d| d.values.clone()), Some([("T".to_string(), vectorcraft_doc::DataValue::Text("kept".into()))].into()));
@@ -3492,6 +3492,42 @@ fn an_svg_without_readable_variable_data_opens_its_art() {
assert_eq!(vectorcraft_testkit::svg_shapes(&vectorcraft_svg::export(d, &Default::default())), 1, "the art opens");
}
/// The warning about an SVG's variables that aren't text names each kind once, in the order it
/// first comes, with its count: Visibility, Linked File and Graph Data for the traits VectorCraft
/// reads, Unknown for a variable without a `trait`, and any other `trait` as the file writes it, in
/// backticks with each backtick in it doubled, so a `trait` that looks like a kind or a list entry
/// stays one entry of its own.
#[test]
fn svg_variable_data_warning_names_each_kind_left_out() {
let variables = [
("V1", Some("visibility")),
("I1", Some("fileref")),
("V2", Some("visibility")),
("T", Some("textcontent")),
("G1", Some("graphdata")),
("U1", None),
("X1", Some("unknown")),
("X2", Some("a`b (1), c")),
("X3", Some("Visibility")),
("I2", Some("fileref")),
("U2", None),
];
let declared: String = variables
.iter()
.map(|(name, t)| match t {
Some(t) => format!("<variable varName=\"{name}\" trait=\"{t}\"/>"),
None => format!("<variable varName=\"{name}\"/>"),
})
.collect();
let svg = format!(
"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><variableSets><variableSet><variables>{declared}</variables></variableSet></variableSets><rect x=\"1\" y=\"1\" width=\"5\" height=\"5\"/></svg>"
);
let (o, warnings) = svg_opened(&svg, "kinds.svg");
let warning = "variables that aren't text were left out: Visibility (2), Linked File (2), Graph Data (1), Unknown (2), `unknown` (1), `a``b (1), c` (1), `Visibility` (1)";
assert!(warnings.contains(&json!(warning)), "{warnings:?}");
assert_eq!(o.doc().unwrap().doc.variables.variables.iter().map(|v| v.name.as_str()).collect::<Vec<_>>(), ["T"]);
}
/// Five variables of three kinds, defined out of every order: `beta` (text, on type named Mike),
/// `Alpha` (visibility, on a rectangle named apple), `gamma` (image, bound to nothing), `Delta`
/// (visibility, on two rectangles) and `Echo` (text, on type named Bravo).
+71 -1
View File
@@ -713,11 +713,81 @@ fn fill_message(lang: Lang, s: &str, found: Option<(&[String], catalog::Captures
message_at(lang, v, depth - 1)
}
};
let values: Vec<(&str, String)> = caps.into_iter().map(|(k, v)| (k, nested(v))).collect();
let left_out = left_out_kinds(lang, s, &caps);
let values: Vec<(&str, String)> = caps
.into_iter()
.map(|(k, v)| match (&left_out, k) {
(Some(kinds), "kinds") => (k, kinds.clone()),
_ => (k, nested(v)),
})
.collect();
let args: Vec<(&str, &str)> = values.iter().map(|(k, v)| (*k, v.as_str())).collect();
fill_once(template, &args)
}
/// The kinds the warning about an SVG's variables that aren't text names (the engine's
/// `left_out_kind` in `crates/engine/src/cmd/variablecmds/library.rs`), each translated by its
/// `variable-kind` row.
const LEFT_OUT_KINDS: [&str; 4] = ["Visibility", "Linked File", "Graph Data", "Unknown"];
/// The list of kinds in `lang` when `s` is the warning about an SVG's variables that aren't text
/// and `caps` are its captures. Each entry is a kind of [`LEFT_OUT_KINDS`] or a `trait` the file
/// names, in backticks with each backtick in it doubled, followed by its count in parentheses; the
/// entries are separated by `, `. A kind of [`LEFT_OUT_KINDS`] is shown in `lang`, a `trait` as the
/// warning writes it, and the entries keep their order and counts, joined with the
/// `variable-list-two` row for two, and the `variable-list-middle` and `variable-list-end` rows for
/// more; a missing row leaves its part in English. `None` for any other message, or a list that
/// does not have that form.
fn left_out_kinds(lang: Lang, s: &str, caps: &[(&str, &str)]) -> Option<String> {
let [("kinds", kinds)] = caps else { return None };
if s.strip_prefix("variables that aren't text were left out: ") != Some(*kinds) {
return None;
}
let catalog = lang.catalog();
let mut entries = Vec::new();
let mut rest = *kinds;
loop {
let (name, after) = if let Some(quoted) = rest.strip_prefix('`') {
// The `trait` ends at the first backtick that is not doubled.
let mut at = 0;
let close = loop {
let found = at + quoted[at..].find('`')?;
if quoted[found + 1..].starts_with('`') {
at = found + 2;
} else {
break found;
}
};
rest.split_at(close + 2)
} else {
let kind = LEFT_OUT_KINDS.iter().find(|k| rest.starts_with(**k))?;
(catalog.contextual("variable-kind", kind).unwrap_or(kind), &rest[kind.len()..])
};
let (count, after) = after.strip_prefix(" (")?.split_once(')')?;
if count.is_empty() || !count.bytes().all(|b| b.is_ascii_digit()) {
return None;
}
entries.push(format!("{name} ({count})"));
if after.is_empty() {
break;
}
rest = after.strip_prefix(", ")?;
}
let join = |context: &str, a: &str, b: &str| {
let pattern = "{0}, {1}";
fill_once(catalog.contextual(context, pattern).unwrap_or(pattern), &[("0", a), ("1", b)])
};
match entries.as_slice() {
[] => None,
[one] => Some(one.clone()),
[a, b] => Some(join("variable-list-two", a, b)),
[first, middle @ .., last] => {
let head = middle.iter().fold(first.clone(), |acc, w| join("variable-list-middle", &acc, w));
Some(join("variable-list-end", &head, last))
}
}
}
/// The translation of a message with an exact `@msg` row in `catalog`, its `{{` and `}}` shown as
/// `{` and `}`.
fn exact_translation(catalog: &Catalog, s: &str) -> Option<String> {
+7
View File
@@ -6590,6 +6590,13 @@ digits Malayalam Malaiàlam
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} més de {MAX_CSV_ROWS} conjunts de dades: Importa conjunts de dades en llegeix com a màxim {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} més de {MAX_CSV_COLS} variables: Importa conjunts de dades en llegeix com a màxim {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} les variables que no són text s’han omès: {kinds}
variable-kind Visibility Visibilitat
variable-kind Linked File Fitxer enllaçat
variable-kind Graph Data Dades del gràfic
variable-kind Unknown Desconegut
variable-list-two {0}, {1} {0} i {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} i {1}
@msg a new document won't read these variables back with their kind: {names} un document nou no tornarà a llegir aquestes variables amb el seu tipus: {names}
@msg a new document refuses this file because of these variables: {names} un document nou rebutja aquest fitxer a causa d'aquestes variables: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them la capçalera `{header}` de `{name}` es tornaria a llegir com la variable `{other}`: canvieu el nom d’una de les dues
Can't render this file because it contains an unexpected character in line 2 and column 73.
+7
View File
@@ -5470,6 +5470,13 @@ imageTrace Outline Obrys
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} více než {MAX_CSV_ROWS} sad dat: Importovat sady dat načte nejvýše {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} více než {MAX_CSV_COLS} proměnných: Importovat sady dat načte nejvýše {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} proměnné, které nejsou textové, byly vynechány: {kinds}
variable-kind Visibility Viditelnost
variable-kind Linked File Propojený soubor
variable-kind Graph Data Data grafu
variable-kind Unknown Neznámý
variable-list-two {0}, {1} {0} a {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} a {1}
@msg a new document won't read these variables back with their kind: {names} nový dokument tyto proměnné nenačte zpět s jejich druhem: {names}
@msg a new document refuses this file because of these variables: {names} nový dokument tento soubor kvůli těmto proměnným odmítne: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them záhlaví `{header}` pro `{name}` by se načetlo jako proměnná `{other}`: jednu z nich přejmenujte
Can't render this file because it is too large.
+7
View File
@@ -6335,6 +6335,13 @@ mark-style Japanese Japansk
@msg {k} has control characters {k} indeholder kontroltegn
@msg {k} has control characters or line breaks {k} indeholder kontroltegn eller linjeskift
@msg variables that aren't text were left out: {kinds} variabler, der ikke er tekst, blev udeladt: {kinds}
variable-kind Visibility Synlighed
variable-kind Linked File Koblet fil
variable-kind Graph Data Grafdata
variable-kind Unknown Ukendt
variable-list-two {0}, {1} {0} og {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} og {1}
@msg a new document won't read these variables back with their kind: {names} et nyt dokument læser ikke disse variabler tilbage med deres type: {names}
@msg a new document refuses this file because of these variables: {names} et nyt dokument afviser denne fil på grund af disse variabler: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them overskriften `{header}` for `{name}` ville blive læst som variablen `{other}`: omdøb en af dem
Can't render this file because it contains an unexpected character in line 2 and column 73.
+7
View File
@@ -5076,6 +5076,13 @@ theme Appearance Erscheinungsbild
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} mehr als {MAX_CSV_ROWS} Datensätze: „Datensätze importieren“ liest höchstens {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} mehr als {MAX_CSV_COLS} Variablen: „Datensätze importieren“ liest höchstens {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} die Variablen, die kein Text sind, wurden ausgelassen: {kinds}
variable-kind Visibility Sichtbarkeit
variable-kind Linked File Verknüpfte Datei
variable-kind Graph Data Diagrammdaten
variable-kind Unknown Unbekannt
variable-list-two {0}, {1} {0} und {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} und {1}
@msg a new document won't read these variables back with their kind: {names} ein neues Dokument liest diese Variablen nicht mit ihrer Art zurück: {names}
@msg a new document refuses this file because of these variables: {names} ein neues Dokument lehnt diese Datei wegen dieser Variablen ab: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them die Kopfzeile `{header}` für `{name}` würde als die Variable `{other}` gelesen: Benennen Sie eine der beiden um
Can't render this file because it is too large.
+7
View File
@@ -5116,6 +5116,13 @@ digits Malayalam Μαλαγιάλαμ
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} περισσότερα από {MAX_CSV_ROWS} σύνολα δεδομένων: η Εισαγωγή συνόλων δεδομένων διαβάζει έως {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} περισσότερες από {MAX_CSV_COLS} μεταβλητές: η Εισαγωγή συνόλων δεδομένων διαβάζει έως {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} οι μεταβλητές που δεν είναι κειμένου παραλείφθηκαν: {kinds}
variable-kind Visibility Ορατότητα
variable-kind Linked File Συνδεδεμένο αρχείο
variable-kind Graph Data Δεδομένα γραφήματος
variable-kind Unknown Άγνωστο
variable-list-two {0}, {1} {0} και {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} και {1}
@msg a new document won't read these variables back with their kind: {names} ένα νέο έγγραφο δεν θα διαβάσει ξανά αυτές τις μεταβλητές με το είδος τους: {names}
@msg a new document refuses this file because of these variables: {names} ένα νέο έγγραφο απορρίπτει αυτό το αρχείο λόγω αυτών των μεταβλητών: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them η κεφαλίδα `{header}` για το `{name}` θα διαβαζόταν ως η μεταβλητή `{other}`: μετονομάστε μία από τις δύο
Can't render this file because it is too large.
+7
View File
@@ -5166,6 +5166,13 @@ axis Both Ambos
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} más de {MAX_CSV_ROWS} conjuntos de datos: Importar conjuntos de datos lee como máximo {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} más de {MAX_CSV_COLS} variables: Importar conjuntos de datos lee como máximo {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} se omitieron las variables que no son de texto: {kinds}
variable-kind Visibility Visibilidad
variable-kind Linked File Archivo vinculado
variable-kind Graph Data Datos del gráfico
variable-kind Unknown Desconocido
variable-list-two {0}, {1} {0} y {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} y {1}
@msg a new document won't read these variables back with their kind: {names} un documento nuevo no volverá a leer estas variables con su tipo: {names}
@msg a new document refuses this file because of these variables: {names} un documento nuevo rechaza este archivo por estas variables: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them el encabezado `{header}` de `{name}` se leería como la variable `{other}`: cambie el nombre de una de las dos
Can't render this file because it contains an unexpected character in line 2 and column 73.
+7
View File
@@ -5381,6 +5381,13 @@ imageTrace Outline Ääriviiva
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} yli {MAX_CSV_ROWS} tietojoukkoa: Tuo tietojoukot lukee enintään {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} yli {MAX_CSV_COLS} muuttujaa: Tuo tietojoukot lukee enintään {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} muut kuin tekstimuuttujat jätettiin pois: {kinds}
variable-kind Visibility Näkyvyys
variable-kind Linked File Linkitetty tiedosto
variable-kind Graph Data Kaavion tiedot
variable-kind Unknown Tuntematon
variable-list-two {0}, {1} {0} ja {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} ja {1}
@msg a new document won't read these variables back with their kind: {names} uusi asiakirja ei lue näitä muuttujia takaisin niiden lajin mukaisina: {names}
@msg a new document refuses this file because of these variables: {names} uusi asiakirja hylkää tämän tiedoston näiden muuttujien vuoksi: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them muuttujan `{name}` otsikko `{header}` luettaisiin muuttujaksi `{other}`: nimeä toinen niistä uudelleen
Can't render this file because it contains an unexpected character in line 2 and column 73.
+8 -1
View File
@@ -5142,7 +5142,14 @@ axis Both Les deux
@msg variables are locked les variables sont verrouillées
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} plus de {MAX_CSV_ROWS} jeux de données : Importer des jeux de données en lit au plus {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} plus de {MAX_CSV_COLS} variables : Importer des jeux de données en lit au plus {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} les variables qui ne sont pas du texte ({kinds}) ont été ignorées
@msg variables that aren't text were left out: {kinds} les variables qui ne sont pas du texte ont été ignorées : {kinds}
variable-kind Visibility Visibilité
variable-kind Linked File Fichier lié
variable-kind Graph Data Données du graphe
variable-kind Unknown Inconnu
variable-list-two {0}, {1} {0} et {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} et {1}
@msg a new document won't read these variables back with their kind: {names} un nouveau document ne relira pas ces variables avec leur type : {names}
@msg a new document refuses this file because of these variables: {names} un nouveau document refuse ce fichier à cause de ces variables : {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them l’en-tête `{header}` de `{name}` serait relu comme la variable `{other}` : renommez l’une des deux
Can't render this file because it is too large.
+8 -1
View File
@@ -8698,7 +8698,14 @@ antiAlias Sharp शार्प
@msg variable `{name}` is declared twice वेरिएबल `{name}` दो बार घोषित है
@msg variable `{to}` already exists वेरिएबल `{to}` पहले से मौजूद है
@msg variables are locked वेरिएबल्स लॉक हैं
@msg variables that aren't text were left out: {kinds} वेरिएबल जो टेक्स्ट नहीं छोड़े गए थे: {kinds}
@msg variables that aren't text were left out: {kinds} जो वेरिएबल टेक्स्ट नहीं हैं, उन्हें छोड़ दिया गया: {kinds}
variable-kind Visibility दृश्यता
variable-kind Linked File लिंक्ड फ़ाइल
variable-kind Graph Data ग्राफ़ डेटा
variable-kind Unknown अज्ञात
variable-list-two {0}, {1} {0} और {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} और {1}
@msg vc_abi_version returned {v}; this host implements version {ABI_VERSION} vc_abi_version ने {v} लौटाया; यह होस्ट संस्करण {ABI_VERSION} लागू करता है
@msg vc_alloc returned 0 (out of memory) vc_alloc ने 0 लौटाया (मेमोरी खत्म)
@msg vc_alloc returned a block outside memory vc_alloc ने मेमोरी के बाहर का ब्लॉक लौटाया
Can't render this file because it is too large.
+7
View File
@@ -5986,6 +5986,13 @@ imageTrace Outline Körvonal
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} több mint {MAX_CSV_ROWS} adatkészlet: az Adatkészletek importálása legfeljebb {MAX_CSV_ROWS} adatkészletet olvas be
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} több mint {MAX_CSV_COLS} változó: az Adatkészletek importálása legfeljebb {MAX_CSV_COLS} változót olvas be
@msg variables that aren't text were left out: {kinds} a nem szöveges változók kimaradtak: {kinds}
variable-kind Visibility Láthatóság
variable-kind Linked File Csatolt fájl
variable-kind Graph Data Diagramadatok
variable-kind Unknown Ismeretlen
variable-list-two {0}, {1} {0} és {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} és {1}
@msg a new document won't read these variables back with their kind: {names} egy új dokumentum nem a fajtájukkal olvassa vissza ezeket a változókat: {names}
@msg a new document refuses this file because of these variables: {names} egy új dokumentum ezen változók miatt elutasítja ezt a fájlt: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them a(z) `{name}` változó `{header}` fejléce a(z) `{other}` változóként olvasódna vissza: nevezze át az egyiket
Can't render this file because it is too large.
+7
View File
@@ -5205,6 +5205,13 @@ axis Both Entrambi
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} più di {MAX_CSV_ROWS} set di dati: Importa set di dati ne legge al massimo {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} più di {MAX_CSV_COLS} variabili: Importa set di dati ne legge al massimo {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} le variabili che non sono di testo sono state escluse: {kinds}
variable-kind Visibility Visibilità
variable-kind Linked File File collegato
variable-kind Graph Data Dati grafico
variable-kind Unknown Sconosciuto
variable-list-two {0}, {1} {0} e {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} e {1}
@msg a new document won't read these variables back with their kind: {names} un nuovo documento non rileggerà queste variabili con il loro tipo: {names}
@msg a new document refuses this file because of these variables: {names} un nuovo documento rifiuta questo file a causa di queste variabili: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them l’intestazione `{header}` di `{name}` verrebbe riletta come la variabile `{other}`: rinomina una delle due
Can't render this file because it is too large.
+7
View File
@@ -4566,6 +4566,13 @@ swatch Bright Violet ビビッドバイオレット
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} データセットが {MAX_CSV_ROWS} 個を超えています: 「データセットを読み込み」が読み込めるのは {MAX_CSV_ROWS} 個までです
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} 変数が {MAX_CSV_COLS} 個を超えています: 「データセットを読み込み」が読み込めるのは {MAX_CSV_COLS} 個までです
@msg variables that aren't text were left out: {kinds} テキスト以外の変数は除外されました: {kinds}
variable-kind Visibility 表示状態
variable-kind Linked File リンクファイル
variable-kind Graph Data グラフデータ
variable-kind Unknown 不明
variable-list-two {0}, {1} {0}、{1}
variable-list-middle {0}, {1} {0}、{1}
variable-list-end {0}, {1} {0}、{1}
@msg a new document won't read these variables back with their kind: {names} 新しいドキュメントでは、これらの変数は元の種類で読み込まれません: {names}
@msg a new document refuses this file because of these variables: {names} 新しいドキュメントは、これらの変数のためにこのファイルを拒否します: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}` の見出し `{header}` は変数 `{other}` として読み込まれます: どちらかの名前を変更してください
Can't render this file because it is too large.
+7
View File
@@ -8398,6 +8398,13 @@ imageTrace Outline კონტური
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} {MAX_CSV_ROWS}-ზე მეტი მონაცემთა ნაკრები: მონაცემთა ნაკრებების იმპორტი კითხულობს მაქსიმუმ {MAX_CSV_ROWS}-ს
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} {MAX_CSV_COLS}-ზე მეტი ცვლადი: მონაცემთა ნაკრებების იმპორტი კითხულობს მაქსიმუმ {MAX_CSV_COLS}-ს
@msg variables that aren't text were left out: {kinds} ცვლადები, რომლებიც ტექსტი არ არის, გამოტოვებულია: {kinds}
variable-kind Visibility ხილვადობა
variable-kind Linked File დაკავშირებული ფაილი
variable-kind Graph Data დიაგრამის მონაცემები
variable-kind Unknown უცნობი
variable-list-two {0}, {1} {0} და {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} და {1}
@msg a new document won't read these variables back with their kind: {names} ახალი დოკუმენტი ამ ცვლადებს მათი ტიპით ვერ წაიკითხავს: {names}
@msg a new document refuses this file because of these variables: {names} ახალი დოკუმენტი ამ ფაილს ამ ცვლადების გამო უარყოფს: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}`-ის სათაური `{header}` წაიკითხება როგორც ცვლადი `{other}`: გადაარქვით სახელი ერთ-ერთს
Can't render this file because it is too large.
+7
View File
@@ -4493,6 +4493,13 @@ theme Appearance 외관
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} 데이터 세트가 {MAX_CSV_ROWS}개보다 많습니다: 데이터 세트 가져오기는 최대 {MAX_CSV_ROWS}개를 읽습니다
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} 변수가 {MAX_CSV_COLS}개보다 많습니다: 데이터 세트 가져오기는 최대 {MAX_CSV_COLS}개를 읽습니다
@msg variables that aren't text were left out: {kinds} 텍스트가 아닌 변수는 제외되었습니다: {kinds}
variable-kind Visibility 가시성
variable-kind Linked File 연결된 파일
variable-kind Graph Data 그래프 데이터
variable-kind Unknown 알 수 없음
variable-list-two {0}, {1} {0} 및 {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} 및 {1}
@msg a new document won't read these variables back with their kind: {names} 새 문서는 이 변수들을 원래 종류로 다시 읽지 않습니다: {names}
@msg a new document refuses this file because of these variables: {names} 새 문서는 이 변수들 때문에 이 파일을 거부합니다: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}`의 머리글 `{header}`은(는) 변수 `{other}`(으)로 다시 읽힙니다: 둘 중 하나의 이름을 바꾸십시오
Can't render this file because it is too large.
+7
View File
@@ -8500,6 +8500,13 @@ swatch Bright Violet Felviolet
@msg the spine has no segments de as heeft geen segmenten
@msg variables are locked variabelen zijn vergrendeld
@msg variables that aren't text were left out: {kinds} variabelen die geen tekst zijn, zijn weggelaten: {kinds}
variable-kind Visibility Zichtbaarheid
variable-kind Linked File Gekoppeld bestand
variable-kind Graph Data Diagramgegevens
variable-kind Unknown Onbekend
variable-list-two {0}, {1} {0} en {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} en {1}
@msg a new document won't read these variables back with their kind: {names} een nieuw document leest deze variabelen niet terug met hun soort: {names}
@msg a new document refuses this file because of these variables: {names} een nieuw document weigert dit bestand vanwege deze variabelen: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them de kop `{header}` voor `{name}` zou worden gelezen als de variabele `{other}`: wijzig de naam van een van beide
Can't render this file because it is too large.
+7
View File
@@ -5296,6 +5296,13 @@ imageTrace Outline Kontur
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} więcej niż {MAX_CSV_ROWS} zestawów danych: Importuj zestawy danych odczytuje najwyżej {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} więcej niż {MAX_CSV_COLS} zmiennych: Importuj zestawy danych odczytuje najwyżej {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} pominięto zmienne, które nie są tekstowe: {kinds}
variable-kind Visibility Widoczność
variable-kind Linked File Połączony plik
variable-kind Graph Data Dane wykresu
variable-kind Unknown Nieznany
variable-list-two {0}, {1} {0} i {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} i {1}
@msg a new document won't read these variables back with their kind: {names} nowy dokument nie odczyta tych zmiennych z ich rodzajem: {names}
@msg a new document refuses this file because of these variables: {names} nowy dokument odrzuca ten plik z powodu tych zmiennych: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them nagłówek `{header}` dla `{name}` zostałby odczytany jako zmienna `{other}`: zmień nazwę jednej z nich
Can't render this file because it is too large.
+7
View File
@@ -4526,6 +4526,13 @@ axis Both Ambos
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} mais de {MAX_CSV_ROWS} conjuntos de dados: Importar Conjuntos de Dados lê no máximo {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} mais de {MAX_CSV_COLS} variáveis: Importar Conjuntos de Dados lê no máximo {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} as variáveis que não são de texto foram omitidas: {kinds}
variable-kind Visibility Visibilidade
variable-kind Linked File Arquivo Vinculado
variable-kind Graph Data Dados do Gráfico
variable-kind Unknown Desconhecido
variable-list-two {0}, {1} {0} e {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} e {1}
@msg a new document won't read these variables back with their kind: {names} um novo documento não lerá essas variáveis de volta com o tipo delas: {names}
@msg a new document refuses this file because of these variables: {names} um novo documento recusa este arquivo por causa destas variáveis: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them o cabeçalho `{header}` de `{name}` seria lido como a variável `{other}`: renomeie uma delas
Can't render this file because it is too large.
+7
View File
@@ -5203,6 +5203,13 @@ axis Both Оба
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} больше {MAX_CSV_ROWS} наборов данных: «Импортировать наборы данных» читает не более {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} больше {MAX_CSV_COLS} переменных: «Импортировать наборы данных» читает не более {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} переменные, которые не являются текстовыми, пропущены: {kinds}
variable-kind Visibility Видимость
variable-kind Linked File Связанный файл
variable-kind Graph Data Данные диаграммы
variable-kind Unknown Неизвестно
variable-list-two {0}, {1} {0} и {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} и {1}
@msg a new document won't read these variables back with their kind: {names} новый документ не прочитает эти переменные обратно с их типом: {names}
@msg a new document refuses this file because of these variables: {names} новый документ отклоняет этот файл из-за этих переменных: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them заголовок `{header}` для `{name}` будет прочитан как переменная `{other}`: переименуйте одну из них
Can't render this file because it is too large.
+7
View File
@@ -5058,6 +5058,13 @@ axis Both Båda
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} fler än {MAX_CSV_ROWS} datauppsättningar: Importera datauppsättningar läser högst {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} fler än {MAX_CSV_COLS} variabler: Importera datauppsättningar läser högst {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} variabler som inte är text utelämnades: {kinds}
variable-kind Visibility Synlighet
variable-kind Linked File Länkad fil
variable-kind Graph Data Diagramdata
variable-kind Unknown Okänd
variable-list-two {0}, {1} {0} och {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} och {1}
@msg a new document won't read these variables back with their kind: {names} ett nytt dokument läser inte tillbaka dessa variabler med deras typ: {names}
@msg a new document refuses this file because of these variables: {names} ett nytt dokument avvisar den här filen på grund av dessa variabler: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them rubriken `{header}` för `{name}` skulle läsas som variabeln `{other}`: byt namn på en av dem
Can't render this file because it is too large.
+64
View File
@@ -2230,6 +2230,70 @@ fn file_info_control_character_refusals_translate_in_every_complete_catalog() {
}
}
/// The warning about an SVG's variables that aren't text shows each kind VectorCraft names in the
/// interface language and each `trait` the file names, in backticks, as the warning writes it, the
/// entries in their order with their counts and joined as the language joins a list, in every
/// complete-message language.
#[test]
fn svg_variable_kinds_left_out_translate_in_every_complete_catalog() {
const KINDS: [&str; 4] = ["Visibility", "Linked File", "Graph Data", "Unknown"];
let warning = |kinds: &str| format!("variables that aren't text were left out: {kinds}");
for code in COMPLETE_MESSAGES {
let lang = Lang::from_code(code).expect("registered");
let cat = lang.catalog();
for ctx in ["variable-list-two", "variable-list-middle", "variable-list-end"] {
assert!(cat.contextual(ctx, "{0}, {1}").is_some(), "{code} has no {ctx} row");
}
let kind = |k: &str| cat.contextual("variable-kind", k).unwrap_or_else(|| panic!("{code} has no variable-kind row for {k}"));
let template = message(lang, &warning("{kinds}"));
assert!(template.contains("{kinds}"), "{code}: {template}");
let shown_with = |list: &str| template.replace("{kinds}", list);
let join = |ctx: &str, a: &str, b: &str| cat.contextual(ctx, "{0}, {1}").unwrap_or("{0}, {1}").replace("{0}", a).replace("{1}", b);
for k in KINDS {
// One kind, with its count.
let shown = message(lang, &warning(&format!("{k} (3)")));
assert_eq!(shown, shown_with(&format!("{} (3)", kind(k))), "{code}");
assert_ne!(kind(k), k, "{code}: {k} stays English");
}
// Two entries, one a `trait` that holds a backtick, a list separator and a count.
let shown = message(lang, &warning("Unknown (1), `a``b (1), c` (2)"));
assert_eq!(shown, shown_with(&join("variable-list-two", &format!("{} (1)", kind("Unknown")), "`a``b (1), c` (2)")), "{code}");
// Every kind, in the engine's order and in reverse, then a `trait` that is a kind's name.
for kinds in [KINDS.to_vec(), KINDS.iter().rev().copied().collect()] {
let list = kinds.iter().enumerate().map(|(i, k)| format!("{k} ({})", i + 1)).collect::<Vec<_>>().join(", ");
let shown = message(lang, &warning(&format!("{list}, `Visibility` (12)")));
let entries: Vec<String> =
kinds.iter().enumerate().map(|(i, k)| format!("{} ({})", kind(k), i + 1)).chain(["`Visibility` (12)".to_string()]).collect();
let head = entries[1..entries.len() - 1].iter().fold(entries[0].clone(), |acc, e| join("variable-list-middle", &acc, e));
assert_eq!(shown, shown_with(&join("variable-list-end", &head, &entries[entries.len() - 1])), "{code}");
}
}
let de = Lang::from_code("de").expect("registered");
assert_eq!(
message(de, &warning("Visibility (2), Linked File (1), Graph Data (4), Unknown (1)")),
"die Variablen, die kein Text sind, wurden ausgelassen: Sichtbarkeit (2), Verknüpfte Datei (1), Diagrammdaten (4) und Unbekannt (1)"
);
assert_eq!(
message(de, &warning("Unknown (1), `a``b (1), c` (2)")),
"die Variablen, die kein Text sind, wurden ausgelassen: Unbekannt (1) und `a``b (1), c` (2)"
);
assert_eq!(message(de, &warning("`Visibility` (1)")), "die Variablen, die kein Text sind, wurden ausgelassen: `Visibility` (1)");
let fr = Lang::from_code("fr").expect("registered");
assert_eq!(message(fr, &warning("Visibility (1)")), "les variables qui ne sont pas du texte ont été ignorées : Visibilité (1)");
let ja = Lang::from_code("ja").expect("registered");
assert_eq!(
message(ja, &warning("Visibility (1), Linked File (2), Unknown (1)")),
"テキスト以外の変数は除外されました: 表示状態 (1)、リンクファイル (2)、不明 (1)"
);
// A list not in the warning's form, and a `trait` whose backticks don't close, stay as written.
for kinds in ["fileref (1)", "`abc (1)", "Visibility (x)", "Visibility (1),Linked File (2)"] {
assert_eq!(message(de, &warning(kinds)), format!("die Variablen, die kein Text sind, wurden ausgelassen: {kinds}"));
}
// English shows the warning as the engine wrote it.
let english = warning("Visibility (2), `a``b (1), c` (1)");
assert_eq!(message(Lang::EN, &english), english);
}
/// 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
+7
View File
@@ -6488,6 +6488,13 @@ theme Appearance Görünüm
@msg an image has no pixels and was left out piksel içermeyen bir görüntü dışarıda bırakıldı
@msg thumbnail: no page {n} (the file has 1) thumbnail: {n}. sayfa yok (dosyada 1 sayfa var)
@msg variables that aren't text were left out: {kinds} metin olmayan değişkenler dışarıda bırakıldı: {kinds}
variable-kind Visibility Görünürlük
variable-kind Linked File Bağlantılı Dosya
variable-kind Graph Data Grafik Verileri
variable-kind Unknown Bilinmiyor
variable-list-two {0}, {1} {0} ve {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} ve {1}
@msg a new document won't read these variables back with their kind: {names} yeni bir belge bu değişkenleri türleriyle geri okumaz: {names}
@msg a new document refuses this file because of these variables: {names} yeni bir belge bu değişkenler nedeniyle bu dosyayı reddeder: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}` için `{header}` başlığı `{other}` değişkeni olarak okunur: birini yeniden adlandırın
Can't render this file because it is too large.
+7
View File
@@ -5189,6 +5189,13 @@ axis Both Обидві
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} більше ніж {MAX_CSV_ROWS} наборів даних: «Імпортувати набори даних» читає не більше {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} більше ніж {MAX_CSV_COLS} змінних: «Імпортувати набори даних» читає не більше {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} змінні, що не є текстовими, пропущено: {kinds}
variable-kind Visibility Видимість
variable-kind Linked File Пов’язаний файл
variable-kind Graph Data Дані діаграми
variable-kind Unknown Невідомо
variable-list-two {0}, {1} {0} і {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} і {1}
@msg a new document won't read these variables back with their kind: {names} новий документ не прочитає ці змінні назад з їхнім видом: {names}
@msg a new document refuses this file because of these variables: {names} новий документ відхиляє цей файл через ці змінні: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them заголовок `{header}` для `{name}` буде прочитано як змінну `{other}`: перейменуйте одну з них
Can't render this file because it is too large.
+7
View File
@@ -5737,6 +5737,13 @@ theme Appearance Giao diện
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} hơn {MAX_CSV_ROWS} tập dữ liệu: Nhập tập dữ liệu chỉ đọc tối đa {MAX_CSV_ROWS}
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} hơn {MAX_CSV_COLS} biến số: Nhập tập dữ liệu chỉ đọc tối đa {MAX_CSV_COLS}
@msg variables that aren't text were left out: {kinds} các biến số không phải văn bản đã bị bỏ qua: {kinds}
variable-kind Visibility Hiển thị
variable-kind Linked File Tệp được liên kết
variable-kind Graph Data Dữ liệu biểu đồ
variable-kind Unknown Không xác định
variable-list-two {0}, {1} {0} và {1}
variable-list-middle {0}, {1} {0}, {1}
variable-list-end {0}, {1} {0} và {1}
@msg a new document won't read these variables back with their kind: {names} tài liệu mới sẽ không đọc lại các biến số này đúng loại: {names}
@msg a new document refuses this file because of these variables: {names} tài liệu mới sẽ từ chối tệp này vì các biến số sau: {names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them tiêu đề `{header}` của `{name}` sẽ được đọc thành biến số `{other}`: hãy đổi tên một trong hai
Can't render this file because it contains an unexpected character in line 205 and column 5.
+7
View File
@@ -3922,6 +3922,13 @@ digits Malayalam 马拉雅拉姆数字
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} 数据集超过 {MAX_CSV_ROWS} 个:“导入数据集”最多读取 {MAX_CSV_ROWS} 个
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} 变量超过 {MAX_CSV_COLS} 个:“导入数据集”最多读取 {MAX_CSV_COLS} 个
@msg variables that aren't text were left out: {kinds} 已省略非文本变量:{kinds}
variable-kind Visibility 可见性
variable-kind Linked File 链接文件
variable-kind Graph Data 图表数据
variable-kind Unknown 未知
variable-list-two {0}, {1} {0}和{1}
variable-list-middle {0}, {1} {0}、{1}
variable-list-end {0}, {1} {0}和{1}
@msg a new document won't read these variables back with their kind: {names} 新文档不会按原类型读回这些变量:{names}
@msg a new document refuses this file because of these variables: {names} 新文档会因这些变量而拒绝此文件:{names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}` 的标题 `{header}` 会被读作变量 `{other}`:请重命名其中一个
Can't render this file because it is too large.
+7
View File
@@ -5189,6 +5189,13 @@ digits Malayalam 馬來亞拉姆數字
@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} 資料集超過 {MAX_CSV_ROWS} 個:「匯入資料集」最多讀取 {MAX_CSV_ROWS} 個
@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} 變數超過 {MAX_CSV_COLS} 個:「匯入資料集」最多讀取 {MAX_CSV_COLS} 個
@msg variables that aren't text were left out: {kinds} 已略過非文字變數:{kinds}
variable-kind Visibility 可見性
variable-kind Linked File 連結檔案
variable-kind Graph Data 圖表資料
variable-kind Unknown 未知
variable-list-two {0}, {1} {0}和{1}
variable-list-middle {0}, {1} {0}、{1}
variable-list-end {0}, {1} {0}和{1}
@msg a new document won't read these variables back with their kind: {names} 新文件不會以原類型讀回這些變數:{names}
@msg a new document refuses this file because of these variables: {names} 新文件會因這些變數而拒絕此檔案:{names}
@msg the header `{header}` for `{name}` would read back as the variable `{other}`: rename one of them `{name}` 的標題 `{header}` 會被讀作變數 `{other}`:請重新命名其中一個
Can't render this file because it is too large.
+2 -2
View File
@@ -792,12 +792,12 @@ mod tests {
let xml = r#"<variableSets><variableSet><variables><variable varName="Logo" trait="other"/></variables></variableSet></variableSets>"#;
app.run("variable.loadLibrary", json!({"xml": xml})).unwrap();
assert_eq!(app.ui.status, status, "the load gives no warning");
let warning = "variables that aren't text were left out: other (1)";
let warning = "variables that aren't text were left out: `other` (1)";
let langs: Vec<Lang> = Lang::all().filter(|l| l.code() != "en").collect();
assert!(langs.len() >= 23, "{} languages", langs.len());
for l in langs {
let shown = message(l, warning);
assert!(!shown.contains("left out") && shown.contains("other") && shown.contains('1'), "{}: {shown}", l.code());
assert!(!shown.contains("left out") && shown.contains("`other` (1)"), "{}: {shown}", l.code());
}
}
+6 -1
View File
@@ -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.
+1
View File
@@ -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.