mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 19:36:16 +00:00
Merge pull request #9084 from dotCooCoo/feat/plugin-api-run-notices
Plug-ins: a filter or plug-in command can report a notice in the status bar
This commit is contained in:
@@ -382,6 +382,7 @@ impl FilterRun {
|
||||
// A command's undo step is named after the command.
|
||||
let label = self.label();
|
||||
let (inputs, parent) = (self.inputs, self.parent);
|
||||
let notice = out.notice;
|
||||
// The output is applied to a copy of the document, as `colorcmds::edit_if_changed` applies
|
||||
// its pass: only a copy whose objects or kept data differ becomes the document, as one undo
|
||||
// step. Otherwise the document, its undo and redo steps and its saved state stay as they
|
||||
@@ -423,6 +424,11 @@ impl FilterRun {
|
||||
if let Some(cmd) = &self.command {
|
||||
out["command"] = json!(cmd.id);
|
||||
}
|
||||
// Only an output that was applied reports its notice, with the name of the plug-in that ran.
|
||||
if let Some(notice) = notice {
|
||||
out["notice"] = json!(notice);
|
||||
out["pluginName"] = json!(m.name);
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
}
|
||||
@@ -442,8 +448,9 @@ fn not_granted(name: &str, permission: Permission) -> EngineError {
|
||||
/// parameters and `_context` (what it keeps with the document included), and applies its output as
|
||||
/// one undo step ([`objects::apply_output`]; effect records as [`admit_effects`] admits them), with
|
||||
/// what it keeps with the document from now on: the output handed in for this very run when there
|
||||
/// is one ([`FilterRun::hand_in`]), else the plug-in's, run now. → `{plugin, ids}`: what it made or
|
||||
/// changed, which is then selected.
|
||||
/// is one ([`FilterRun::hand_in`]), else the plug-in's, run now. → `{plugin, ids, notice?,
|
||||
/// pluginName?}`: what it made or changed, which is then selected, and the output's `notice` once it
|
||||
/// was applied, with the plug-in's name.
|
||||
fn run(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
// An output handed in is for this run only (the app hands it in just before), whatever it does.
|
||||
let handed = s.plugin_output.take();
|
||||
@@ -816,7 +823,7 @@ fn spec_of(p: &Plugin, c: &Command) -> &'static CommandSpec {
|
||||
fields.push_str(own);
|
||||
}
|
||||
let params = format!(
|
||||
"{{{fields}}} run “{label}”, a command of plug-in {}, on the selected paths and compound paths as plugin.run runs a filter, with _context.command {:?}: one undo step, none when the run changes nothing → {{plugin, command, ids}}",
|
||||
"{{{fields}}} run “{label}”, a command of plug-in {}, on the selected paths and compound paths as plugin.run runs a filter, with _context.command {:?}: one undo step, none when the run changes nothing → {{plugin, command, ids, notice?, pluginName?}} (pluginName, the plug-in's name, comes with notice)",
|
||||
m.id, c.id
|
||||
);
|
||||
let mut made = MADE.lock().unwrap_or_else(|e| e.into_inner());
|
||||
@@ -852,9 +859,9 @@ fn unrouted(_: &mut Session, _: &Value) -> Result<Value> {
|
||||
/// Runs plug-in command `id` (`plugin.<plug-in id>.<command id>`): a filter run of the plug-in on
|
||||
/// `ids` (else the selection) with the command's own parameters, checked before it runs, and
|
||||
/// `_context.command`, under the plug-in's permissions and budget, applied as one undo step named
|
||||
/// after the command → `{plugin, command, ids}`. A run that fails (a trap, an exhausted budget, an
|
||||
/// output it may not make) leaves the document as it was, and the error names the plug-in and the
|
||||
/// command.
|
||||
/// after the command → `{plugin, command, ids, notice?, pluginName?}`. A run that fails (a trap, an exhausted
|
||||
/// budget, an output it may not make) leaves the document as it was, and the error names the
|
||||
/// plug-in and the command.
|
||||
pub(crate) fn run_command(s: &mut Session, id: &str, p: &Value) -> Result<Value> {
|
||||
// An output handed in is for `plugin.run` alone.
|
||||
s.plugin_output = None;
|
||||
@@ -1868,7 +1875,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Run Plug-in",
|
||||
[],
|
||||
None,
|
||||
"{id, params?: {…} (the plug-in's parameters; or give them as top-level keys; missing ones take their defaults, see plugin.info), ids?: [object id] (left out or null: the selection), …the plug-in's parameters as top-level keys} run an object filter on the selected paths and compound paths (inside selected groups and layers too; hidden, locked, guide and clipping paths, compound paths that clip a clip group and paths inside a group that clips one are left out): it may change, delete or add objects, as one undo step (an output that changes no object and no kept data records none and leaves the document unmodified); the result is selected, except the objects it locked or made guides. A filter whose manifest lists inputs (type, image, symbolInstance; it lists doc.read in permissions, so plugin.install needs grant) is also given the selected objects of those kinds to read, in paint order from the bottom, with at most 16 MiB of pixels and 16 MiB of type runs per run (an object that doesn't fit what the objects before it left comes with pixelsOmitted or truncated; an image that reaches the decoder counts toward the pixels even when decoding fails); every object counts toward the input's half of the plug-in's memory cap, ids, bounds, transforms and names included, and an object whose fields besides its pixels and runs don't fit fails the run with a memory-budget error naming it and its size (a path or compound path fails it with the memory-budget error for a selection too large to hand over), and more than 100,000 of these objects fail it with an object-budget error: its output returns each as {id} or exactly as given, or the run is refused and nothing changes. With nothing selected it gets no objects (generators add theirs to the current layer). A filter with a commandAllowlist runs the commands it names while it runs (vc_call, see docs/plugins.md): its calls and its output are one undo step, and a run that fails or makes a call that fails changes nothing → {plugin, ids}",
|
||||
"{id, params?: {…} (the plug-in's parameters; or give them as top-level keys; missing ones take their defaults, see plugin.info), ids?: [object id] (left out or null: the selection), …the plug-in's parameters as top-level keys} run an object filter on the selected paths and compound paths (inside selected groups and layers too; hidden, locked, guide and clipping paths, compound paths that clip a clip group and paths inside a group that clips one are left out): it may change, delete or add objects, as one undo step (an output that changes no object and no kept data records none and leaves the document unmodified); the result is selected, except the objects it locked or made guides. A filter whose manifest lists inputs (type, image, symbolInstance; it lists doc.read in permissions, so plugin.install needs grant) is also given the selected objects of those kinds to read, in paint order from the bottom, with at most 16 MiB of pixels and 16 MiB of type runs per run (an object that doesn't fit what the objects before it left comes with pixelsOmitted or truncated; an image that reaches the decoder counts toward the pixels even when decoding fails); every object counts toward the input's half of the plug-in's memory cap, ids, bounds, transforms and names included, and an object whose fields besides its pixels and runs don't fit fails the run with a memory-budget error naming it and its size (a path or compound path fails it with the memory-budget error for a selection too large to hand over), and more than 100,000 of these objects fail it with an object-budget error: its output returns each as {id} or exactly as given, or the run is refused and nothing changes. With nothing selected it gets no objects (generators add theirs to the current layer). A filter with a commandAllowlist runs the commands it names while it runs (vc_call, see docs/plugins.md): its calls and its output are one undo step, and a run that fails or makes a call that fails changes nothing → {plugin, ids, notice?, pluginName?} (notice: the text the output reports in its notice key once applied, escaped and cut at 200 characters; pluginName: the plug-in's name, with it)",
|
||||
has_doc,
|
||||
run
|
||||
),
|
||||
|
||||
@@ -333,6 +333,59 @@ fn failing_plugins_leave_the_document_and_history_alone() {
|
||||
}
|
||||
}
|
||||
|
||||
/// A filter's output may report a `notice`, which `plugin.run` returns once the output is applied,
|
||||
/// escaped and capped by the host, with the plug-in's name as `pluginName`. It needs no permission: a filter granted none reports one too.
|
||||
/// A `notice` that is not a string refuses the output, and the document and history stay as they
|
||||
/// were.
|
||||
#[test]
|
||||
fn a_filter_s_notice_is_returned_once_its_output_is_applied() {
|
||||
let mut s = session();
|
||||
let id = rect(&mut s, 10.0, "#ff0000").0;
|
||||
let quiet = "test.engine.notice.none";
|
||||
install(&mut s, &asking(quiet, "[]", &json!({"objects": [], "notice": "Nothing to tidy"})));
|
||||
let r = run(&mut s, "plugin.run", json!({"id": quiet}));
|
||||
assert_eq!((&r["plugin"], &r["notice"]), (&json!(quiet), &json!("Nothing to tidy")));
|
||||
assert_eq!(r["pluginName"], json!(format!("Test {quiet}")));
|
||||
let reading = |s: &mut Session, id: &str, output: &Value| {
|
||||
let data = vectorcraft_format::base64_encode(&asking(id, r#"["doc.read"]"#, output));
|
||||
run(s, "plugin.install", json!({"dataBase64": data, "grant": ["doc.read"], "replace": true}))
|
||||
};
|
||||
let noisy = "test.engine.notice.escaped";
|
||||
let long = format!("Done\u{202E}\n{}", "x".repeat(500));
|
||||
reading(&mut s, noisy, &json!({"objects": [{"id": id}], "notice": long}));
|
||||
let shown = run(&mut s, "plugin.run", json!({"id": noisy, "ids": [id]}))["notice"].as_str().unwrap_or_default().to_string();
|
||||
assert!(shown.starts_with("Done\\u{202E}\\u{000A}xx") && shown.ends_with('…'), "{shown}");
|
||||
assert_eq!(shown.chars().count(), vectorcraft_plugins::objects::MAX_NOTICE_CHARS);
|
||||
let plain = "test.engine.notice.plain";
|
||||
reading(&mut s, plain, &json!({"objects": [{"id": id}]}));
|
||||
let r = run(&mut s, "plugin.run", json!({"id": plain, "ids": [id]}));
|
||||
assert!(r.get("notice").is_none() && r.get("pluginName").is_none(), "{r}");
|
||||
let bad = "test.engine.notice.bad";
|
||||
install(&mut s, &asking(bad, "[]", &json!({"objects": [], "notice": 3})));
|
||||
let before = s.doc().unwrap().doc.clone();
|
||||
let undo = s.doc().unwrap().history.undo.len();
|
||||
let e = s.execute("plugin.run", &json!({"id": bad})).unwrap_err().to_string();
|
||||
assert!(e.contains("`notice` must be a string with visible text"), "{e}");
|
||||
assert_eq!(s.doc().unwrap().doc, before);
|
||||
assert_eq!(s.doc().unwrap().history.undo.len(), undo);
|
||||
}
|
||||
|
||||
/// A plug-in command's result carries its run's `notice` beside the command's id, and so does the
|
||||
/// step of a batch that runs it.
|
||||
#[test]
|
||||
fn a_plugin_command_returns_its_run_s_notice() {
|
||||
let mut s = session();
|
||||
let id = "test.engine.notice.command";
|
||||
let commands = r#"[{"id":"count","label":"Count"}]"#;
|
||||
install_wat(&mut s, &tpl::returning(&with_commands(id, "filter", commands), r#"{"objects":[],"notice":"Counted 0 objects"}"#));
|
||||
let count = crate::cmd::plugin::command_id(id, "count");
|
||||
let r = run(&mut s, &count, json!({}));
|
||||
assert_eq!((&r["command"], &r["notice"]), (&json!("count"), &json!("Counted 0 objects")));
|
||||
let batch = run(&mut s, "command.batch", json!({"commands": [{"command": count, "params": {}}]}));
|
||||
assert!(batch.to_string().contains("Counted 0 objects"), "{batch}");
|
||||
run(&mut s, "plugin.remove", json!({"id": id}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn live_effect_plugins_reshape_editable_art_and_expand() {
|
||||
let mut s = session();
|
||||
|
||||
@@ -38,6 +38,8 @@ pub const MITER_LIMIT: std::ops::RangeInclusive<f64> = 1.0..=500.0;
|
||||
pub const MAX_EFFECT_ID: usize = 128;
|
||||
/// Largest data a plug-in may keep with a document (`documentData`), in bytes of JSON.
|
||||
pub const MAX_DOCUMENT_DATA: usize = 1 << 20;
|
||||
/// Most characters of a filter's `notice` as the host shows it, its escapes counted.
|
||||
pub const MAX_NOTICE_CHARS: usize = 200;
|
||||
/// Most text a filter is given of one type object, in bytes of UTF-8 over all its runs: longer
|
||||
/// type comes with `truncated` and no runs or paragraphs.
|
||||
pub const MAX_INPUT_TEXT: usize = 256 * 1024;
|
||||
@@ -794,10 +796,12 @@ pub struct Output {
|
||||
/// (what the plug-in keeps stays as it is), `Some(None)` for `null` (it forgets it), else what
|
||||
/// it keeps from now on, at most [`MAX_DOCUMENT_DATA`] bytes of JSON.
|
||||
pub document_data: Option<Option<Value>>,
|
||||
/// `notice`, the run's report for the status bar, as [`decode_notice`] reads it.
|
||||
pub notice: Option<String>,
|
||||
}
|
||||
|
||||
/// Parses a filter's output: `{"objects": [...], "documentData"?: …}`, or `{"error": "message"}`
|
||||
/// when the plug-in declined (the message reaches the user).
|
||||
/// Parses a filter's output: `{"objects": [...], "documentData"?: …, "notice"?: "…"}`, or
|
||||
/// `{"error": "message"}` when the plug-in declined (the message reaches the user).
|
||||
pub fn decode_output(bytes: &[u8]) -> Result<Output> {
|
||||
decode_output_with(bytes, &[], &HashMap::new())
|
||||
}
|
||||
@@ -822,7 +826,70 @@ pub fn decode_output_with(bytes: &[u8], input: &[u8], read_only: &ReadOnlySpans)
|
||||
Some(Some(data))
|
||||
}
|
||||
};
|
||||
Ok(Output { objects, document_data })
|
||||
let notice = decode_notice(&v)?;
|
||||
Ok(Output { objects, document_data, notice })
|
||||
}
|
||||
|
||||
/// The `notice` of output `v`: `None` when it has none (or `null`), else its text without the
|
||||
/// white space around it, as [`crate::permissions::display_text`] shows plug-in text (control,
|
||||
/// bidirectional formatting and separator characters escaped) and at most [`MAX_NOTICE_CHARS`]
|
||||
/// characters. A `notice` that is not a string, or whose shown part has no character besides white
|
||||
/// space, control characters and the default-ignorable characters the host does not escape, is an
|
||||
/// error.
|
||||
pub fn decode_notice(v: &Value) -> Result<Option<String>> {
|
||||
match v.get("notice") {
|
||||
None | Some(Value::Null) => Ok(None),
|
||||
Some(Value::String(s)) if shown_part_is_visible(s.trim()) => Ok(Some(crate::permissions::display_text(s.trim(), MAX_NOTICE_CHARS))),
|
||||
Some(_) => Err(Error::Output("`notice` must be a string with visible text".into())),
|
||||
}
|
||||
}
|
||||
|
||||
/// Does the part of notice `s` that [`crate::permissions::display_text`] keeps within
|
||||
/// [`MAX_NOTICE_CHARS`], escapes counted and room left for the `…` when it cuts, hold a character
|
||||
/// that draws something?
|
||||
fn shown_part_is_visible(s: &str) -> bool {
|
||||
let shows = |c: char| !c.is_whitespace() && !c.is_control() && !draws_nothing(c);
|
||||
let width = |c: char| crate::permissions::display_text(c.encode_utf8(&mut [0; 4]), usize::MAX).chars().count();
|
||||
// Characters written through the end of `c`, and through the first visible character.
|
||||
let mut used = 0;
|
||||
let mut visible_by = None;
|
||||
for c in s.chars() {
|
||||
used += width(c);
|
||||
if visible_by.is_none() && shows(c) {
|
||||
visible_by = Some(used);
|
||||
}
|
||||
if used > MAX_NOTICE_CHARS {
|
||||
break;
|
||||
}
|
||||
}
|
||||
visible_by.is_some_and(|end| used <= MAX_NOTICE_CHARS || end < MAX_NOTICE_CHARS)
|
||||
}
|
||||
|
||||
/// Is `c` one of Unicode's default-ignorable characters (soft hyphen, zero-width and invisible
|
||||
/// characters, fillers, variation selectors, tags) that [`crate::permissions::display_text`] keeps
|
||||
/// as it is, so it draws nothing? The bidirectional ones it escapes are not among them.
|
||||
fn draws_nothing(c: char) -> bool {
|
||||
matches!(
|
||||
c,
|
||||
'\u{00AD}'
|
||||
| '\u{034F}'
|
||||
| '\u{115F}'
|
||||
| '\u{1160}'
|
||||
| '\u{17B4}'
|
||||
| '\u{17B5}'
|
||||
| '\u{180B}'..='\u{180F}'
|
||||
| '\u{200B}'..='\u{200D}'
|
||||
| '\u{2060}'..='\u{2065}'
|
||||
| '\u{206A}'..='\u{206F}'
|
||||
| '\u{3164}'
|
||||
| '\u{FE00}'..='\u{FE0F}'
|
||||
| '\u{FEFF}'
|
||||
| '\u{FFA0}'
|
||||
| '\u{FFF0}'..='\u{FFF8}'
|
||||
| '\u{1BCA0}'..='\u{1BCA3}'
|
||||
| '\u{1D173}'..='\u{1D17A}'
|
||||
| '\u{E0000}'..='\u{E0FFF}'
|
||||
)
|
||||
}
|
||||
|
||||
/// Parses a plug-in's objects: `{"objects": [...]}`, or `{"error": "message"}` when the plug-in
|
||||
|
||||
@@ -1172,3 +1172,52 @@ fn document_data_is_kept_forgotten_or_refused() {
|
||||
// A decline is still a decline.
|
||||
assert!(matches!(decode_output(br#"{"error": "No pens.", "documentData": 1}"#), Err(Error::Failed(_))));
|
||||
}
|
||||
|
||||
/// A filter's `notice`: absent or `null` is none; a string is trimmed, its control, bidirectional
|
||||
/// and separator characters escaped, and cut at [`MAX_NOTICE_CHARS`] with an ellipsis; anything
|
||||
/// else, and text with nothing visible, refuses the whole output.
|
||||
#[test]
|
||||
fn notice_is_escaped_capped_and_checked() {
|
||||
let out = |notice: Option<Value>| {
|
||||
let mut v = json!({"objects": []});
|
||||
if let Some(n) = notice {
|
||||
v["notice"] = n;
|
||||
}
|
||||
decode_output(v.to_string().as_bytes()).map(|o| o.notice)
|
||||
};
|
||||
assert_eq!(out(None).unwrap(), None);
|
||||
assert_eq!(out(Some(Value::Null)).unwrap(), None);
|
||||
assert_eq!(out(Some(json!(" Selected 12 objects \n"))).unwrap().as_deref(), Some("Selected 12 objects"));
|
||||
let shown = out(Some(json!("Saved\u{202E}txt.exe\nError: disk full\u{7}"))).unwrap().unwrap_or_default();
|
||||
assert_eq!(shown, "Saved\\u{202E}txt.exe\\u{000A}Error: disk full\\u{0007}");
|
||||
let long = out(Some(json!("y".repeat(10_000)))).unwrap().unwrap_or_default();
|
||||
assert_eq!(long.chars().count(), MAX_NOTICE_CHARS);
|
||||
assert!(long.ends_with('…'));
|
||||
// Escapes count toward the limit, so a notice of right-to-left overrides stays within it too.
|
||||
let escaped = out(Some(json!("\u{202E}".repeat(10_000)))).unwrap().unwrap_or_default();
|
||||
assert!(escaped.chars().count() <= MAX_NOTICE_CHARS && !escaped.contains('\u{202E}'), "{escaped}");
|
||||
for bad in [
|
||||
json!(""),
|
||||
json!(" \t\n "),
|
||||
json!("\u{200B}\u{FEFF}"),
|
||||
json!("\u{034F}"),
|
||||
json!("\u{3164}\u{FE0F}\u{E0041}"),
|
||||
// The visible text comes after the cut, so the status bar would show only the `…`.
|
||||
json!(format!("{}AB", "\u{200B}".repeat(MAX_NOTICE_CHARS - 1))),
|
||||
json!(format!("{}A", "\u{7}".repeat(MAX_NOTICE_CHARS / 8))),
|
||||
json!(12),
|
||||
json!(["a"]),
|
||||
json!({"text": "a"}),
|
||||
json!(true),
|
||||
] {
|
||||
assert!(matches!(out(Some(bad.clone())), Err(Error::Output(ref e)) if e.contains("`notice`")), "{bad}");
|
||||
}
|
||||
// Text with a visible character keeps the invisible ones, and its bidirectional ones escaped.
|
||||
assert_eq!(out(Some(json!("\u{2067}Done\u{034F}"))).unwrap().as_deref(), Some("\\u{2067}Done\u{034F}"));
|
||||
// A visible character in the last place the limit shows, whole or before the `…`, is enough.
|
||||
let pad = "\u{200B}".repeat(MAX_NOTICE_CHARS - 2);
|
||||
assert_eq!(out(Some(json!(format!("{pad}\u{200B}A")))).unwrap(), Some(format!("{pad}\u{200B}A")));
|
||||
assert_eq!(out(Some(json!(format!("{pad}ABC")))).unwrap(), Some(format!("{pad}A…")));
|
||||
// A decline is still a decline.
|
||||
assert!(matches!(decode_output(br#"{"error": "No pens.", "notice": "Done"}"#), Err(Error::Failed(_))));
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ pub enum Scope {
|
||||
}
|
||||
|
||||
/// Parses and checks a painted result: `{"objects": [...]}`, or `{"error": "message"}` when the
|
||||
/// plug-in declined. `rule` is the fill rule a piece without `fillRule` takes. Any other top-level
|
||||
/// key, an unknown key in a piece, stroke or paint, a list or count past its limit, a number out of
|
||||
/// plug-in declined. `rule` is the fill rule a piece without `fillRule` takes. A top-level `notice`
|
||||
/// is ignored. Any other top-level key, an unknown key in a piece, stroke or paint, a list or count past its limit, a number out of
|
||||
/// range or a paint of the wrong form refuses the whole result, naming the field.
|
||||
pub fn decode(bytes: &[u8], scope: Scope, rule: FillRule) -> Result<Vec<Piece>> {
|
||||
let v: Value = serde_json::from_slice(bytes).map_err(|e| out_err("output", format!("not JSON: {e}")))?;
|
||||
@@ -56,8 +56,8 @@ pub fn decode(bytes: &[u8], scope: Scope, rule: FillRule) -> Result<Vec<Piece>>
|
||||
return Err(e);
|
||||
}
|
||||
let top = v.as_object().ok_or_else(|| out_err("output", "expected {\"objects\": [...]}"))?;
|
||||
if let Some(k) = top.keys().find(|k| !matches!(k.as_str(), "objects" | "error")) {
|
||||
return Err(out_err(k, "a painted live effect returns only `objects`"));
|
||||
if let Some(k) = top.keys().find(|k| !matches!(k.as_str(), "objects" | "error" | "notice")) {
|
||||
return Err(out_err(k, "a painted live effect returns only `objects` and `notice`"));
|
||||
}
|
||||
let objects = top.get("objects").and_then(Value::as_array).ok_or_else(|| out_err("objects", "expected {\"objects\": [...]}"))?;
|
||||
if objects.len() > MAX_OBJECTS {
|
||||
|
||||
@@ -154,6 +154,21 @@ fn faults_refuse_the_whole_result_by_field() {
|
||||
assert_eq!(declined, Error::Failed("nothing to do".into()));
|
||||
}
|
||||
|
||||
/// A top-level `notice` is ignored, as a filter-only key a live effect may hand back; other
|
||||
/// unknown top-level keys still refuse the result.
|
||||
#[test]
|
||||
fn a_notice_is_ignored_and_other_top_level_keys_refused() {
|
||||
let ok = json!({"path": square(), "fills": [red()]});
|
||||
let decode_top = |top: Value| decode(&serde_json::to_vec(&top).unwrap(), Scope::Object, FillRule::NonZero);
|
||||
let pieces = decode_top(json!({"objects": [ok], "notice": "Done"})).unwrap();
|
||||
assert_eq!(pieces.len(), 1);
|
||||
assert_eq!(decode_top(json!({"objects": [ok], "notice": 12})).unwrap().len(), 1);
|
||||
for key in ["note", "notices", "message"] {
|
||||
let e = decode_top(json!({"objects": [ok], key: "Done"})).unwrap_err().to_string();
|
||||
assert!(e.contains(&format!("{key}:")) && e.contains("returns only `objects` and `notice`"), "{key}: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A key a paint does not have, at any level of it, refuses the result and is named; it is not
|
||||
/// dropped.
|
||||
#[test]
|
||||
|
||||
@@ -81,6 +81,9 @@ impl VectorcraftApp {
|
||||
if id == "prefs.import" && result.is_ok() {
|
||||
crate::prefs_dialog::imported(self, touch_workspace);
|
||||
}
|
||||
if let Ok(r) = &result {
|
||||
crate::plugin_runs::show_notice(self, id, r);
|
||||
}
|
||||
placing::settle_swatch_paste(self);
|
||||
result
|
||||
}
|
||||
|
||||
@@ -310,15 +310,22 @@ fn date_time_now() -> (String, u64) {
|
||||
}
|
||||
|
||||
/// The status message in the interface language. While it is the error of the last script run
|
||||
/// and that error's message is text the script supplied, that text is shown as it is and only the
|
||||
/// words around it are translated.
|
||||
/// and that error's message is text the script supplied, or a plug-in run's notice
|
||||
/// ([`crate::state::UiState::status_kept`]), that text is shown as it is and only the words around
|
||||
/// it are translated.
|
||||
pub(crate) fn status_message(app: &VectorcraftApp) -> String {
|
||||
let status = app.ui.status.as_str();
|
||||
let is = |before: &str, kept: &str, after: &str| status.strip_prefix(before).and_then(|rest| rest.strip_suffix(after)) == Some(kept);
|
||||
if let Some((before, kept, after)) = app.session.script_authored_failure()
|
||||
&& status.strip_prefix(before.as_str()).and_then(|rest| rest.strip_suffix(after.as_str())) == Some(kept)
|
||||
&& is(&before, kept, &after)
|
||||
{
|
||||
return crate::i18n::msg_keeping(&before, kept, &after);
|
||||
}
|
||||
if let Some((before, kept, after)) = &app.ui.status_kept
|
||||
&& is(before, kept, after)
|
||||
{
|
||||
return crate::i18n::msg_keeping(before, kept, after);
|
||||
}
|
||||
crate::i18n::msg(status)
|
||||
}
|
||||
|
||||
|
||||
@@ -500,6 +500,59 @@ fn german_script_status_preserves_authored_error_and_translates_native_error() {
|
||||
assert_eq!(app.session.script_authored_failure(), None);
|
||||
}
|
||||
|
||||
/// A plug-in run's notice shows in the status bar after the plug-in's name once its output is
|
||||
/// applied: the words around it are translated and the notice itself never is, even when it reads
|
||||
/// like one of the app's own messages. A run whose output is refused shows no notice, and the next
|
||||
/// status message replaces the notice.
|
||||
#[test]
|
||||
fn plugin_notice_shows_after_the_plug_in_s_name_and_is_never_translated() {
|
||||
use vectorcraft_plugins::wat as tpl;
|
||||
let mut app = crate::VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
let install = |app: &mut crate::VectorcraftApp, id: &str, output: &str| {
|
||||
let module = wat::parse_str(tpl::returning(&tpl::manifest(id, "filter", "{}"), output)).unwrap();
|
||||
app.run("plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(&module), "replace": true})).unwrap();
|
||||
};
|
||||
let id = "test.ui.notice";
|
||||
install(&mut app, id, r#"{"objects":[],"notice":"invalid array length"}"#);
|
||||
let r = app.run("plugin.run", json!({"id": id})).unwrap();
|
||||
assert_eq!(r["notice"], json!("invalid array length"));
|
||||
assert_eq!(app.ui.status, format!("Plug-in “Test {id}”: invalid array length"));
|
||||
crate::i18n::set_current(crate::i18n::Lang::from_code("de").expect("de registered"));
|
||||
assert_eq!(super::status_bar::status_message(&app), format!("Plug-in „Test {id}“: invalid array length"));
|
||||
// The same words as an ordinary message are translated.
|
||||
app.status("invalid array length");
|
||||
assert_eq!(super::status_bar::status_message(&app), "ungültige Array-Länge");
|
||||
crate::i18n::set_current(crate::i18n::Lang::EN);
|
||||
// An output refused for its notice shows no notice.
|
||||
let bad = "test.ui.notice.bad";
|
||||
install(&mut app, bad, r#"{"objects":[],"notice":"\u0007"}"#);
|
||||
app.status("");
|
||||
assert!(app.run("plugin.run", json!({"id": bad})).is_err());
|
||||
assert!(!app.ui.status.starts_with("Plug-in “"), "{}", app.ui.status);
|
||||
// A plug-in step of a batch, as an action plays it, shows its notice too.
|
||||
app.status("");
|
||||
app.replay("command.batch", json!({"commands": [{"command": "plugin.run", "params": {"id": id}}, {"command": "select.none"}]})).unwrap();
|
||||
assert_eq!(app.ui.status, format!("Plug-in “Test {id}”: invalid array length"));
|
||||
// A batch without a plug-in step leaves the status bar as it is.
|
||||
app.status("kept");
|
||||
app.run("command.batch", json!({"commands": [{"command": "select.none"}]})).unwrap();
|
||||
assert_eq!(app.ui.status, "kept");
|
||||
// The notice keeps the plug-in's name when a later step of the batch removes the plug-in.
|
||||
app.status("");
|
||||
let run_and_remove = json!({"commands": [{"command": "plugin.run", "params": {"id": id}}, {"command": "plugin.remove", "params": {"id": id}}]});
|
||||
app.run("command.batch", run_and_remove).unwrap();
|
||||
assert!(vectorcraft_plugins::registry::get(id).is_none());
|
||||
assert_eq!(app.ui.status, format!("Plug-in “Test {id}”: invalid array length"));
|
||||
// A name's closing ellipsis is dropped, and a name that is only an ellipsis shows the plug-in's id.
|
||||
for (name, shown) in [("Resize…", "Resize"), (" … ", id)] {
|
||||
let r = json!({"plugin": id, "ids": [], "notice": "done", "pluginName": name});
|
||||
crate::plugin_runs::show_notice(&mut app, "plugin.run", &r);
|
||||
assert_eq!(app.ui.status, format!("Plug-in “{shown}”: done"));
|
||||
}
|
||||
app.run("plugin.remove", json!({"id": bad})).unwrap();
|
||||
}
|
||||
|
||||
/// The message of an open that starts with a line about its linked files lists the open's notes on
|
||||
/// hover and for screen readers, in a wide and in a narrow window. A later message leaves the list
|
||||
/// out.
|
||||
|
||||
@@ -48,8 +48,8 @@ impl LivePreview {
|
||||
Some(answer)
|
||||
}
|
||||
|
||||
/// OK: keeps the previewed `cmd` as one undo step (or runs it when no preview runs); the command's warning shows
|
||||
/// in the status bar either way. On an error the dialog stays open.
|
||||
/// OK: keeps the previewed `cmd` as one undo step (or runs it when no preview runs); the command's warning, or a
|
||||
/// plug-in run's notice, shows in the status bar either way. On an error the dialog stays open.
|
||||
pub(crate) fn commit(self, app: &mut VectorcraftApp, cmd: &str, params: Value) -> Result<Value, String> {
|
||||
if !app.session.in_interaction() {
|
||||
return app.run(cmd, params);
|
||||
@@ -61,6 +61,9 @@ impl LivePreview {
|
||||
{
|
||||
app.status(w.to_string());
|
||||
}
|
||||
if r.is_ok() {
|
||||
crate::plugin_runs::show_notice(app, cmd, &v);
|
||||
}
|
||||
r
|
||||
}
|
||||
|
||||
|
||||
@@ -7154,6 +7154,8 @@ liquify-list-end {0}, {1} {0} i {1}
|
||||
@msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them S’ha restaurat {n} document recuperat: desa’l per conservar-lo|S’han restaurat {n} documents recuperats: desa’ls per conservar-los
|
||||
@msg result would exceed the canvas (coordinates out of range) el resultat excediria el llenç (coordenades fora de rang)
|
||||
@msg Running “{name}”… S’està executant «{name}»…
|
||||
@msg Plug-in “{name}”: {notice} Complement «{name}»: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` ha de ser una cadena amb text visible
|
||||
@msg Save for Web: the image is empty Desa per a la web: la imatge és buida
|
||||
@msg Save writes {_1}, not {_2}: use document.export for other formats Desa escriu {_1}, no {_2}: fes servir document.export per a altres formats
|
||||
@msg Save writes {_1}, not {_2}: use file.saveAsTemplate to write it Desa escriu {_1}, no {_2}: fes servir file.saveAsTemplate per escriure’l
|
||||
@@ -7792,7 +7794,7 @@ variable-list-end {0}, {1} {0} i {1}
|
||||
@msg a list of {min_items} to {max_items} numbers una llista de {min_items} a {max_items} nombres
|
||||
@msg a new object needs a `path` un objecte nou necessita un `path`
|
||||
@msg a number un nombre
|
||||
@msg a painted live effect returns only `objects` un efecte dinàmic de pintura només retorna `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` un efecte dinàmic de pintura només retorna `objects` i `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` una peça d’un efecte dinàmic de pintura només té `path`, `fillRule`, `fills` i `strokes`
|
||||
@msg a read-only object was left out s’ha omès un objecte de només lectura
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given s’ha omès un objecte de només lectura: retorneu-lo com a {{"id": …}} sol o tal com s’ha rebut
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7314,6 +7314,8 @@ axis Y Axis osa Y
|
||||
Cancel Plug-in Run Zrušit běh zásuvného modulu
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} doběhl, ale dokument nebo zásuvný modul se mezitím změnil: spusťte ho znovu
|
||||
@msg Running “{name}”… Spouští se „{name}“…
|
||||
@msg Plug-in “{name}”: {notice} Zásuvný modul „{name}“: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` musí být řetězec s viditelným textem
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` živý efekt běží během vykreslování dokumentu, takže nemůže být `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out exportní zásuvný modul dostává vždy rozpočet exportu: klíč `budget` vynechte
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants „{_1}“ žádá o velký výpočetní rozpočet (každé spuštění až {minutes} minut a {times}krát víc instrukcí než obvykle): musí ho schválit člověk v desktopové aplikaci, nebo předejte `allowHeavy: true` v relaci spuštěné s --allow-plugin-grants
|
||||
@@ -7405,7 +7407,7 @@ axis Y Axis osa Y
|
||||
@msg a list of {min_items} to {max_items} numbers seznam {min_items} až {max_items} čísel
|
||||
@msg a new object needs a `path` nový objekt potřebuje `path`
|
||||
@msg a number číslo
|
||||
@msg a painted live effect returns only `objects` malující živý efekt vrací jen `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` malující živý efekt vrací jen `objects` a `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` část malujícího živého efektu má jen `path`, `fillRule`, `fills` a `strokes`
|
||||
@msg a read-only object was left out objekt jen pro čtení byl vynechán
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given objekt jen pro čtení byl vynechán: vraťte ho jako samotné {{"id": …}} nebo tak, jak byl předán
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -530,6 +530,8 @@ liquify-list-end {0}, {1} {0} og {1}
|
||||
@msg `spread` applies to linear, radial, conic and diamond gradients `spread` gælder for lineære, radiale, koniske og diamantformede gradienter
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} blev færdig, men dokumentet eller plug-in'et ændrede sig i mellemtiden: kør det igen
|
||||
@msg Running “{name}”… Kører »{name}«…
|
||||
@msg Plug-in “{name}”: {notice} Plug-in »{name}«: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` skal være en streng med synlig tekst
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` en live-effekt kører, mens dokumentet tegnes, så den kan ikke være `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out en eksportør får altid et eksportbudget: udelad `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants »{_1}« beder om et tungt budget (hver kørsel op til {minutes} minutter og {times} gange de sædvanlige instruktioner): en person skal godkende det i skrivebordsappen, eller send `allowHeavy: true` i en session startet med --allow-plugin-grants
|
||||
@@ -621,7 +623,7 @@ liquify-list-end {0}, {1} {0} og {1}
|
||||
@msg a list of {min_items} to {max_items} numbers en liste med {min_items} til {max_items} tal
|
||||
@msg a new object needs a `path` et nyt objekt kræver en `path`
|
||||
@msg a number et tal
|
||||
@msg a painted live effect returns only `objects` en malet live-effekt returnerer kun `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` en malet live-effekt returnerer kun `objects` og `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` et stykke fra en malet live-effekt har kun `path`, `fillRule`, `fills` og `strokes`
|
||||
@msg a read-only object was left out et skrivebeskyttet objekt blev udeladt
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given et skrivebeskyttet objekt blev udeladt: returnér det, som {{"id": …}} alene eller som det blev givet
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6897,6 +6897,8 @@ axis Y Axis Y-Achse
|
||||
Cancel Plug-in Run Plug-in-Ausführung abbrechen
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} ist fertig, aber das Dokument oder das Plug-in hat sich inzwischen geändert: Führen Sie es erneut aus
|
||||
@msg Running “{name}”… „{name}“ wird ausgeführt…
|
||||
@msg Plug-in “{name}”: {notice} Plug-in „{name}“: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` muss eine Zeichenkette mit sichtbarem Text sein
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` ein Live-Effekt läuft, während das Dokument gezeichnet wird, daher kann er nicht `heavy` sein
|
||||
@msg an exporter always gets an export's budget: leave `budget` out ein Export-Plug-in erhält immer das Budget eines Exports: Lassen Sie `budget` weg
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants „{_1}“ verlangt ein großes Rechenbudget (jede Ausführung bis zu {minutes} Minuten und {times}-mal so viele Anweisungen wie üblich): Eine Person muss es in der Desktop-App genehmigen, oder übergeben Sie `allowHeavy: true` in einer mit --allow-plugin-grants gestarteten Sitzung
|
||||
@@ -6988,7 +6990,7 @@ axis Y Axis Y-Achse
|
||||
@msg a list of {min_items} to {max_items} numbers eine Liste von {min_items} bis {max_items} Zahlen
|
||||
@msg a new object needs a `path` ein neues Objekt braucht einen `path`
|
||||
@msg a number eine Zahl
|
||||
@msg a painted live effect returns only `objects` ein malender Live-Effekt gibt nur `objects` zurück
|
||||
@msg a painted live effect returns only `objects` and `notice` ein malender Live-Effekt gibt nur `objects` und `notice` zurück
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` ein Teil eines malenden Live-Effekts hat nur `path`, `fillRule`, `fills` und `strokes`
|
||||
@msg a read-only object was left out ein schreibgeschütztes Objekt wurde weggelassen
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given ein schreibgeschütztes Objekt wurde weggelassen: Geben Sie es zurück, als {{"id": …}} allein oder so, wie es übergeben wurde
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7303,6 +7303,8 @@ axis Y Axis Άξονας Y
|
||||
Cancel Plug-in Run Ακύρωση εκτέλεσης προσθέτου
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again Το {_1} ολοκληρώθηκε, αλλά το έγγραφο ή το πρόσθετο άλλαξε στο μεταξύ: εκτελέστε το ξανά
|
||||
@msg Running “{name}”… Εκτέλεση του «{name}»…
|
||||
@msg Plug-in “{name}”: {notice} Πρόσθετο «{name}»: {notice}
|
||||
@msg `notice` must be a string with visible text το `notice` πρέπει να είναι συμβολοσειρά με ορατό κείμενο
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` ένα δυναμικό εφέ εκτελείται κατά τη σχεδίαση του εγγράφου, οπότε δεν μπορεί να είναι `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out ένα πρόσθετο εξαγωγής παίρνει πάντα τον προϋπολογισμό μιας εξαγωγής: παραλείψτε το `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants το «{_1}» ζητά μεγάλο υπολογιστικό προϋπολογισμό (κάθε εκτέλεση έως {minutes} λεπτά και {times} φορές τις συνήθεις εντολές): πρέπει να το εγκρίνει ένα άτομο στην εφαρμογή επιφάνειας εργασίας ή περάστε `allowHeavy: true` σε μια συνεδρία που ξεκίνησε με --allow-plugin-grants
|
||||
@@ -7395,7 +7397,7 @@ axis Y Axis Άξονας Y
|
||||
@msg a list of {min_items} to {max_items} numbers λίστα {min_items} έως {max_items} αριθμών
|
||||
@msg a new object needs a `path` ένα νέο αντικείμενο χρειάζεται `path`
|
||||
@msg a number αριθμός
|
||||
@msg a painted live effect returns only `objects` ένα ζωντανό εφέ βαφής επιστρέφει μόνο `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` ένα ζωντανό εφέ βαφής επιστρέφει μόνο `objects` και `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` ένα κομμάτι ζωντανού εφέ βαφής έχει μόνο `path`, `fillRule`, `fills` και `strokes`
|
||||
@msg a read-only object was left out παραλείφθηκε ένα αντικείμενο μόνο για ανάγνωση
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given παραλείφθηκε ένα αντικείμενο μόνο για ανάγνωση: επιστρέψτε το ως {{"id": …}} μόνο ή όπως δόθηκε
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7289,6 +7289,8 @@ axis Y Axis Eje Y
|
||||
Cancel Plug-in Run Cancelar ejecución del plugin
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} terminó, pero el documento o el plugin cambió entretanto: vuelva a ejecutarlo
|
||||
@msg Running “{name}”… Ejecutando “{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Plugin “{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` debe ser una cadena con texto visible
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` un efecto interactivo se ejecuta mientras se dibuja el documento, así que no puede ser `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out un plugin de exportación siempre recibe el presupuesto de una exportación: omite `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” pide un presupuesto de cálculo grande (cada ejecución hasta {minutes} minutos y {times} veces las instrucciones habituales): una persona debe aprobarlo en la aplicación de escritorio, o pasa `allowHeavy: true` en una sesión iniciada con --allow-plugin-grants
|
||||
@@ -7381,7 +7383,7 @@ axis Y Axis Eje Y
|
||||
@msg a list of {min_items} to {max_items} numbers una lista de {min_items} a {max_items} números
|
||||
@msg a new object needs a `path` un objeto nuevo necesita un `path`
|
||||
@msg a number un número
|
||||
@msg a painted live effect returns only `objects` un efecto dinámico de pintura solo devuelve `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` un efecto dinámico de pintura solo devuelve `objects` y `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` una pieza de un efecto dinámico de pintura solo tiene `path`, `fillRule`, `fills` y `strokes`
|
||||
@msg a read-only object was left out se omitió un objeto de solo lectura
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given se omitió un objeto de solo lectura: devuélvalo como {{"id": …}} solo o tal como se recibió
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7380,6 +7380,8 @@ axis Y Axis Y-akseli
|
||||
Cancel Plug-in Run Peruuta laajennuksen ajo
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} valmistui, mutta asiakirja tai laajennus muuttui sillä välin: suorita se uudelleen
|
||||
@msg Running “{name}”… Suoritetaan ”{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Laajennus ”{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` on oltava merkkijono, jossa on näkyvää tekstiä
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` live-tehoste suoritetaan asiakirjaa piirrettäessä, joten se ei voi olla `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out vientilaajennus saa aina viennin budjetin: jätä `budget` pois
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants ”{_1}” pyytää suurta laskentabudjettia (jokainen ajo enintään {minutes} minuuttia ja {times} kertaa tavallinen määrä käskyjä): ihmisen on hyväksyttävä se työpöytäsovelluksessa, tai anna `allowHeavy: true` istunnossa, joka on käynnistetty valitsimella --allow-plugin-grants
|
||||
@@ -7472,7 +7474,7 @@ axis Y Axis Y-akseli
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items}-{max_items} luvun luettelo
|
||||
@msg a new object needs a `path` uusi objekti tarvitsee kentän `path`
|
||||
@msg a number luku
|
||||
@msg a painted live effect returns only `objects` maalaava live-tehoste palauttaa vain kentän `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` maalaava live-tehoste palauttaa vain kentät `objects` ja `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` maalaavan live-tehosteen osalla on vain `path`, `fillRule`, `fills` ja `strokes`
|
||||
@msg a read-only object was left out vain luku -objekti jätettiin pois
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given vain luku -objekti jätettiin pois: palauta se pelkkänä {{"id": …}}-muotona tai sellaisena kuin se annettiin
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7317,6 +7317,8 @@ axis Y Axis Axe Y
|
||||
@msg `name` must be 1-64 printable characters `name` doit compter 1-64 caractères imprimables
|
||||
@msg `version`, `description` or `author` is too long `version`, `description` ou `author` est trop long
|
||||
@msg `warnings` must be a list of strings `warnings` doit être une liste de chaînes
|
||||
@msg Plug-in “{name}”: {notice} Plug-in “{name}” ({notice})
|
||||
@msg `notice` must be a string with visible text `notice` doit être une chaîne avec du texte visible
|
||||
@msg `{k}` must be one of {_1} `{k}` doit valoir l’une de ces valeurs : {_1}
|
||||
@msg `{k}` must be {what} `{k}` doit être {what}
|
||||
@msg an exporter declares 1 to {MAX_EXTENSIONS} `extensions` un module externe d’exportation déclare de 1 à {MAX_EXTENSIONS} `extensions`
|
||||
@@ -7401,7 +7403,7 @@ axis Y Axis Axe Y
|
||||
@msg a list of {min_items} to {max_items} numbers une liste de {min_items} à {max_items} nombres
|
||||
@msg a new object needs a `path` un nouvel objet nécessite un `path`
|
||||
@msg a number un nombre
|
||||
@msg a painted live effect returns only `objects` un effet dynamique de peinture renvoie seulement `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` un effet dynamique de peinture renvoie seulement `objects` et `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` une pièce d’un effet dynamique de peinture a seulement `path`, `fillRule`, `fills` et `strokes`
|
||||
@msg a read-only object was left out un objet en lecture seule a été omis
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given un objet en lecture seule a été omis : renvoyez-le, sous la forme {{"id": …}} seul ou tel qu’il a été fourni
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6573,7 +6573,7 @@ arrowhead Feather पंख
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items} से {max_items} संख्याओं की एक सूची
|
||||
@msg a new object needs a `path` नए ऑब्जेक्ट को `path` चाहिए
|
||||
@msg a number एक संख्या
|
||||
@msg a painted live effect returns only `objects` पेंट करने वाला लाइव इफ़ेक्ट केवल `objects` लौटाता है
|
||||
@msg a painted live effect returns only `objects` and `notice` पेंट करने वाला लाइव इफ़ेक्ट केवल `objects` और `notice` लौटाता है
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` पेंट करने वाले लाइव इफ़ेक्ट के हिस्से में केवल `path`, `fillRule`, `fills` और `strokes` होते हैं
|
||||
@msg a read-only object was left out एक केवल-पढ़ने योग्य ऑब्जेक्ट छोड़ दिया गया
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given एक केवल-पढ़ने योग्य ऑब्जेक्ट छोड़ दिया गया: इसे केवल {{"id": …}} के रूप में या जैसा दिया गया था वैसा लौटाएँ
|
||||
@@ -8917,6 +8917,8 @@ liquify-list-end {0}, {1} {0} और {1}
|
||||
@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 Running “{name}”… "{name}"…
|
||||
@msg Plug-in “{name}”: {notice} प्लग-इन "{name}": {notice}
|
||||
@msg `notice` must be a string with visible text `notice` दिखने वाले टेक्स्ट वाली स्ट्रिंग होनी चाहिए
|
||||
@msg Save for Web: the image is empty वेब के लिए सेव करें: इमेज खाली है
|
||||
@msg save the document first: copy puts the file in its folder पहले डॉक्यूमेंट को सेव करना: प्रतिलिपि फ़ाइल को अपने फ़ोल्डर में डालती है
|
||||
@msg save the document first: Package collects a saved document पहले डॉक्यूमेंट को सेव करना: पैकेज एक सेव किए गए डॉक्यूमेंट एकत्र करता है
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7299,6 +7299,8 @@ axis Y Axis Y tengely
|
||||
Cancel Plug-in Run Bővítmény futásának megszakítása
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} lefutott, de közben megváltozott a dokumentum vagy a bővítmény: futtasd újra
|
||||
@msg Running “{name}”… Futtatás: „{name}”…
|
||||
@msg Plug-in “{name}”: {notice} „{name}” bővítmény: {notice}
|
||||
@msg `notice` must be a string with visible text a `notice` látható szöveget tartalmazó karakterlánc legyen
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` az élő effektus a dokumentum rajzolása közben fut, ezért nem lehet `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out az exportáló bővítmény mindig az exportálás keretét kapja: hagyd ki a `budget` kulcsot
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants a(z) „{_1}” nagy számítási keretet kér (futásonként legfeljebb {minutes} perc és a szokásos utasításszám {times}-szorosa): egy személynek jóvá kell hagynia az asztali alkalmazásban, vagy add meg az `allowHeavy: true` értéket egy --allow-plugin-grants kapcsolóval indított munkamenetben
|
||||
@@ -7390,7 +7392,7 @@ axis Y Axis Y tengely
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items}-{max_items} számból álló lista
|
||||
@msg a new object needs a `path` az új objektumhoz `path` kell
|
||||
@msg a number szám
|
||||
@msg a painted live effect returns only `objects` a festő élő effektus csak `objects` értéket ad vissza
|
||||
@msg a painted live effect returns only `objects` and `notice` a festő élő effektus csak `objects` és `notice` értéket ad vissza
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` a festő élő effektus darabjának csak `path`, `fillRule`, `fills` és `strokes` kulcsa van
|
||||
@msg a read-only object was left out kimaradt egy írásvédett objektum
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given kimaradt egy írásvédett objektum: adja vissza önmagában {{"id": …}} formában vagy úgy, ahogy megkapta
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -413,6 +413,8 @@
|
||||
@msg `spread` applies to linear, radial, conic and diamond gradients `spread` berlaku untuk gradien linear, radial, conic, dan diamond
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} selesai, tetapi dokumen atau plug-in berubah sementara itu: jalankan lagi
|
||||
@msg Running “{name}”… Menjalankan “{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Plug-in “{name}” melaporkan: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` harus berupa string dengan teks yang terlihat
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` efek langsung berjalan saat dokumen digambar, sehingga tidak dapat `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out pengekspor selalu mendapat anggaran ekspor: hilangkan `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” meminta anggaran berat (setiap proses hingga {minutes} menit dan {times} kali instruksi biasa): seseorang harus menyetujuinya di aplikasi desktop, atau berikan `allowHeavy: true` dalam sesi yang dimulai dengan --allow-plugin-grants
|
||||
@@ -503,7 +505,7 @@
|
||||
@msg a list of {min_items} to {max_items} numbers daftar berisi {min_items} sampai {max_items} angka
|
||||
@msg a new object needs a `path` objek baru memerlukan `path`
|
||||
@msg a number angka
|
||||
@msg a painted live effect returns only `objects` efek langsung yang dicat hanya mengembalikan `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` efek langsung yang dicat hanya mengembalikan `objects` dan `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` potongan efek langsung yang dicat hanya memiliki `path`, `fillRule`, `fills` dan `strokes`
|
||||
@msg a read-only object was left out objek baca-saja dihilangkan
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given objek baca-saja dihilangkan: kembalikan objek itu, sebagai {{"id": …}} saja atau seperti yang diberikan
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6936,6 +6936,8 @@ axis Y Axis Asse Y
|
||||
Cancel Plug-in Run Annulla esecuzione plug-in
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} è terminato, ma nel frattempo il documento o il plug-in è cambiato: va eseguito di nuovo
|
||||
@msg Running “{name}”… Esecuzione di “{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Dal plug-in “{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` deve essere una stringa con testo visibile
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` un effetto dinamico viene eseguito mentre il documento viene disegnato, quindi non può essere `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out un plug-in di esportazione riceve sempre il budget di un’esportazione: ometti `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” chiede un budget di calcolo elevato (ogni esecuzione fino a {minutes} minuti e {times} volte le istruzioni consuete): una persona deve approvarlo nell’app desktop, oppure passa `allowHeavy: true` in una sessione avviata con --allow-plugin-grants
|
||||
@@ -7027,7 +7029,7 @@ axis Y Axis Asse Y
|
||||
@msg a list of {min_items} to {max_items} numbers un elenco da {min_items} a {max_items} numeri
|
||||
@msg a new object needs a `path` un nuovo oggetto richiede un `path`
|
||||
@msg a number un numero
|
||||
@msg a painted live effect returns only `objects` un effetto dinamico di pittura restituisce solo `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` un effetto dinamico di pittura restituisce solo `objects` e `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` un pezzo di un effetto dinamico di pittura ha solo `path`, `fillRule`, `fills` e `strokes`
|
||||
@msg a read-only object was left out è stato omesso un oggetto di sola lettura
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given è stato omesso un oggetto di sola lettura: restituiscilo come {{"id": …}} da solo o così come è stato fornito
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7011,6 +7011,8 @@ axis Y Axis Y 軸
|
||||
Cancel Plug-in Run プラグインの実行をキャンセル
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} は完了しましたが、その間にドキュメントまたはプラグインが変更されました。もう一度実行してください
|
||||
@msg Running “{name}”… 「{name}」を実行中…
|
||||
@msg Plug-in “{name}”: {notice} プラグイン「{name}」: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` は表示される文字を含む文字列にしてください
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` ライブ効果はドキュメントの描画中に実行されるため、`heavy` にはできません
|
||||
@msg an exporter always gets an export's budget: leave `budget` out 書き出しプラグインには常に書き出しの予算が割り当てられます。`budget` は省略してください
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants 「{_1}」は大きな計算予算を求めています (1 回の実行につき最大 {minutes} 分、通常の {times} 倍の命令)。デスクトップ アプリで人が承認するか、--allow-plugin-grants を付けて開始したセッションで `allowHeavy: true` を指定してください
|
||||
@@ -7102,7 +7104,7 @@ axis Y Axis Y 軸
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items} から {max_items} 個の数値のリスト
|
||||
@msg a new object needs a `path` 新しいオブジェクトには `path` が必要です
|
||||
@msg a number 数値
|
||||
@msg a painted live effect returns only `objects` ペイント型のライブ効果が返すのは `objects` だけです
|
||||
@msg a painted live effect returns only `objects` and `notice` ペイント型のライブ効果が返すのは `objects` と `notice` だけです
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` ペイント型のライブ効果のピースに使えるのは `path`、`fillRule`、`fills`、`strokes` だけです
|
||||
@msg a read-only object was left out 読み取り専用のオブジェクトが省かれています
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given 読み取り専用のオブジェクトが省かれています: {{"id": …}} だけの形か、渡されたとおりの形で返してください
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -9418,6 +9418,8 @@ axis Y Axis Y ღერძი
|
||||
Cancel Plug-in Run პლაგინის გაშვების გაუქმება
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} დასრულდა, მაგრამ ამასობაში დოკუმენტი ან პლაგინი შეიცვალა: გაუშვით ხელახლა
|
||||
@msg Running “{name}”… მიმდინარეობს „{name}“-ის გაშვება…
|
||||
@msg Plug-in “{name}”: {notice} პლაგინი „{name}“: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` უნდა იყოს ხილული ტექსტის მქონე სტრიქონი
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` ცოცხალი ეფექტი დოკუმენტის დახატვისას ეშვება, ამიტომ ის ვერ იქნება `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out ექსპორტის პლაგინი ყოველთვის ექსპორტის ბიუჯეტს იღებს: გამოტოვეთ `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants „{_1}“ დიდ გამოთვლით ბიუჯეტს ითხოვს (თითო გაშვება {minutes} წუთამდე და ჩვეულებრივზე {times}-ჯერ მეტი ინსტრუქცია): ის დესკტოპის აპში ადამიანმა უნდა დაამტკიცოს, ან გადაეცით `allowHeavy: true` --allow-plugin-grants-ით გაშვებულ სესიაში
|
||||
@@ -9510,7 +9512,7 @@ axis Y Axis Y ღერძი
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items}-დან {max_items}-მდე რიცხვის სია
|
||||
@msg a new object needs a `path` ახალ ობიექტს სჭირდება `path`
|
||||
@msg a number რიცხვი
|
||||
@msg a painted live effect returns only `objects` მხატვრული ცოცხალი ეფექტი აბრუნებს მხოლოდ `objects`-ს
|
||||
@msg a painted live effect returns only `objects` and `notice` მხატვრული ცოცხალი ეფექტი აბრუნებს მხოლოდ `objects`-სა და `notice`-ს
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` მხატვრული ცოცხალი ეფექტის ნაწილს აქვს მხოლოდ `path`, `fillRule`, `fills` და `strokes`
|
||||
@msg a read-only object was left out გამოტოვებულია მხოლოდ წასაკითხი ობიექტი
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given გამოტოვებულია მხოლოდ წასაკითხი ობიექტი: დააბრუნეთ ის მხოლოდ {{"id": …}}-ის სახით ან ისე, როგორც მიიღეთ
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6908,6 +6908,8 @@ axis Y Axis Y축
|
||||
Cancel Plug-in Run 플러그인 실행 취소
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1}이(가) 끝났지만 그동안 문서나 플러그인이 변경되었습니다. 다시 실행하세요
|
||||
@msg Running “{name}”… “{name}” 실행 중…
|
||||
@msg Plug-in “{name}”: {notice} 플러그인 “{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice`는 보이는 텍스트가 있는 문자열이어야 합니다
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` 라이브 효과는 문서를 그리는 동안 실행되므로 `heavy`일 수 없습니다
|
||||
@msg an exporter always gets an export's budget: leave `budget` out 내보내기 플러그인은 항상 내보내기 예산을 받습니다. `budget`은 생략하세요
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}”은(는) 큰 계산 예산을 요청합니다(실행당 최대 {minutes}분, 평소의 {times}배 명령어). 데스크톱 앱에서 사람이 승인하거나 --allow-plugin-grants로 시작한 세션에서 `allowHeavy: true`를 전달하세요
|
||||
@@ -6999,7 +7001,7 @@ axis Y Axis Y축
|
||||
@msg a list of {min_items} to {max_items} numbers 숫자 {min_items}-{max_items}개의 목록
|
||||
@msg a new object needs a `path` 새 개체에는 `path`가 필요합니다
|
||||
@msg a number 숫자
|
||||
@msg a painted live effect returns only `objects` 페인트형 라이브 효과는 `objects`만 반환합니다
|
||||
@msg a painted live effect returns only `objects` and `notice` 페인트형 라이브 효과는 `objects`와 `notice`만 반환합니다
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` 페인트형 라이브 효과의 조각에는 `path`, `fillRule`, `fills`, `strokes`만 있습니다
|
||||
@msg a read-only object was left out 읽기 전용 개체가 빠졌습니다
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given 읽기 전용 개체가 빠졌습니다: {{"id": …}}만 있는 형태나 받은 그대로 반환하십시오
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -376,6 +376,8 @@ liquify-list-end {0}, {1} {0} en {1}
|
||||
@msg `spread` applies to linear, radial, conic and diamond gradients `spread` geldt voor lineaire, radiale, conische en ruitvormige verlopen
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} is voltooid, maar het document of de plug-in is intussen gewijzigd: voer het opnieuw uit
|
||||
@msg Running “{name}”… „{name}” wordt uitgevoerd…
|
||||
@msg Plug-in “{name}”: {notice} Plug-in „{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` moet een tekenreeks met zichtbare tekst zijn
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` een live-effect wordt uitgevoerd terwijl het document wordt getekend, dus kan het niet `heavy` zijn
|
||||
@msg an exporter always gets an export's budget: leave `budget` out een exportplug-in krijgt altijd het budget van een export: laat `budget` weg
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants „{_1}” vraagt om een groot rekenbudget (elke uitvoering tot {minutes} minuten en {times} keer het gebruikelijke aantal instructies): een persoon moet dit goedkeuren in de desktop-app, of geef `allowHeavy: true` door in een sessie die is gestart met --allow-plugin-grants
|
||||
@@ -466,7 +468,7 @@ liquify-list-end {0}, {1} {0} en {1}
|
||||
@msg a list of {min_items} to {max_items} numbers een lijst met {min_items} tot {max_items} getallen
|
||||
@msg a new object needs a `path` een nieuw object heeft een `path` nodig
|
||||
@msg a number een getal
|
||||
@msg a painted live effect returns only `objects` een geschilderd live-effect geeft alleen `objects` terug
|
||||
@msg a painted live effect returns only `objects` and `notice` een geschilderd live-effect geeft alleen `objects` en `notice` terug
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` een stuk van een geschilderd live-effect heeft alleen `path`, `fillRule`, `fills` en `strokes`
|
||||
@msg a read-only object was left out een alleen-lezen object is weggelaten
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given een alleen-lezen object is weggelaten: geef het terug, als alleen {{"id": …}} of zoals het is gegeven
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7169,6 +7169,8 @@ axis Y Axis Oś Y
|
||||
Cancel Plug-in Run Anuluj działanie wtyczki
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} zakończył działanie, ale w międzyczasie zmienił się dokument lub wtyczka: uruchom ją ponownie
|
||||
@msg Running “{name}”… Uruchamianie „{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Wtyczka „{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` musi być ciągiem znaków z widocznym tekstem
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` efekt na żywo działa podczas rysowania dokumentu, więc nie może być `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out wtyczka eksportu zawsze dostaje budżet eksportu: pomiń `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants „{_1}” prosi o duży budżet obliczeń (każde uruchomienie do {minutes} minut i {times} razy więcej instrukcji niż zwykle): musi ją zatwierdzić osoba w aplikacji desktopowej albo przekaż `allowHeavy: true` w sesji uruchomionej z --allow-plugin-grants
|
||||
@@ -7260,7 +7262,7 @@ axis Y Axis Oś Y
|
||||
@msg a list of {min_items} to {max_items} numbers listą od {min_items} do {max_items} liczb
|
||||
@msg a new object needs a `path` nowy obiekt wymaga `path`
|
||||
@msg a number liczbą
|
||||
@msg a painted live effect returns only `objects` malujący efekt dynamiczny zwraca tylko `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` malujący efekt dynamiczny zwraca tylko `objects` i `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` element malującego efektu dynamicznego ma tylko `path`, `fillRule`, `fills` i `strokes`
|
||||
@msg a read-only object was left out pominięto obiekt tylko do odczytu
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given pominięto obiekt tylko do odczytu: zwróć go jako samo {{"id": …}} lub w postaci, w jakiej został przekazany
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7213,6 +7213,8 @@ axis Y Axis Eixo Y
|
||||
Cancel Plug-in Run Cancelar Execução do Plug-in
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} terminou, mas o documento ou o plug-in mudou nesse meio-tempo: execute-o novamente
|
||||
@msg Running “{name}”… Executando “{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Do plug-in “{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` deve ser uma string com texto visível
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` um efeito dinâmico é executado enquanto o documento é desenhado, então não pode ser `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out um plug-in de exportação sempre recebe o orçamento de uma exportação: omita `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” pede um orçamento de processamento grande (cada execução até {minutes} minutos e {times} vezes as instruções habituais): uma pessoa precisa aprová-lo no aplicativo de desktop, ou passe `allowHeavy: true` em uma sessão iniciada com --allow-plugin-grants
|
||||
@@ -7304,7 +7306,7 @@ axis Y Axis Eixo Y
|
||||
@msg a list of {min_items} to {max_items} numbers uma lista de {min_items} a {max_items} números
|
||||
@msg a new object needs a `path` um objeto novo precisa de um `path`
|
||||
@msg a number um número
|
||||
@msg a painted live effect returns only `objects` um efeito dinâmico de pintura retorna apenas `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` um efeito dinâmico de pintura retorna apenas `objects` e `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` uma peça de um efeito dinâmico de pintura tem apenas `path`, `fillRule`, `fills` e `strokes`
|
||||
@msg a read-only object was left out um objeto somente leitura foi omitido
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given um objeto somente leitura foi omitido: retorne-o como {{"id": …}} sozinho ou como foi recebido
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6935,6 +6935,8 @@ axis Y Axis Ось Y
|
||||
Cancel Plug-in Run Отменить запуск модуля
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} завершился, но документ или модуль за это время изменился: запустите его снова
|
||||
@msg Running “{name}”… Выполняется «{name}»…
|
||||
@msg Plug-in “{name}”: {notice} Модуль «{name}»: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` должен быть строкой с видимым текстом
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` динамический эффект выполняется во время отрисовки документа, поэтому он не может быть `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out модуль экспорта всегда получает бюджет экспорта: не указывайте `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants «{_1}» запрашивает большой вычислительный бюджет (каждый запуск до {minutes} минут и в {times} раз больше инструкций, чем обычно): его должен одобрить человек в настольном приложении, либо передайте `allowHeavy: true` в сеансе, запущенном с --allow-plugin-grants
|
||||
@@ -7027,7 +7029,7 @@ axis Y Axis Ось Y
|
||||
@msg a list of {min_items} to {max_items} numbers список из {min_items}-{max_items} чисел
|
||||
@msg a new object needs a `path` новому объекту нужен `path`
|
||||
@msg a number число
|
||||
@msg a painted live effect returns only `objects` рисующий динамический эффект возвращает только `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` рисующий динамический эффект возвращает только `objects` и `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` у части рисующего динамического эффекта есть только `path`, `fillRule`, `fills` и `strokes`
|
||||
@msg a read-only object was left out пропущен объект только для чтения
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given пропущен объект только для чтения: верните его как один {{"id": …}} или в том виде, в каком он был передан
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7361,6 +7361,8 @@ axis Y Axis Y-axel
|
||||
Cancel Plug-in Run Avbryt körning av plugin
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} är klar, men dokumentet eller pluginet ändrades under tiden: kör det igen
|
||||
@msg Running “{name}”… Kör ”{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Plugin ”{name}”: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` måste vara en sträng med synlig text
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` en live-effekt körs medan dokumentet ritas, så den kan inte vara `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out ett exportinsticksprogram får alltid en exports budget: utelämna `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants ”{_1}” begär en stor beräkningsbudget (varje körning upp till {minutes} minuter och {times} gånger de vanliga instruktionerna): en person måste godkänna det i skrivbordsappen, eller skicka `allowHeavy: true` i en session som startats med --allow-plugin-grants
|
||||
@@ -7405,7 +7407,7 @@ axis Y Axis Y-axel
|
||||
@msg a list of {min_items} to {max_items} numbers en lista med {min_items} till {max_items} tal
|
||||
@msg a new object needs a `path` ett nytt objekt behöver en `path`
|
||||
@msg a number ett tal
|
||||
@msg a painted live effect returns only `objects` en målande live-effekt returnerar bara `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` en målande live-effekt returnerar bara `objects` och `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` en del av en målande live-effekt har bara `path`, `fillRule`, `fills` och `strokes`
|
||||
@msg a read-only object was left out ett skrivskyddat objekt utelämnades
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given ett skrivskyddat objekt utelämnades: returnera det som enbart {{"id": …}} eller som det gavs
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7386,6 +7386,8 @@ axis Y Axis Y ekseni
|
||||
Cancel Plug-in Run Eklenti Çalıştırmasını İptal Et
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} bitti, ancak bu sırada belge veya eklenti değişti: yeniden çalıştırın
|
||||
@msg Running “{name}”… “{name}” çalıştırılıyor…
|
||||
@msg Plug-in “{name}”: {notice} “{name}” eklentisi: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` görünür metin içeren bir dize olmalıdır
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` canlı efekt belge çizilirken çalışır, bu yüzden `heavy` olamaz
|
||||
@msg an exporter always gets an export's budget: leave `budget` out dışa aktarma eklentisi her zaman bir dışa aktarmanın bütçesini alır: `budget` anahtarını çıkarın
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” büyük bir hesaplama bütçesi istiyor (her çalıştırma en fazla {minutes} dakika ve olağan komutların {times} katı): masaüstü uygulamasında bir kişinin onaylaması gerekir veya --allow-plugin-grants ile başlatılan bir oturumda `allowHeavy: true` geçirin
|
||||
@@ -7477,7 +7479,7 @@ axis Y Axis Y ekseni
|
||||
@msg a list of {min_items} to {max_items} numbers {min_items} ile {max_items} arasında sayıdan oluşan bir liste
|
||||
@msg a new object needs a `path` yeni bir nesnenin `path` değerine ihtiyacı vardır
|
||||
@msg a number bir sayı
|
||||
@msg a painted live effect returns only `objects` boyama türü canlı efekt yalnızca `objects` döndürür
|
||||
@msg a painted live effect returns only `objects` and `notice` boyama türü canlı efekt yalnızca `objects` ve `notice` döndürür
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` boyama türü canlı efektin bir parçasında yalnızca `path`, `fillRule`, `fills` ve `strokes` bulunur
|
||||
@msg a read-only object was left out salt okunur bir nesne atlandı
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given salt okunur bir nesne atlandı: onu yalnızca {{"id": …}} olarak veya verildiği gibi döndürün
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6918,6 +6918,8 @@ axis Y Axis Вісь Y
|
||||
Cancel Plug-in Run Скасувати запуск модуля
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} завершився, але документ або модуль тим часом змінився: запустіть його знову
|
||||
@msg Running “{name}”… Виконується «{name}»…
|
||||
@msg Plug-in “{name}”: {notice} Модуль «{name}»: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` має бути рядком із видимим текстом
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` динамічний ефект виконується під час відмальовування документа, тому він не може бути `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out модуль експорту завжди отримує бюджет експорту: не вказуйте `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants «{_1}» запитує великий обчислювальний бюджет (кожен запуск до {minutes} хвилин і в {times} разів більше інструкцій, ніж зазвичай): його має схвалити людина в настільному застосунку, або передайте `allowHeavy: true` у сеансі, запущеному з --allow-plugin-grants
|
||||
@@ -7009,7 +7011,7 @@ axis Y Axis Вісь Y
|
||||
@msg a list of {min_items} to {max_items} numbers список із {min_items}-{max_items} чисел
|
||||
@msg a new object needs a `path` новому об’єкту потрібен `path`
|
||||
@msg a number число
|
||||
@msg a painted live effect returns only `objects` малювальний динамічний ефект повертає лише `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` малювальний динамічний ефект повертає лише `objects` і `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` частина малювального динамічного ефекту має лише `path`, `fillRule`, `fills` і `strokes`
|
||||
@msg a read-only object was left out пропущено об’єкт лише для читання
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given пропущено об’єкт лише для читання: поверніть його як один {{"id": …}} або в тому вигляді, у якому його передано
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6964,6 +6964,8 @@ axis Y Axis Trục Y
|
||||
Cancel Plug-in Run Hủy lần chạy plug-in
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} đã chạy xong, nhưng tài liệu hoặc plug-in đã thay đổi trong lúc đó: hãy chạy lại
|
||||
@msg Running “{name}”… Đang chạy “{name}”…
|
||||
@msg Plug-in “{name}”: {notice} Plug-in “{name}” báo: {notice}
|
||||
@msg `notice` must be a string with visible text `notice` phải là một chuỗi có văn bản hiển thị
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` hiệu ứng trực tiếp chạy trong lúc tài liệu được vẽ nên không thể là `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out plug-in xuất luôn nhận ngân sách của một lần xuất: hãy bỏ `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}” yêu cầu ngân sách tính toán lớn (mỗi lần chạy tới {minutes} phút và gấp {times} lần số lệnh thông thường): cần một người phê duyệt trong ứng dụng máy tính, hoặc truyền `allowHeavy: true` trong phiên khởi động bằng --allow-plugin-grants
|
||||
@@ -7056,7 +7058,7 @@ axis Y Axis Trục Y
|
||||
@msg a list of {min_items} to {max_items} numbers một danh sách gồm {min_items} đến {max_items} số
|
||||
@msg a new object needs a `path` đối tượng mới cần một `path`
|
||||
@msg a number một số
|
||||
@msg a painted live effect returns only `objects` hiệu ứng động kiểu tô chỉ trả về `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` hiệu ứng động kiểu tô chỉ trả về `objects` và `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` một phần của hiệu ứng động kiểu tô chỉ có `path`, `fillRule`, `fills` và `strokes`
|
||||
@msg a read-only object was left out một đối tượng chỉ đọc đã bị bỏ sót
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given một đối tượng chỉ đọc đã bị bỏ sót: hãy trả lại nó dưới dạng chỉ {{"id": …}} hoặc như khi được nhận
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7146,6 +7146,8 @@ axis Y Axis Y 轴
|
||||
Cancel Plug-in Run 取消运行插件
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} 已完成,但文档或插件在此期间已更改:请重新运行
|
||||
@msg Running “{name}”… 正在运行“{name}”…
|
||||
@msg Plug-in “{name}”: {notice} 增效工具“{name}”:{notice}
|
||||
@msg `notice` must be a string with visible text `notice` 必须是包含可见文本的字符串
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` 实时效果在绘制文档时运行,因此不能为 `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out 导出增效工具始终使用导出的预算:请省略 `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{_1}”需要大量计算预算(每次运行最多 {minutes} 分钟,指令数为通常的 {times} 倍):需要有人在桌面应用中批准,或在以 --allow-plugin-grants 启动的会话中传入 `allowHeavy: true`
|
||||
@@ -7237,7 +7239,7 @@ axis Y Axis Y 轴
|
||||
@msg a list of {min_items} to {max_items} numbers 包含 {min_items} 到 {max_items} 个数字的列表
|
||||
@msg a new object needs a `path` 新对象需要 `path`
|
||||
@msg a number 数字
|
||||
@msg a painted live effect returns only `objects` 绘制型实时效果只返回 `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` 绘制型实时效果只返回 `objects` 和 `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` 绘制型实时效果的片段只有 `path`、`fillRule`、`fills` 和 `strokes`
|
||||
@msg a read-only object was left out 漏掉了一个只读对象
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given 漏掉了一个只读对象:请以单独的 {{"id": …}} 或原样返回它
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6967,6 +6967,8 @@ axis Y Axis Y 軸
|
||||
Cancel Plug-in Run 取消執行增效模組
|
||||
@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} 已完成,但文件或增效模組在此期間已變更:請重新執行
|
||||
@msg Running “{name}”… 正在執行「{name}」…
|
||||
@msg Plug-in “{name}”: {notice} 增效模組「{name}」:{notice}
|
||||
@msg `notice` must be a string with visible text `notice` 必須是包含可見文字的字串
|
||||
@msg a live effect runs while the document is drawn, so it can't be `heavy` 即時效果會在繪製文件時執行,因此不能是 `heavy`
|
||||
@msg an exporter always gets an export's budget: leave `budget` out 匯出增效模組一律使用匯出的預算:請移除 `budget`
|
||||
@msg “{_1}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants 「{_1}」需要大量運算預算(每次執行最多 {minutes} 分鐘,指令數為一般的 {times} 倍):需要有人在桌面應用程式中核准,或在以 --allow-plugin-grants 啟動的工作階段中傳入 `allowHeavy: true`
|
||||
@@ -7058,7 +7060,7 @@ axis Y Axis Y 軸
|
||||
@msg a list of {min_items} to {max_items} numbers 包含 {min_items} 到 {max_items} 個數字的清單
|
||||
@msg a new object needs a `path` 新物件需要 `path`
|
||||
@msg a number 數字
|
||||
@msg a painted live effect returns only `objects` 繪製型即時效果只傳回 `objects`
|
||||
@msg a painted live effect returns only `objects` and `notice` 繪製型即時效果只傳回 `objects` 和 `notice`
|
||||
@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` 繪製型即時效果的片段只有 `path`、`fillRule`、`fills` 和 `strokes`
|
||||
@msg a read-only object was left out 漏掉了一個唯讀物件
|
||||
@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given 漏掉了一個唯讀物件:請以單獨的 {{"id": …}} 或原樣傳回它
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -24,6 +24,7 @@ use serde_json::{Value, json};
|
||||
use vectorcraft_engine::EngineError;
|
||||
use vectorcraft_engine::cmd::fileio::progress::{self, Progress};
|
||||
use vectorcraft_engine::cmd::plugin::FilterRun;
|
||||
use vectorcraft_plugins::{permissions, registry};
|
||||
|
||||
use crate::VectorcraftApp;
|
||||
use crate::export_progress;
|
||||
@@ -150,6 +151,47 @@ fn finish(app: &mut VectorcraftApp, r: Running, done: Option<Done>) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Shows in the status bar the notice of the plug-in run that command `cmd` (`plugin.run` or a
|
||||
/// plug-in command) applied, with result `r`: `Plug-in “name”: notice`, the name of the plug-in that
|
||||
/// ran (`pluginName`) escaped and capped as prompts show it. The notice is shown as the run returned
|
||||
/// it (escaped and capped by the host) and never translated. A result without a notice leaves the
|
||||
/// status bar as it is. For a `command.batch`, such as an action's steps, the last plug-in run among
|
||||
/// its steps with a notice shows it.
|
||||
pub fn show_notice(app: &mut VectorcraftApp, cmd: &str, r: &Value) {
|
||||
let r = if cmd == "command.batch" {
|
||||
match last_batch_notice(r) {
|
||||
Some(step) => step,
|
||||
None => return,
|
||||
}
|
||||
} else if cmd == "plugin.run" || vectorcraft_engine::cmd::plugin::is_command_id(cmd) {
|
||||
r
|
||||
} else {
|
||||
return;
|
||||
};
|
||||
let (Some(notice), Some(id)) = (r.get("notice").and_then(Value::as_str), r.get("plugin").and_then(Value::as_str)) else { return };
|
||||
let name = r
|
||||
.get("pluginName")
|
||||
.and_then(Value::as_str)
|
||||
.map(str::to_string)
|
||||
.or_else(|| registry::get(id).map(|p| p.manifest().name.clone()))
|
||||
.map(|name| name.trim().trim_end_matches('…').trim_end().to_string())
|
||||
.filter(|name| !name.is_empty())
|
||||
.unwrap_or_else(|| id.to_string());
|
||||
let name = permissions::display_text(&name, permissions::MAX_SHOWN_NAME);
|
||||
let status = format!("Plug-in “{name}”: {notice}");
|
||||
let before = status.strip_suffix(notice).unwrap_or_default().to_string();
|
||||
app.status(status);
|
||||
app.ui.status_kept = Some((before, notice.to_string(), String::new()));
|
||||
}
|
||||
|
||||
/// The result of the last step of `command.batch` result `r` that a plug-in run with a notice gave
|
||||
/// (`{plugin, ids, notice}`).
|
||||
fn last_batch_notice(r: &Value) -> Option<&Value> {
|
||||
r.get("results")?.as_array()?.iter().rev().find(|step| {
|
||||
step.get("notice").is_some_and(Value::is_string) && step.get("plugin").is_some_and(Value::is_string) && step.get("ids").is_some()
|
||||
})
|
||||
}
|
||||
|
||||
/// The progress window's Cancel (also Esc): every filter running in the background stops (at once when it checks
|
||||
/// `vc_cancelled`, else at the next slice of its budget) and changes nothing → `{cancelled: n}`.
|
||||
pub fn cancel_all(app: &mut VectorcraftApp) -> Value {
|
||||
|
||||
@@ -701,6 +701,11 @@ pub struct UiState {
|
||||
/// Not saved.
|
||||
#[serde(skip)]
|
||||
pub status_notes: Option<(String, Vec<String>)>,
|
||||
/// The status text a plug-in wrote, with the app's words before and after it: while the status
|
||||
/// is these three together, the status bar translates the app's words and shows the plug-in's
|
||||
/// as they are ([`crate::plugin_runs::show_notice`]). Not saved.
|
||||
#[serde(skip)]
|
||||
pub status_kept: Option<(String, String, String)>,
|
||||
pub palette_open: bool,
|
||||
pub palette_query: String,
|
||||
/// Set when the palette's shortcut, its command or the search icon opens or closes the palette,
|
||||
@@ -1471,6 +1476,7 @@ impl Default for UiState {
|
||||
replace_font_warning: None,
|
||||
last_find: None,
|
||||
status_notes: None,
|
||||
status_kept: None,
|
||||
palette_open: false,
|
||||
palette_query: String::new(),
|
||||
palette_toggled: false,
|
||||
|
||||
+11
-2
@@ -3677,6 +3677,11 @@ given and show none. These limits are VectorCraft's own values.
|
||||
{"name":"run_command","arguments":{"command":"app.toast","params":{"message":"Exported 4 artboards","level":"success"}}}
|
||||
```
|
||||
|
||||
A filter or plug-in command that only reports what it did needs neither `app.toast` nor any permission: its output's
|
||||
`notice` ([plug-ins](plugins.md#output)) comes back in the run's result, and the desktop app and the web build show it
|
||||
in the status bar as `Plug-in “name”: notice` once the output is applied. A run that fails, is refused or is canceled
|
||||
shows no notice.
|
||||
|
||||
## Navigator panel options
|
||||
|
||||
The Navigator panel menu's Panel Options… opens the `navigatorPanelOptions` dialog (fields `color`, `solidDashes`),
|
||||
@@ -13639,7 +13644,10 @@ be locked, `plugin.install` and `plugin.remove` fail and change nothing:
|
||||
`plugin.install {path | dataBase64}` installs one, `plugin.list` / `plugin.info {id}` describe them (parameters,
|
||||
schema, defaults). An object filter runs on the selected paths and compound paths with `plugin.run {id, params}` (one
|
||||
undo step; it may change, delete or add objects, and the result is selected; a run that changes no object and no kept
|
||||
data records no undo step and leaves the document unmodified). A filter whose manifest lists `inputs`
|
||||
data records no undo step and leaves the document unmodified) → `{plugin, ids, notice?, pluginName?}`.
|
||||
`notice` is the text the filter's output reports in its `notice` key, escaped and cut at 200 characters
|
||||
([plug-ins](plugins.md#output)); it is returned only when the output was applied, with `pluginName`, the manifest name
|
||||
of the plug-in that ran, and the desktop app shows it in the status bar after that name. A filter whose manifest lists `inputs`
|
||||
(`type`, `image`, `symbolInstance`; `inputs` in its `plugin.list` entry) also lists `doc.read` in its `permissions`, so
|
||||
installing it needs a person's approval. It is also given the selected objects of those kinds to read, in paint order from the
|
||||
bottom, with at most 16 MiB of pixels and 16 MiB of type runs over one run (an object that doesn't fit what the objects
|
||||
@@ -13768,7 +13776,8 @@ A filter or live effect may declare commands of its own ([plugins.md](plugins.md
|
||||
(`commands: [{id, command, label, params, paramsSchema, menu?}]`; `menu`, `{path, after?, placed?}`, is the menu its
|
||||
manifest places it in, with `placed: false` when the command stays in its plug-in's submenu, see
|
||||
[plugins.md](plugins.md#placing-a-command-in-another-menu)). Run it with `{ids?, params?}` (its parameters may also
|
||||
be top-level keys): the parameters are checked before the plug-in runs, a run is one undo step named after the
|
||||
be top-level keys) → `{plugin, command, ids, notice?, pluginName?}`, with `notice` and `pluginName` as `plugin.run`
|
||||
returns them: the parameters are checked before the plug-in runs, a run is one undo step named after the
|
||||
command, and a run that traps or runs out of its instruction budget returns an error that starts with the plug-in's
|
||||
name and the command's label and leaves the document and the undo history as they were. For `plugin.run` and plug-in
|
||||
commands, `ids` left out or null means the selection, and an `ids` that is not a list of object ids is an error.
|
||||
|
||||
+18
-1
@@ -937,6 +937,22 @@ under the plug-in's id, and hosts from before `documentData` keep it when they s
|
||||
document, so it can read what every plug-in keeps there, not only its own. A live effect isn't given it: its geometry
|
||||
is worked out from the object alone.
|
||||
|
||||
To report what a run did, a filter or a plug-in command adds `notice`: one string, such as
|
||||
`{"objects": [...], "notice": "Selected 12 objects"}`. It needs no permission and no host import. Once the output is
|
||||
applied, the desktop app and the web build show it in the status bar as `Plug-in “name”: notice`, the plug-in's name
|
||||
first, and `plugin.run` and the plug-in command return it as `notice` in their result, with the plug-in's name as
|
||||
`pluginName`. The host trims the white space around it, writes control, bidirectional and line
|
||||
separator characters as `\u{202E}` escapes and cuts it at 200 characters, escapes included, ending it with `…`. Each run
|
||||
reports at most one notice, and a later status message replaces it. A plug-in step of an action or a `command.batch`
|
||||
shows its notice too; when several steps report one, the last of them shows. A `notice` that is not a string, or has no visible
|
||||
character in the part the status bar shows, refuses the whole output, and nothing changes; white space, control characters and the invisible
|
||||
characters that are not escaped (soft hyphen, zero-width and filler characters, variation selectors, tags) do not
|
||||
count as visible. A run that declines, fails, is refused, is canceled or
|
||||
finishes after the document changed shows none; an output that changes nothing still shows its notice. The status
|
||||
bar translates the words around the notice, never the notice itself. A live effect's
|
||||
`notice`, painted or not, is ignored without being checked, since the effect runs whenever its object is drawn. These limits are VectorCraft's own values. Hosts
|
||||
from before `notice` ignore it.
|
||||
|
||||
For a **live effect**, the geometry of every returned object's `path` (their subpaths, in order) replaces the
|
||||
object's; the rest is ignored (the object keeps its own appearance). An empty list removes the geometry. A live effect
|
||||
that declares `paintOutput` returns painted pieces instead ([below](#painted-live-effects)).
|
||||
@@ -955,7 +971,8 @@ is a piece drawn by itself, in the order returned, with paints of its own:
|
||||
```
|
||||
|
||||
- `path` is required; `fillRule` defaults to the object's. `type` and `bounds` may be handed back as given and are
|
||||
ignored. Any other key (`opacity`, `effects`, `guide`, `locked`, `name`, a top-level `documentData`…) refuses the
|
||||
ignored, as is a top-level `notice`. Any other key (`opacity`, `effects`, `guide`, `locked`, `name`, a top-level
|
||||
`documentData`…) refuses the
|
||||
result, as does a key that a paint, its color, a gradient stop, a gradient's placement or a freeform point does not
|
||||
have, such as `opacity` on a solid paint.
|
||||
- `fills` and `strokes` take the forms a filter returns ([Input](#input)). A piece without `fills` (or `strokes`) is
|
||||
|
||||
@@ -1062,6 +1062,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Scripts: `#strict on` (and `//@strict on`) runs the script with the checks the [`$` object](https://extendscript.docsforadobe.dev/extendscript-tools-features/dollar-object/) help page gives for `$.strict`: an assignment to a read-only property throws a `TypeError`, and so does a new property on an object that takes none. VectorCraft's own rules: a getter-only property counts as read-only, the objects that take no new properties are the non-extensible ones (`Object.preventExtensions`, `seal`, `freeze`, and the frozen `vc` and `$` objects), the last `#strict` line of the script and its includes sets the whole run, a file `$.evalFile` runs keeps its own line's checks for its code, and the rest of ES5 strict mode stays with `'use strict'`. Without the line, runs are unchanged. `crates/engine/src/tests/script_include.rs` (`strict_on_*`, `strict_mode_in_eval_file_is_scoped`), `crates/js/src/interp_tests.rs` (`strict_writes_are_separate_from_es5_strict`).
|
||||
- Scripts folder: File › Scripts lists the `.js` and `.jsx` files of the `Scripts` folder next to the preferences, each named after its file without the extension, with each subfolder as a submenu, above Check Script… and Other Script… (https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/install-and-run-scripts.html). VectorCraft's own rules: the folder is read again when the window becomes active and when the File menu opens (in the macOS menu bar, when any of its menus opens, and the new listing shows the next time the menu opens), links are not followed, and one read stops at 2,048 entries, 512 scripts, 128 subfolders, 4 levels or 250 ms. `script.listInstalled` returns the listing. `crates/engine/src/tests/script_folder.rs`, `crates/ui-egui/src/tests/scripts_menu.rs`.
|
||||
- Messages over the window: `app.toast {message, level?, seconds?}` shows a message at the window's bottom right that does not stop work and closes after its time (4 seconds by default) or when clicked; at most 5 show at once, the newest lowest. Scripts raise one through `vc.run`, MCP clients through the command, and an action records it as a step. The limits are VectorCraft's own values. Tests: `cmd::toast::tests` in `vectorcraft-engine`, `toasts::tests` in `vectorcraft-ui-egui`.
|
||||
- Plug-in run notices: a filter or plug-in command's output may report a `notice`, which needs no permission; once the output is applied, `plugin.run` and the command return it and the status bar shows it as `Plug-in “name”: notice`, escaped, cut at 200 characters and never translated, and a run that fails or is refused shows none. VectorCraft's own API and limits. Tests: `objects::tests::notice_is_escaped_capped_and_checked` in `vectorcraft-plugins`, `a_filter_s_notice_is_returned_once_its_output_is_applied` and `a_plugin_command_returns_its_run_s_notice` in `vectorcraft-engine`, `plugin_notice_shows_after_the_plug_in_s_name_and_is_never_translated` in `vectorcraft-ui-egui`.
|
||||
- Open Recent Files under `--automation-read-root`: the control channel's `ui.menu.list` and `file.recentFiles` leave out the recent files outside the read roots, the other rows keep their ids, and `file.openRecentN` for one outside them answers `no such recent file`, as an empty slot does. `crates/ui-egui/src/tests/automation.rs`.
|
||||
- Saves, Export for Screens and Package under `--automation-read-root`: a save without a path leaves the document's own file out of its reply, and a save without a path known leaves out the suggested folder, when they are outside the read roots; Export for Screens into an export preset's folder outside them lists its files relative to that folder and names that folder by its name in an error, and the export settings and saved presets leave out a folder outside them when read or exported; Package's report and warnings, and Document Info's linked images, name a file outside them by its file name. A path the client gives stays in the reply. `crates/engine/src/tests/save.rs`, `crates/engine/src/cmd/fileio/tests_screens.rs`, `crates/engine/src/tests/package.rs`, `crates/ui-egui/src/tests/automation.rs`.
|
||||
- Errors under `--automation-read-root`: a refused save without a path and `file.revert` (also as an `action.batch` step), `script.listInstalled` and `links.relink {copy}` name the document's own file, the Scripts folder or the document's folder by its file name when it is outside the read roots, and keep the roots and the reason; `links.relink`'s copies name such a file by its file name too. A path the client gives stays whole. `crates/engine/src/tests/save.rs` (`pathless_save_rejection_hides_document_folder`), `crates/engine/src/cmd/fileio/action_batch.rs`, `crates/engine/src/tests/links.rs`, `crates/engine/src/tests/script_folder.rs`.
|
||||
|
||||
Reference in New Issue
Block a user