From a9e7b48bf42864ad352c6416ea159ab76f9d4c77 Mon Sep 17 00:00:00 2001 From: Cl4VD3 <344569071+Cl4VD3@users.noreply.github.com> Date: Mon, 19 Oct 2026 03:12:57 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Previous=20/=20Next=20/=20First=20/=20Last?= =?UTF-8?q?=20Brush=20commands=20(,=20.=20=E2=87=A7,=20=E2=87=A7.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Photoshop lists Previous Brush, Next Brush, First Brush and Last Brush in Edit › Keyboard Shortcuts › Tools (`,` `.` `⇧,` `⇧.`); PhotoCraft had no way to step through brush presets from the keyboard. `tools.previousBrush`, `tools.nextBrush`, `tools.firstBrush` and `tools.lastBrush` join the brush key commands in `brush_key_cmds.rs`, so they can be rebound, recorded and driven by agents like `[` / `]`. Each picks a preset with `tools.setBrush {preset}` (journaled, as a click in the Brushes panel), walking the presets in the panel's order (groups by first appearance, then each group's folder tree depth first, as `brushes_tab` draws them) and wrapping around; with no preset picked yet, Next starts at the first and Previous at the last. No presets is an error, not a panic. Tests: panel order with groups and nested folders; stepping, wrapping, first/last, the default shortcuts, and the empty-library error. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/brush_key_cmds.rs | 126 ++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/crates/engine/src/brush_key_cmds.rs b/crates/engine/src/brush_key_cmds.rs index 56663b400a..acb3c4f368 100644 --- a/crates/engine/src/brush_key_cmds.rs +++ b/crates/engine/src/brush_key_cmds.rs @@ -3,6 +3,9 @@ //! Size"…); here they are ordinary commands with default shortcuts, so they can be rebound, //! recorded and driven by agents. Each one is a `tools.setBrush` on the session brush. //! +//! `,` / `.` pick the previous or next brush preset and ⇧, / ⇧. the first or last, in the order +//! the Brushes panel lists them (Photoshop's "Previous Brush"… in Keyboard Shortcuts › Tools). +//! //! `tools.rotateBrush` turns the tip: Photoshop's ← / → while painting (1°, ⇧ 15°). Arrows mean //! other things with other tools, so the shell gives them to it only for the painting tools //! (`move_mods::arrow_keys`). @@ -34,6 +37,71 @@ fn size(s: &mut Session, up: bool) -> Result { crate::brush_cmds::set_brush(s, &json!({ "brush": { "size": size } })) } +/// Brush preset indices in the Brushes panel's order: groups in order of first appearance, and in +/// each group its folders where their first preset is, depth first (as `brushes_tab` draws them). +fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { + fn path(p: &photocraft_paint::BrushPreset) -> &[String] { + p.folder.get(..p.folder.len().min(crate::brush_preset_cmds::MAX_FOLDER_DEPTH)).unwrap_or_default() + } + fn flatten(presets: &[photocraft_paint::BrushPreset], items: &[usize], depth: usize, out: &mut Vec) { + let mut seen: Vec<&str> = Vec::new(); + for &i in items { + let Some(p) = presets.get(i) else { continue }; + match path(p).get(depth) { + None => out.push(i), + Some(name) if !seen.contains(&name.as_str()) => { + seen.push(name); + let inside: Vec = items.iter().copied().filter(|&j| presets.get(j).is_some_and(|q| path(q).get(depth) == Some(name))).collect(); + flatten(presets, &inside, depth + 1, out); + } + Some(_) => {} + } + } + } + let mut groups: Vec<(&str, Vec)> = Vec::new(); + for (i, p) in presets.iter().enumerate() { + match groups.iter_mut().find(|(g, _)| *g == p.group) { + Some((_, v)) => v.push(i), + None => groups.push((&p.group, vec![i])), + } + } + let mut out = Vec::with_capacity(presets.len()); + for (_, items) in &groups { + flatten(presets, items, 0, &mut out); + } + out +} + +/// Which way [`step_preset`] moves through the presets. +#[derive(Clone, Copy)] +enum Step { + Previous, + Next, + First, + Last, +} + +/// `,` / `.` / ⇧, / ⇧.: pick the previous, next, first or last brush preset (wrapping around), as +/// a click in the Brushes panel would (`tools.setBrush` with the preset). With no preset picked +/// yet, Next starts at the first and Previous at the last. +fn step_preset(s: &mut Session, step: Step) -> Result { + let order = panel_order(&s.tools.presets); + let n = order.len(); + if n == 0 { + return Err(EngineError::Other("there are no brush presets".into())); + } + let at = s.tools.current_preset.as_deref().and_then(|c| order.iter().position(|&i| s.tools.presets.get(i).is_some_and(|p| p.name.eq_ignore_ascii_case(c)))); + let k = match (step, at) { + (Step::First, _) | (Step::Next, None) => 0, + (Step::Last, _) | (Step::Previous, None) => n - 1, + (Step::Next, Some(k)) => (k + 1) % n, + (Step::Previous, Some(k)) => (k + n - 1) % n, + }; + let name = order.get(k).and_then(|&i| s.tools.presets.get(i)).map(|p| p.name.clone()).ok_or_else(|| EngineError::Other("no such brush preset".into()))?; + crate::brush_cmds::set_brush(s, &json!({ "preset": name }))?; + Ok(json!({ "preset": name })) +} + fn hardness(s: &mut Session, up: bool) -> Result { let hardness = hardness_step(s.tools.brush.hardness, up); crate::brush_cmds::set_brush(s, &json!({ "brush": { "hardness": hardness } })) @@ -68,6 +136,10 @@ pub fn specs() -> Vec { key_cmd!("tools.increaseBrushSize", "Increase Brush Size", "]", |s, _| size(s, true)), key_cmd!("tools.decreaseBrushHardness", "Decrease Brush Hardness", "Shift+[", |s, _| hardness(s, false)), key_cmd!("tools.increaseBrushHardness", "Increase Brush Hardness", "Shift+]", |s, _| hardness(s, true)), + key_cmd!("tools.previousBrush", "Previous Brush", ",", |s, _| step_preset(s, Step::Previous)), + key_cmd!("tools.nextBrush", "Next Brush", ".", |s, _| step_preset(s, Step::Next)), + key_cmd!("tools.firstBrush", "First Brush", "Shift+,", |s, _| step_preset(s, Step::First)), + key_cmd!("tools.lastBrush", "Last Brush", "Shift+.", |s, _| step_preset(s, Step::Last)), CommandSpec { id: "tools.rotateBrush", label: "Rotate Brush Tip", @@ -120,6 +192,60 @@ mod tests { assert_eq!(s.tools.brush.angle, -15.0); } + fn preset(name: &str, group: &str, folder: &[&str], size: f32) -> photocraft_paint::BrushPreset { + photocraft_paint::BrushPreset { + name: name.into(), + brush: photocraft_paint::BrushSettings { size, ..Default::default() }, + builtin: false, + group: group.into(), + folder: folder.iter().map(|f| f.to_string()).collect(), + captures: Default::default(), + } + } + + #[test] + fn panel_order_groups_then_folders_depth_first() { + let presets = vec![ + preset("a", "G1", &[], 1.0), + preset("b", "G2", &[], 2.0), + preset("c", "G1", &["F"], 3.0), + preset("d", "G1", &[], 4.0), + preset("e", "G1", &["F"], 5.0), + preset("f", "G1", &["F", "Sub"], 6.0), + preset("g", "G1", &["F"], 7.0), + ]; + let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); + // G1: a, folder F (c, e, then Sub's f where its first preset is, g), d; then G2: b. + assert_eq!(names, ["a", "c", "e", "f", "g", "d", "b"]); + } + + #[test] + fn previous_and_next_brush_walk_the_presets_and_wrap() { + let mut s = Session::new(); + s.tools.presets = vec![preset("One", "", &[], 11.0), preset("Two", "", &[], 22.0), preset("Three", "", &[], 33.0)]; + s.tools.current_preset = None; + let picked = |s: &Session| (s.tools.current_preset.clone().unwrap_or_default(), s.tools.brush.size); + s.execute("tools.nextBrush", Value::Null).unwrap(); + assert_eq!(picked(&s), ("One".into(), 11.0), "Next with no preset picked starts at the first"); + s.execute("tools.nextBrush", Value::Null).unwrap(); + assert_eq!(picked(&s), ("Two".into(), 22.0)); + s.execute("tools.lastBrush", Value::Null).unwrap(); + assert_eq!(picked(&s), ("Three".into(), 33.0)); + s.execute("tools.nextBrush", Value::Null).unwrap(); + assert_eq!(picked(&s).0, "One", "wraps past the last"); + s.execute("tools.previousBrush", Value::Null).unwrap(); + assert_eq!(picked(&s).0, "Three", "wraps before the first"); + s.execute("tools.firstBrush", Value::Null).unwrap(); + assert_eq!(picked(&s).0, "One"); + let sc = |id: &str| crate::commands::find(id).and_then(|c| c.shortcut); + assert_eq!( + [sc("tools.previousBrush"), sc("tools.nextBrush"), sc("tools.firstBrush"), sc("tools.lastBrush")], + [Some(","), Some("."), Some("Shift+,"), Some("Shift+.")] + ); + s.tools.presets.clear(); + assert!(s.execute("tools.nextBrush", Value::Null).is_err()); + } + #[test] fn commands_step_the_session_brush_and_journal() { let mut s = Session::new(); From 89a34d0d15b428dcac422afc72365b8fc20f3bef Mon Sep 17 00:00:00 2001 From: Cl4VD3 <344569071+Cl4VD3@users.noreply.github.com> Date: Mon, 19 Oct 2026 04:26:42 +0200 Subject: [PATCH 2/4] Brush stepping: group like the panel, skip names it can't pick, test a refused step changes nothing Review: presets with no group share the panel's "My Brushes" group (UNGROUPED now lives in the engine, and brush_panel uses it); a preset whose name only differs in case from an earlier one can't be selected by name, so stepping skips it instead of sticking; the empty-library test checks the brush and current preset are unchanged. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/brush_key_cmds.rs | 34 ++++++++++++++++++++++++----- crates/ui-egui/src/brush_panel.rs | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/brush_key_cmds.rs b/crates/engine/src/brush_key_cmds.rs index acb3c4f368..351f4df65f 100644 --- a/crates/engine/src/brush_key_cmds.rs +++ b/crates/engine/src/brush_key_cmds.rs @@ -37,8 +37,14 @@ fn size(s: &mut Session, up: bool) -> Result { crate::brush_cmds::set_brush(s, &json!({ "brush": { "size": size } })) } -/// Brush preset indices in the Brushes panel's order: groups in order of first appearance, and in -/// each group its folders where their first preset is, depth first (as `brushes_tab` draws them). +/// The Brushes panel's label for presets saved without a group: they share its group with presets +/// in a group of that name. +pub const UNGROUPED: &str = "My Brushes"; + +/// Brush preset indices in the Brushes panel's order: groups in order of first appearance (no +/// group is [`UNGROUPED`]), and in each group its folders where their first preset is, depth first +/// (as `brushes_tab` draws them). A preset its name can't select (an earlier one has the same name +/// up to case, and `tools.setBrush` picks that one) is left out, so stepping never gets stuck. fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { fn path(p: &photocraft_paint::BrushPreset) -> &[String] { p.folder.get(..p.folder.len().min(crate::brush_preset_cmds::MAX_FOLDER_DEPTH)).unwrap_or_default() @@ -60,9 +66,14 @@ fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { } let mut groups: Vec<(&str, Vec)> = Vec::new(); for (i, p) in presets.iter().enumerate() { - match groups.iter_mut().find(|(g, _)| *g == p.group) { + let selectable = photocraft_paint::presets::find(presets, &p.name).is_some_and(|q| std::ptr::eq(q, p)); + if !selectable { + continue; + } + let group = if p.group.is_empty() { UNGROUPED } else { p.group.as_str() }; + match groups.iter_mut().find(|(g, _)| *g == group) { Some((_, v)) => v.push(i), - None => groups.push((&p.group, vec![i])), + None => groups.push((group, vec![i])), } } let mut out = Vec::with_capacity(presets.len()); @@ -217,6 +228,14 @@ mod tests { let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); // G1: a, folder F (c, e, then Sub's f where its first preset is, g), d; then G2: b. assert_eq!(names, ["a", "c", "e", "f", "g", "d", "b"]); + // No group is the panel's "My Brushes": one group with presets named into it. + let presets = vec![preset("x", "", &[], 1.0), preset("y", UNGROUPED, &[], 1.0), preset("z", "", &[], 1.0), preset("w", "G", &[], 1.0)]; + let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); + assert_eq!(names, ["x", "y", "z", "w"]); + // A name only a case apart from an earlier one can't be picked by name: skipped. + let presets = vec![preset("Foo", "", &[], 1.0), preset("foo", "", &[], 1.0), preset("Bar", "", &[], 1.0)]; + let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); + assert_eq!(names, ["Foo", "Bar"]); } #[test] @@ -242,8 +261,13 @@ mod tests { [sc("tools.previousBrush"), sc("tools.nextBrush"), sc("tools.firstBrush"), sc("tools.lastBrush")], [Some(","), Some("."), Some("Shift+,"), Some("Shift+.")] ); + // No presets: an error, and the brush and the current preset stay as they were. s.tools.presets.clear(); - assert!(s.execute("tools.nextBrush", Value::Null).is_err()); + let (brush, current) = (s.tools.brush.clone(), s.tools.current_preset.clone()); + for id in ["tools.previousBrush", "tools.nextBrush", "tools.firstBrush", "tools.lastBrush"] { + assert!(s.execute(id, Value::Null).is_err(), "{id}"); + } + assert_eq!((s.tools.brush.clone(), s.tools.current_preset.clone()), (brush, current)); } #[test] diff --git a/crates/ui-egui/src/brush_panel.rs b/crates/ui-egui/src/brush_panel.rs index 332c80c4b7..c015ab137a 100644 --- a/crates/ui-egui/src/brush_panel.rs +++ b/crates/ui-egui/src/brush_panel.rs @@ -211,7 +211,7 @@ pub fn commit_gesture(app: &mut PhotocraftApp, ctx: &egui::Context, before: &Bru } /// Group label for presets saved without a group. -pub const UNGROUPED: &str = "My Brushes"; +pub const UNGROUPED: &str = photocraft_engine::brush_key_cmds::UNGROUPED; /// Preset indices in panel order: groups in order of first appearance. pub fn grouped_presets(presets: &[paint::BrushPreset]) -> Vec<(String, Vec)> { From db28e5da0306995a04dc5257d125513cbe25dfd2 Mon Sep 17 00:00:00 2001 From: Cl4VD3 <344569071+Cl4VD3@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:31:15 +0200 Subject: [PATCH 3/4] Brush stepping: place groups by every preset before skipping unselectable names Review (CodeRabbit): skipping a case-insensitive duplicate before grouping dropped its group's first appearance, so a group could step out of the panel's order. Groups and folders are now ordered from all presets, and unselectable presets are removed from the result afterwards. Test added. Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/brush_key_cmds.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/brush_key_cmds.rs b/crates/engine/src/brush_key_cmds.rs index 351f4df65f..eada73490b 100644 --- a/crates/engine/src/brush_key_cmds.rs +++ b/crates/engine/src/brush_key_cmds.rs @@ -44,7 +44,8 @@ pub const UNGROUPED: &str = "My Brushes"; /// Brush preset indices in the Brushes panel's order: groups in order of first appearance (no /// group is [`UNGROUPED`]), and in each group its folders where their first preset is, depth first /// (as `brushes_tab` draws them). A preset its name can't select (an earlier one has the same name -/// up to case, and `tools.setBrush` picks that one) is left out, so stepping never gets stuck. +/// up to case, and `tools.setBrush` picks that one) is left out afterwards, so stepping never +/// gets stuck. fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { fn path(p: &photocraft_paint::BrushPreset) -> &[String] { p.folder.get(..p.folder.len().min(crate::brush_preset_cmds::MAX_FOLDER_DEPTH)).unwrap_or_default() @@ -66,10 +67,6 @@ fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { } let mut groups: Vec<(&str, Vec)> = Vec::new(); for (i, p) in presets.iter().enumerate() { - let selectable = photocraft_paint::presets::find(presets, &p.name).is_some_and(|q| std::ptr::eq(q, p)); - if !selectable { - continue; - } let group = if p.group.is_empty() { UNGROUPED } else { p.group.as_str() }; match groups.iter_mut().find(|(g, _)| *g == group) { Some((_, v)) => v.push(i), @@ -80,6 +77,9 @@ fn panel_order(presets: &[photocraft_paint::BrushPreset]) -> Vec { for (_, items) in &groups { flatten(presets, items, 0, &mut out); } + // Groups and folders are placed by every preset, as the panel places them; only then are the + // presets their names can't select left out. + out.retain(|&i| presets.get(i).is_some_and(|p| photocraft_paint::presets::find(presets, &p.name).is_some_and(|q| std::ptr::eq(q, p)))); out } @@ -236,6 +236,11 @@ mod tests { let presets = vec![preset("Foo", "", &[], 1.0), preset("foo", "", &[], 1.0), preset("Bar", "", &[], 1.0)]; let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); assert_eq!(names, ["Foo", "Bar"]); + // A skipped duplicate still places its group where the panel does: G2 (from `foo`) comes + // before G3, so the panel's Foo, foo, Baz, Bar steps as Foo, Baz, Bar. + let presets = vec![preset("Foo", "G1", &[], 1.0), preset("foo", "G2", &[], 1.0), preset("Bar", "G3", &[], 1.0), preset("Baz", "G2", &[], 1.0)]; + let names: Vec<&str> = panel_order(&presets).into_iter().map(|i| presets[i].name.as_str()).collect(); + assert_eq!(names, ["Foo", "Baz", "Bar"]); } #[test] From 811eb3f06a5387ba6aab4b32eb2883604884996f Mon Sep 17 00:00:00 2001 From: Cl4VD3 <344569071+Cl4VD3@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:41:25 +0200 Subject: [PATCH 4/4] Previous/Next/First/Last Brush: translate the command labels The four labels show in the Keyboard Shortcuts dialog and the command palette, like the brush size and hardness rows next to which they go in all 20 catalogs. The test that checks those rows in every language now covers the four as well. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/i18n/cs.tsv | 4 ++++ crates/ui-egui/src/i18n/de.tsv | 4 ++++ crates/ui-egui/src/i18n/el.tsv | 4 ++++ crates/ui-egui/src/i18n/es.tsv | 4 ++++ crates/ui-egui/src/i18n/fr.tsv | 4 ++++ crates/ui-egui/src/i18n/hu.tsv | 4 ++++ crates/ui-egui/src/i18n/id.tsv | 4 ++++ crates/ui-egui/src/i18n/it.tsv | 4 ++++ crates/ui-egui/src/i18n/ja.tsv | 4 ++++ crates/ui-egui/src/i18n/ko.tsv | 4 ++++ crates/ui-egui/src/i18n/mod.rs | 16 +++++++++++++--- crates/ui-egui/src/i18n/nl.tsv | 4 ++++ crates/ui-egui/src/i18n/pl.tsv | 4 ++++ crates/ui-egui/src/i18n/pt-br.tsv | 4 ++++ crates/ui-egui/src/i18n/ru.tsv | 4 ++++ crates/ui-egui/src/i18n/sr.tsv | 4 ++++ crates/ui-egui/src/i18n/tr.tsv | 4 ++++ crates/ui-egui/src/i18n/uk.tsv | 4 ++++ crates/ui-egui/src/i18n/vi.tsv | 4 ++++ crates/ui-egui/src/i18n/zh-hans.tsv | 4 ++++ crates/ui-egui/src/i18n/zh-hant.tsv | 4 ++++ 21 files changed, 93 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index f6046fc207..8f09d71451 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -3843,6 +3843,10 @@ navigator Zoom Zvětšení Increase Brush Size Zvětšit velikost štětce Decrease Brush Hardness Snížit tvrdost štětce Increase Brush Hardness Zvýšit tvrdost štětce + Previous Brush Předchozí štětec + Next Brush Další štětec + First Brush První štětec + Last Brush Poslední štětec Memory Usage Využití paměti Per-document RAM limit (MB) Limit RAM na dokument (MB) Installed RAM: {ram} MB; this limit: {percent}% Nainstalovaná RAM: {ram} MB; tento limit: {percent}% diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 0ad7366c4b..c000b808ac 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -2820,6 +2820,10 @@ curves Smooth Glätten Increase Brush Size Pinselgröße erhöhen Decrease Brush Hardness Pinselhärte verringern Increase Brush Hardness Pinselhärte erhöhen + Previous Brush Vorheriger Pinsel + Next Brush Nächster Pinsel + First Brush Erster Pinsel + Last Brush Letzter Pinsel Temporary Vorübergehend Space Leertaste Hand Tool (hold) Hand-Werkzeug (gedrückt halten) diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 83621629fe..2310dcd2d6 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -3935,6 +3935,10 @@ curves Smooth Εξομάλυνση Increase Brush Size Αύξηση μεγέθους πινέλου Decrease Brush Hardness Μείωση σκληρότητας πινέλου Increase Brush Hardness Αύξηση σκληρότητας πινέλου + Previous Brush Προηγούμενο πινέλο + Next Brush Επόμενο πινέλο + First Brush Πρώτο πινέλο + Last Brush Τελευταίο πινέλο Memory Usage Χρήση μνήμης Per-document RAM limit (MB) Όριο RAM ανά έγγραφο (MB) Installed RAM: {ram} MB; this limit: {percent}% Εγκατεστημένη RAM: {ram} MB· αυτό το όριο: {percent}% diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index e23b4e84c7..5e44bd0e72 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -4197,6 +4197,10 @@ navigator Zoom Zoom Increase Brush Size Aumentar tamaño del pincel Decrease Brush Hardness Reducir dureza del pincel Increase Brush Hardness Aumentar dureza del pincel + Previous Brush Pincel anterior + Next Brush Pincel siguiente + First Brush Primer pincel + Last Brush Último pincel Memory Usage Uso de memoria Per-document RAM limit (MB) Límite de RAM por documento (MB) Installed RAM: {ram} MB; this limit: {percent}% RAM instalada: {ram} MB; este límite: {percent}% diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 3bcca7037c..8c90b6a694 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3243,6 +3243,10 @@ curves Smooth Lisser Increase Brush Size Augmenter la taille du pinceau Decrease Brush Hardness Réduire la dureté du pinceau Increase Brush Hardness Augmenter la dureté du pinceau + Previous Brush Pinceau précédent + Next Brush Pinceau suivant + First Brush Premier pinceau + Last Brush Dernier pinceau Memory Usage Utilisation de la mémoire Per-document RAM limit (MB) Limite RAM par document (Mo) Installed RAM: {ram} MB; this limit: {percent}% RAM installée : {ram} Mo ; cette limite : {percent}% diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 4907e2da0c..f8d3243ce4 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -4154,6 +4154,10 @@ cameraRaw Yellow Sárga Increase Brush Size Ecsetméret növelése Decrease Brush Hardness Ecsetkeménység csökkentése Increase Brush Hardness Ecsetkeménység növelése + Previous Brush Előző ecset + Next Brush Következő ecset + First Brush Első ecset + Last Brush Utolsó ecset Memory Usage Memóriahasználat Per-document RAM limit (MB) Dokumentumonkénti RAM-korlát (MB) Installed RAM: {ram} MB; this limit: {percent}% Telepített RAM: {ram} MB; ez a korlát: {percent}% diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index fc0d66afae..9878cab5fc 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3230,6 +3230,10 @@ curves Smooth Haluskan Increase Brush Size Perbesar ukuran kuas Decrease Brush Hardness Kurangi kekerasan kuas Increase Brush Hardness Tambah kekerasan kuas + Previous Brush Kuas sebelumnya + Next Brush Kuas berikutnya + First Brush Kuas pertama + Last Brush Kuas terakhir Memory Usage Penggunaan memori Per-document RAM limit (MB) Batas RAM per dokumen (MB) Installed RAM: {ram} MB; this limit: {percent}% RAM terpasang: {ram} MB; batas ini: {percent}% diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 609469635f..cb65332400 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -4251,6 +4251,10 @@ navigator Zoom Zoom Increase Brush Size Aumenta dimensione pennello Decrease Brush Hardness Riduci durezza pennello Increase Brush Hardness Aumenta durezza pennello + Previous Brush Pennello precedente + Next Brush Pennello successivo + First Brush Primo pennello + Last Brush Ultimo pennello Space Barra spaziatrice Hand Tool (hold) Strumento Mano (tieni premuto) Zoom In (hold, drag to scrub) Ingrandisci (tieni premuto, trascina per lo zoom continuo) diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 39a38a1142..7593ca9222 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -3912,6 +3912,10 @@ curves Smooth スムーズ Increase Brush Size ブラシサイズを大きく Decrease Brush Hardness ブラシの硬さを下げる Increase Brush Hardness ブラシの硬さを上げる + Previous Brush 前のブラシ + Next Brush 次のブラシ + First Brush 最初のブラシ + Last Brush 最後のブラシ Memory Usage メモリ使用量 Per-document RAM limit (MB) ドキュメントあたりの RAM 上限 (MB) Installed RAM: {ram} MB; this limit: {percent}% 搭載 RAM: {ram} MB、この上限: {percent}% diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 241c81bef5..9b06410366 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -3416,6 +3416,10 @@ curves Smooth 매끄럽게 Increase Brush Size 브러시 크기 늘리기 Decrease Brush Hardness 브러시 경도 줄이기 Increase Brush Hardness 브러시 경도 늘리기 + Previous Brush 이전 브러시 + Next Brush 다음 브러시 + First Brush 첫 번째 브러시 + Last Brush 마지막 브러시 Memory Usage 메모리 사용량 Per-document RAM limit (MB) 문서당 RAM 한도(MB) Installed RAM: {ram} MB; this limit: {percent}% 설치된 RAM: {ram} MB; 이 한도: {percent}% diff --git a/crates/ui-egui/src/i18n/mod.rs b/crates/ui-egui/src/i18n/mod.rs index c7a0d574b2..8f8a0937ae 100644 --- a/crates/ui-egui/src/i18n/mod.rs +++ b/crates/ui-egui/src/i18n/mod.rs @@ -514,11 +514,21 @@ mod tests { assert_eq!(Lang::from_pref("xx-unknown"), Lang::EN); } - /// The brush size/hardness shortcut rows (`tools.*` commands without a menu item) must be translated in - /// every catalog, or they show English in the Keyboard Shortcuts dialog and cannot be found by searching. + /// The brush size/hardness and preset-stepping shortcut rows (`tools.*` commands without a menu item) must + /// be translated in every catalog, or they show English in the Keyboard Shortcuts dialog and cannot be found + /// by searching. #[test] fn brush_size_and_hardness_shortcuts_are_translated_in_every_language() { - let keys = ["Decrease Brush Size", "Increase Brush Size", "Decrease Brush Hardness", "Increase Brush Hardness"]; + let keys = [ + "Decrease Brush Size", + "Increase Brush Size", + "Decrease Brush Hardness", + "Increase Brush Hardness", + "Previous Brush", + "Next Brush", + "First Brush", + "Last Brush", + ]; for lang in Lang::all().filter(|lang| *lang != Lang::EN) { for key in keys { assert!(has(lang, key), "{} has no translation for {key:?}", lang.code()); diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index e0dd17ff57..c856b4570e 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -3995,6 +3995,10 @@ curves Smooth Vloeiend maken Increase Brush Size Penseelgrootte vergroten Decrease Brush Hardness Penseelhardheid verlagen Increase Brush Hardness Penseelhardheid verhogen + Previous Brush Vorig penseel + Next Brush Volgend penseel + First Brush Eerste penseel + Last Brush Laatste penseel Memory Usage Geheugengebruik Per-document RAM limit (MB) RAM-limiet per document (MB) Installed RAM: {ram} MB; this limit: {percent}% Geïnstalleerd RAM: {ram} MB; deze limiet: {percent}% diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 10435771f5..c7e3f5abaa 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3834,6 +3834,10 @@ curves Smooth Wygładź Increase Brush Size Zwiększ rozmiar pędzla Decrease Brush Hardness Zmniejsz twardość pędzla Increase Brush Hardness Zwiększ twardość pędzla + Previous Brush Poprzedni pędzel + Next Brush Następny pędzel + First Brush Pierwszy pędzel + Last Brush Ostatni pędzel Memory Usage Użycie pamięci Per-document RAM limit (MB) Limit RAM na dokument (MB) Installed RAM: {ram} MB; this limit: {percent}% Zainstalowany RAM: {ram} MB; ten limit: {percent}% diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index f4dc857f7d..db1586516e 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4025,6 +4025,10 @@ layerLabel No Color Sem cor Increase Brush Size Aumentar tamanho do pincel Decrease Brush Hardness Diminuir dureza do pincel Increase Brush Hardness Aumentar dureza do pincel + Previous Brush Pincel anterior + Next Brush Próximo pincel + First Brush Primeiro pincel + Last Brush Último pincel Memory Usage Uso de memória Per-document RAM limit (MB) Limite de RAM por documento (MB) Installed RAM: {ram} MB; this limit: {percent}% RAM instalada: {ram} MB; este limite: {percent}% diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index b497b41855..106985b19c 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3208,6 +3208,10 @@ curves Smooth Сгладить Increase Brush Size Увеличить размер кисти Decrease Brush Hardness Уменьшить жёсткость кисти Increase Brush Hardness Увеличить жёсткость кисти + Previous Brush Предыдущая кисть + Next Brush Следующая кисть + First Brush Первая кисть + Last Brush Последняя кисть Memory Usage Использование памяти Per-document RAM limit (MB) Лимит ОЗУ на документ (МБ) Installed RAM: {ram} MB; this limit: {percent}% Установлено ОЗУ: {ram} МБ; этот лимит: {percent}% diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv index dc3608c514..84eab68029 100644 --- a/crates/ui-egui/src/i18n/sr.tsv +++ b/crates/ui-egui/src/i18n/sr.tsv @@ -4308,6 +4308,10 @@ shape Appearance Izgled Increase Brush Size Povećaj veličinu četkice Decrease Brush Hardness Smanji tvrdoću četkice Increase Brush Hardness Povećaj tvrdoću četkice + Previous Brush Prethodna četkica + Next Brush Sledeća četkica + First Brush Prva četkica + Last Brush Poslednja četkica Memory Usage Upotreba memorije Per-document RAM limit (MB) RAM limit po dokumentu (MB) Installed RAM: {ram} MB; this limit: {percent}% Instalisan RAM: {ram} MB; ovaj limit: {percent}% diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 5e5326f9f0..5ca023ebd3 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -3965,6 +3965,10 @@ cameraData Lens Lens Increase Brush Size Fırça boyutunu büyüt Decrease Brush Hardness Fırça sertliğini azalt Increase Brush Hardness Fırça sertliğini artır + Previous Brush Önceki fırça + Next Brush Sonraki fırça + First Brush İlk fırça + Last Brush Son fırça Memory Usage Bellek kullanımı Per-document RAM limit (MB) Belge başına RAM sınırı (MB) Installed RAM: {ram} MB; this limit: {percent}% Kurulu RAM: {ram} MB; bu sınır: {percent}% diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index cc3df88348..aa70de2cca 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3935,6 +3935,10 @@ curves Smooth Згладити Increase Brush Size Збільшити розмір пензля Decrease Brush Hardness Зменшити жорсткість пензля Increase Brush Hardness Збільшити жорсткість пензля + Previous Brush Попередній пензель + Next Brush Наступний пензель + First Brush Перший пензель + Last Brush Останній пензель # Dynamic color-picker titles and warnings about losing editable layer content. Color Picker (Background Color) Вибір кольору (колір тла) Color Picker (Foreground Color) Вибір кольору (основний колір) diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index d19e3d576a..a33c29ad05 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -3722,6 +3722,10 @@ curves Smooth Làm mượt Increase Brush Size Tăng kích thước cọ Decrease Brush Hardness Giảm độ cứng của cọ Increase Brush Hardness Tăng độ cứng của cọ + Previous Brush Cọ trước + Next Brush Cọ tiếp theo + First Brush Cọ đầu tiên + Last Brush Cọ cuối cùng Memory Usage Sử dụng bộ nhớ Per-document RAM limit (MB) Giới hạn RAM mỗi tài liệu (MB) Installed RAM: {ram} MB; this limit: {percent}% RAM đã cài: {ram} MB; giới hạn này: {percent}% diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 675a544509..0326972420 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -2858,6 +2858,10 @@ curves Smooth 平滑 Increase Brush Size 增大画笔大小 Decrease Brush Hardness 减小画笔硬度 Increase Brush Hardness 增大画笔硬度 + Previous Brush 上一个画笔 + Next Brush 下一个画笔 + First Brush 第一个画笔 + Last Brush 最后一个画笔 Memory Usage 内存使用 Per-document RAM limit (MB) 每个文档的 RAM 上限 (MB) Installed RAM: {ram} MB; this limit: {percent}% 已安装 RAM:{ram} MB;此上限:{percent}% diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 982fa97319..6d01763ef0 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2843,6 +2843,10 @@ curves Smooth 平滑 Increase Brush Size 放大筆刷大小 Decrease Brush Hardness 降低筆刷硬度 Increase Brush Hardness 提高筆刷硬度 + Previous Brush 上一個筆刷 + Next Brush 下一個筆刷 + First Brush 第一個筆刷 + Last Brush 最後一個筆刷 Memory Usage 記憶體使用量 Per-document RAM limit (MB) 每個文件的 RAM 上限 (MB) Installed RAM: {ram} MB; this limit: {percent}% 已安裝 RAM:{ram} MB;此上限:{percent}%