DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Merge PR #1464: Paragraph styles: a new style from the selected text, Next Style, Reset To Base
aiongg4e41f2ea0a90
diff --cc ROADMAP.mdindex d0bf01ce7,1653b819e..8df608dbc--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -455,8 -444,7 +456,9 @@@ Newest first- **2026-10-16** · Lock Guides and Lock Column Guides are commands in View ▸ Grids & Guides (`view.lockGuides`, ⌥⌘;, and `view.lockColumnGuides`), so the control channel and MCP reach them. Lock Column Guides is an undo step, is saved with the document, on in new ones, and read from and written to IDML's `ColumnGuideLocked`, which export always wrote as locked (#1096). No readiness percentage change.- **2026-10-16** · IDML: a page keeps column guides that were dragged off centre (InDesign's Custom columns). They were divided evenly on import, so the gutter sprang back to the middle; the imported positions now place the columns, with the canvas guides, snapping and text placement following them, and they are written back on export. Layout › Margins and Columns re-divides them evenly when the count or gutter changes, as InDesign's does. No readiness percentage change.- **2026-10-16** · IDML: custom column positions are checked before they are used (#1096). A set must give two edges per column, ascending from the left margin to the right one; any other (a wrong count, unsorted or non-numeric values, a list longer than 216 columns allow, or positions left behind by a margin or page-size change) is the even split, in the canvas, on import and on export, instead of columns drawn outside the margins. No readiness percentage change.+- **2026-10-21** · Paragraph Border and Paragraph Shading link their four sides as InDesign's: the stroke weights, offsets and corners have the "Make all settings the same" link, on when the four are the same, so a side typed in sets all four; with the link off a side is set alone (a border with only a thick left side). Found in the Learn Skills Daily course, chapter 40. No readiness percentage change.+- **2026-10-21** · Paragraph rules have InDesign's Type (solid, thick/thin stripes, dashed, dotted, straight hash, wavy, or a stroke style of the document), Gap Color and Gap Tint, and Keep In Frame (rule above); the Paragraph Rules page is laid out as InDesign's (Weight and Type, Color and Tint, Gap Color and Gap Tint, Width and Offset, Left and Right Indent). IDML reads and writes them (`RuleAboveType`, `RuleBelowGapColor`, `KeepRuleAboveInFrame`…). Found in the Learn Skills Daily course, chapter 20. No readiness percentage change.+ - **2026-10-21** · New Paragraph Style with text selected starts from it, as InDesign's (Based On [No Paragraph Style], every setting of the text that differs) and Apply Style to Selection gives the paragraph the new style; General has Next Style and Reset To Base; Basic Character Formats is in two columns (Size | Leading, Kerning | Tracking, Case | Position). `style.paragraph.edit` honours `nextStyle` (it was ignored) and takes `resetToBase`. Found in the Learn Skills Daily course, chapter 20. No readiness percentage change.- **2026-10-21** · Properties › Character and Paragraph: ••• (More Options) expands the section in place, as InDesign's: Character adds vertical and horizontal scale, baseline shift, skew, language and OpenType, and All Caps, Small Caps, Superscript, Subscript, Underline and Strikethrough; Paragraph adds the left, right, first line and last line indents, space before and after, the drop cap's lines and characters, Align to Baseline Grid and Hyphenate. It used to open the Character or Paragraph panel; the language field moved under ••• as in InDesign. Found in the Learn Skills Daily course, chapter 16. No readiness percentage change.- **2026-10-21** · The text Control panel has InDesign's two modes: A (Character Formatting Controls: font and style, size and leading, All Caps/Superscript/Underline and Small Caps/Subscript/Strikethrough, kerning and tracking, vertical and horizontal scale, baseline shift and skew, character style and language) and ¶ (Paragraph Formatting Controls: the nine alignments, left/first line and right/last line indents, space before and after, the drop cap's lines and characters, paragraph style, Hyphenate and Align to Baseline Grid). It used to show a fixed mix of both. Found in the Learn Skills Daily course, chapter 16. No readiness percentage change.- **2026-10-20** · With the Type tool, the Control panel's font size, leading and tracking fields have a spinner and a list of common values, as in InDesign (auto leading in parentheses). No readiness percentage change.diff --cc crates/ui-egui/src/dialogs/tests.rsindex 8884389b1,e2877fb41..2665c0284--- a/crates/ui-egui/src/dialogs/tests.rs+++ b/crates/ui-egui/src/dialogs/tests.rs@@@ -3522,163 -3523,83 +3523,244 @@@ fn character_style_options_set_the_digiassert_eq!(char_style(&app, "Emphasis").unwrap().chars.digits, Some(designcraft_doc::Digits::Farsi));}+/// Replace the text of the field beside the `nth` label `label` (on its row, to its right) with+/// `new`, and leave the field.+fn retype_beside(h: &mut egui_kittest::Harness<'static, crate::test_window::Window>, label: &str, nth: usize, new: &str) {+ use egui_kittest::kittest::Queryable;+ let l = h.get_all_by_label(label).nth(nth).unwrap_or_else(|| panic!("no label {label} #{nth}")).rect();+ let field = h+ .get_all_by(|n| n.role() == egui::accesskit::Role::TextInput)+ .map(|n| n.rect())+ .filter(|r| r.center().x > l.max.x && (r.center().y - l.center().y).abs() < l.height().max(8.0))+ .min_by(|a, b| a.min.x.total_cmp(&b.min.x))+ .unwrap_or_else(|| panic!("no field beside {label} #{nth}"))+ .center();+ crate::test_window::click_at(h, field);+ h.key_press_modifiers(egui::Modifiers::COMMAND, egui::Key::A);+ h.event(egui::Event::Text(new.into()));+ h.run_steps(1);+ // Tab leaves the field (Enter would be the dialog's OK).+ h.key_press(egui::Key::Tab);+ h.run_steps(3);+}++/// The course's chapter 40: Paragraph Border's four weights are linked as InDesign's, so a+/// side typed in sets all four; with the link off ("Make all settings the same") a side is set+/// alone, as the lesson gives the border only a thick left side. The corners link the same way.+#[test]+fn paragraph_border_sides_and_corners_link_as_indesigns() {+ use egui_kittest::kittest::Queryable;+ let (app, _) = ruled_paragraph();+ let mut h = crate::test_window::open(app, egui::vec2(1400.0, 900.0));+ h.state_mut().app.ui.dialog = Some(Dialog::new("paragraphStyleOptions", json!({"name": "Ruled Child", "section": "border", "p.borderOn": true})));+ h.run_steps(4);+ let field = |h: &egui_kittest::Harness<'static, crate::test_window::Window>, key: &str| {+ h.state().app.ui.dialog.as_ref().and_then(|d| d.fields.get(&format!("p.{key}")).cloned()).unwrap_or_default()+ };+ // The four weights start the same, so linked: Top sets them all.+ retype_beside(&mut h, "Top:", 0, "3");+ assert_eq!(field(&h, "borderWeights"), json!([3.0, 3.0, 3.0, 3.0]));+ // Unlinked, Left alone takes 10 pt.+ // The link of the weights (0), corners (1) or offsets (2), where it is now: the dialog+ // scrolls as fields take focus.+ let link = |h: &egui_kittest::Harness<'static, crate::test_window::Window>, n: usize| {+ let links: Vec<egui::Rect> = h.get_all_by_label("Make all settings the same").map(|n| n.rect()).collect();+ assert_eq!(links.len(), 3, "weights, corners and offsets each have a link");+ links[n].center()+ };+ let at = link(&h, 0);+ crate::test_window::click_at(&mut h, at);+ retype_beside(&mut h, "Left:", 0, "10");+ assert_eq!(field(&h, "borderWeights"), json!([3.0, 10.0, 3.0, 3.0]));+ // Linked again, the four take Top's weight; unlinked once more for the thick left side.+ let at = link(&h, 0);+ crate::test_window::click_at(&mut h, at);+ assert_eq!(field(&h, "borderWeights"), json!([3.0, 3.0, 3.0, 3.0]));+ let at = link(&h, 0);+ crate::test_window::click_at(&mut h, at);+ retype_beside(&mut h, "Left:", 0, "10");+ assert_eq!(field(&h, "borderWeights"), json!([3.0, 10.0, 3.0, 3.0]));+ // The corners start the same too: Top Left's size goes to all four.+ retype_beside(&mut h, "Top Left:", 0, "0p4");+ let corners = field(&h, "borderCorners");+ assert!((0..4).all(|i| corners[i]["size"] == json!(4.0)), "{corners}");+ // Unlinked, Top Right alone takes 0p8; linked again, all four take Top Left's 4 pt.+ let at = link(&h, 1);+ crate::test_window::click_at(&mut h, at);+ retype_beside(&mut h, "Top Right:", 0, "0p8");+ assert_eq!(field(&h, "borderCorners")[1]["size"], json!(8.0));+ assert_eq!(field(&h, "borderCorners")[0]["size"], json!(4.0));+ let at = link(&h, 1);+ crate::test_window::click_at(&mut h, at);+ let corners = field(&h, "borderCorners");+ assert!((0..4).all(|i| corners[i] == corners[0] && corners[i]["size"] == json!(4.0)), "{corners}");+ confirm(&mut h.state_mut().app).unwrap();+ let style = h.state().app.session.doc().unwrap().doc.styles.para("Ruled Child").cloned().unwrap();+ assert_eq!(style.para.border_weights, Some([3.0, 10.0, 3.0, 3.0]));+}++/// Paragraph Rules › Color offers Text Color above the swatches, so a rule set to a swatch can+/// go back to it; Gap Color lists only swatches.+#[test]+fn the_rule_colour_menu_offers_text_color() {+ let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({})).unwrap();+ let doc = app.session.doc().unwrap().doc.clone();+ let menu = |ctx: &egui::Context, text: Option<&str>, click: Option<egui::Pos2>| {+ let mut picked = None;+ let mut labels = Vec::new();+ let mut events = Vec::new();+ if let Some(pos) = click {+ events.push(egui::Event::PointerMoved(pos));+ events.push(egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed: true, modifiers: Default::default() });+ events.push(egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed: false, modifiers: Default::default() });+ }+ let input =+ egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(600.0, 600.0))), events, ..Default::default() };+ let mut out = ctx.run_ui(input, |ui| {+ picked = swatch_menu_with(ui, &doc, "m", "[Black]", 130.0, text);+ });+ out.textures_delta.clear();+ for s in out.shapes {+ if let egui::Shape::Text(t) = s.shape {+ labels.push((t.galley.job.text.clone(), t.visual_bounding_rect().center()));+ }+ }+ (picked, labels)+ };+ for text in [Some("Text Color"), None] {+ let ctx = egui::Context::default();+ let (_, labels) = menu(&ctx, text, None);+ let combo = labels.iter().find(|(t, _)| t == "[Black]").unwrap().1;+ menu(&ctx, text, Some(combo));+ let (_, labels) = menu(&ctx, text, None);+ let item = labels.iter().find(|(t, _)| t == "Text Color").map(|l| l.1);+ assert_eq!(item.is_some(), text.is_some(), "{labels:?}");+ if let Some(pos) = item {+ let (picked, _) = menu(&ctx, text, Some(pos));+ assert_eq!(picked.as_deref(), Some(designcraft_doc::TEXT_COLOR));+ }+ }+}++/// The course's chapter 20: a paragraph style's rule below becomes wavy, 3 pt, with a gap+/// colour, from Paragraph Rules › Type and Gap Color.+#[test]+fn paragraph_style_rules_take_a_type_and_a_gap_colour() {+ let (mut app, _) = ruled_paragraph();+ let ctx = egui::Context::default();+ app.ui.dialog = Some(Dialog::new("paragraphStyleOptions", json!({"name": "Ruled Child", "section": "rules", "rule": "ruleBelow"})));+ draw(&mut app, &ctx);+ if let Some(d) = app.ui.dialog.as_mut() {+ d.fields.insert("p.ruleBelow.type".into(), json!({"kind": "wavy"}));+ d.fields.insert("p.ruleBelow.weight".into(), json!(3.0));+ d.fields.insert("p.ruleBelow.gapColor".into(), json!("[Paper]"));+ }+ draw(&mut app, &ctx);+ confirm(&mut app).unwrap();+ let r = app.session.doc().unwrap().doc.styles.resolve_para_style("Ruled Child").0.rule_below;+ assert_eq!((r.kind, r.weight, r.gap_color.as_str()), (designcraft_doc::StrokeType::Wavy, 3.0, "[Paper]"));+}++/// A rule's Gap Tint shows 100% at its default (the rule's JSON leaves a full gap tint out).+#[test]+fn a_rules_default_gap_tint_shows_100() {+ use egui_kittest::kittest::Queryable;+ let (mut app, _) = ruled_paragraph();+ app.run(+ "style.paragraph.edit",+ json!({"name": "Ruled Child", "para": {"ruleBelow": {"type": {"kind": "dashed", "pattern": [4.0, 2.0]}, "gapColor": "[Paper]"}}}),+ )+ .unwrap();+ let mut h = crate::test_window::open(app, egui::vec2(1400.0, 900.0));+ h.state_mut().app.ui.dialog = Some(Dialog::new("paragraphStyleOptions", json!({"name": "Ruled Child", "section": "rules", "rule": "ruleBelow"})));+ h.run_steps(4);+ let label = h.get_by_label("Gap Tint:").rect();+ let field = h+ .get_all_by(|n| n.role() == egui::accesskit::Role::TextInput)+ .filter(|n| n.rect().center().x > label.max.x && (n.rect().center().y - label.center().y).abs() < 8.0)+ .min_by(|a, b| a.rect().min.x.total_cmp(&b.rect().min.x))+ .and_then(|n| n.value());+ assert_eq!(field.as_deref(), Some("100%"));+}+++ /// The course's chapter 20: the "Recipe Categories" title formatted on the page (size, All+ /// Caps, tracking, space after), then New Paragraph Style from it: the dialog starts from the+ /// text, and with Apply Style to Selection the paragraph takes the new style. Next Style and+ /// Reset To Base are set from General.+ #[test]+ fn a_new_paragraph_style_starts_from_the_selected_text() {+ let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({})).unwrap();+ let f = app.run("frame.create", json!({"rect": [36, 36, 400, 300], "content": "text", "text": "Egg Recipes\rBoil them."})).unwrap();+ app.run("text.select", json!({"story": f["story"], "anchor": 0, "focus": 11})).unwrap();+ app.run("type.char", json!({"attrs": {"size": 20, "capitalization": "allCaps", "tracking": 50}})).unwrap();+ app.run("type.para", json!({"attrs": {"spaceAfter": 6}})).unwrap();+ open_new_style(&mut app, true);+ let d = app.ui.dialog.clone().unwrap();+ assert_eq!(+ (d.fields["c.size"].clone(), d.fields["c.capitalization"].clone(), d.fields["p.spaceAfter"].clone()),+ (json!(20.0), json!("allCaps"), json!(6.0))+ );+ assert!(d.b("apply") && !d.fields.contains_key("c.fontFamily"), "only what differs from [No Paragraph Style]");+ if let Some(d) = app.ui.dialog.as_mut() {+ d.fields.insert("rename".into(), json!("Recipe Categories"));+ d.fields.insert("nextStyle".into(), json!(designcraft_doc::BASIC_PARAGRAPH));+ }+ confirm(&mut app).unwrap();+ let a = app.run("type.selectionAttrs", json!({})).unwrap();+ assert_eq!(a["paragraphStyle"], "Recipe Categories", "applied to the selection");+ assert_eq!(a["paraOverrides"].as_u64().unwrap_or(0) + a["charOverrides"].as_u64().unwrap_or(0), 0);+ let style = |app: &DesignApp| app.session.doc().unwrap().doc.styles.para("Recipe Categories").cloned().unwrap();+ assert_eq!(style(&app).next_style.as_deref(), Some(designcraft_doc::BASIC_PARAGRAPH));+ assert_eq!(style(&app).chars.size, Some(20.0));+ // Reset To Base: the style keeps nothing of its own, apart from the edits made then.+ app.ui.dialog = Some(Dialog::new("paragraphStyleOptions", json!({"name": "Recipe Categories", "basedOn": designcraft_doc::BASIC_PARAGRAPH})));+ if let Some(d) = app.ui.dialog.as_mut() {+ d.fields.insert("resetToBase".into(), json!(true));+ d.fields.insert("c.tracking".into(), json!(10.0));+ }+ confirm(&mut app).unwrap();+ let s = style(&app);+ assert_eq!((s.chars.size, s.chars.tracking, s.para.space_after), (None, Some(10.0), None), "{s:?}");+ assert_eq!(s.based_on.as_deref(), Some(designcraft_doc::BASIC_PARAGRAPH));+ }++ /// A Based On changed in the dialog (without Reset To Base) is what the fields are checked+ /// against: the style's own settings over the new parent.+ #[test]+ fn a_changed_based_on_is_what_the_fields_are_checked_against() {+ let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({})).unwrap();+ app.run("style.paragraph.create", json!({"name": "Loose", "para": {"wordSpaceMin": 1.2, "wordSpaceDesired": 1.3}})).unwrap();+ app.run("style.paragraph.create", json!({"name": "Child", "basedOn": "Loose"})).unwrap();+ let mut d = Dialog::new("paragraphStyleOptions", json!({"name": "Child"}));+ d.fields.insert("p.wordSpaceDesired".into(), json!(1.0));+ assert!(check_paragraph_style_justification(&app, &d).is_err(), "below Loose's minimum");+ d.fields.insert("basedOn".into(), json!(designcraft_doc::BASIC_PARAGRAPH));+ assert_eq!(check_paragraph_style_justification(&app, &d), Ok(()), "[Basic Paragraph]'s minimum is lower");+ }++ /// With Reset To Base, the justification fields are checked against the base style (the+ /// style's own minimum no longer applies), and Preview shows the reset on the page.+ #[test]+ fn reset_to_base_checks_and_previews_against_the_base() {+ let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({})).unwrap();+ let f = app.run("frame.create", json!({"rect": [36, 36, 400, 300], "content": "text", "text": "Loose words"})).unwrap();+ app.run("text.select", json!({"story": f["story"], "anchor": 0, "focus": 5})).unwrap();+ app.run("style.paragraph.create", json!({"name": "Loose", "basedOn": designcraft_doc::BASIC_PARAGRAPH, "para": {"wordSpaceMin": 1.2, "wordSpaceDesired": 1.3}, "chars": {"size": 30}}))+ .unwrap();+ app.run("style.paragraph.apply", json!({"name": "Loose"})).unwrap();+ let mut d = Dialog::new("paragraphStyleOptions", json!({"name": "Loose"}));+ d.fields.insert("p.wordSpaceDesired".into(), json!(1.1));+ assert!(check_paragraph_style_justification(&app, &d).is_err(), "below the style's own minimum");+ d.fields.insert("resetToBase".into(), json!(true));+ assert_eq!(check_paragraph_style_justification(&app, &d), Ok(()), "the base's minimum is 100%");+ d.fields.insert("preview".into(), json!(true));+ style_options_preview(&mut app, &mut d);+ assert_eq!(d.fields[PREVIEWED]["resetToBase"], true);+ let size = app.run("type.selectionAttrs", json!({})).unwrap()["chars"]["size"].clone();+ assert_eq!(size, json!(12.0), "the page shows the style reset to its base");+ app.session.cancel_interaction();+ }diff --cc crates/ui-egui/src/i18n/ar.rsindex 0bfc582d2,8ad796288..08a0d9438--- a/crates/ui-egui/src/i18n/ar.rs+++ b/crates/ui-egui/src/i18n/ar.rs@@@ -31,7 -31,10 +31,11 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "قص"),("Copy", "نسخ"),("Paste", "لصق"),+ ("Keep In Frame", "الإبقاء داخل الإطار"),+ ("Next Style:", "النمط التالي:"),+ ("[Same style]", "[النمط نفسه]"),+ ("Reset To Base", "إعادة التعيين إلى الأساس"),+ ("Apply Style to Selection", "تطبيق النمط على التحديد"),("Restart Numbering", "إعادة الترقيم"),("Continue Numbering", "متابعة الترقيم"),("Keep Options…", "خيارات الإبقاء…"),diff --cc crates/ui-egui/src/i18n/cs.rsindex d66258419,89f05da7f..384d410ee--- a/crates/ui-egui/src/i18n/cs.rs+++ b/crates/ui-egui/src/i18n/cs.rs@@@ -32,8 -32,10 +32,12 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Vyjmout"),("Copy", "Kopírovat"),("Paste", "Vložit"),+ ("Keep In Frame", "Zachovat v rámečku"),+ ("Gap Tint:", "Odstín mezery:"),+ ("Next Style:", "Další styl:"),+ ("[Same style]", "[Stejný styl]"),+ ("Reset To Base", "Obnovit podle základu"),+ ("Apply Style to Selection", "Použít styl na výběr"),("Restart Numbering", "Začít číslování znovu"),("Continue Numbering", "Pokračovat v číslování"),("Keep Options…", "Volby zachování…"),diff --cc crates/ui-egui/src/i18n/it.rsindex 1a5818894,b99b054b1..97bb4ed7e--- a/crates/ui-egui/src/i18n/it.rs+++ b/crates/ui-egui/src/i18n/it.rs@@@ -29,7 -29,10 +29,11 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Taglia"),("Copy", "Copia"),("Paste", "Incolla"),+ ("Keep In Frame", "Mantieni nella cornice"),+ ("Next Style:", "Stile successivo:"),+ ("[Same style]", "[Stesso stile]"),+ ("Reset To Base", "Ripristina base"),+ ("Apply Style to Selection", "Applica stile alla selezione"),("Restart Numbering", "Riavvia numerazione"),("Continue Numbering", "Continua numerazione"),("Keep Options…", "Opzioni di separazione…"),diff --cc crates/ui-egui/src/i18n/ka.rsindex 87bacaf8a,8f57c3808..6f2a880ae--- a/crates/ui-egui/src/i18n/ka.rs+++ b/crates/ui-egui/src/i18n/ka.rs@@@ -32,7 -32,10 +32,11 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "ამოჭრა"),("Copy", "კოპირება"),("Paste", "ჩასმა"),+ ("Keep In Frame", "ჩარჩოში შენარჩუნება"),+ ("Next Style:", "შემდეგი სტილი:"),+ ("[Same style]", "[იგივე სტილი]"),+ ("Reset To Base", "საბაზოზე დაბრუნება"),+ ("Apply Style to Selection", "სტილის გამოყენება მონიშნულზე"),("Restart Numbering", "ნუმერაციის თავიდან დაწყება"),("Continue Numbering", "ნუმერაციის გაგრძელება"),("Keep Options…", "შენარჩუნების პარამეტრები…"),diff --cc crates/ui-egui/src/i18n/pl.rsindex 305a19980,7c1ba74e2..8bfbfb863--- a/crates/ui-egui/src/i18n/pl.rs+++ b/crates/ui-egui/src/i18n/pl.rs@@@ -30,8 -30,10 +30,12 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Wytnij"),("Copy", "Kopiuj"),("Paste", "Wklej"),+ ("Keep In Frame", "Zachowaj w ramce"),+ ("Gap Tint:", "Odcień odstępu:"),+ ("Next Style:", "Następny styl:"),+ ("[Same style]", "[Ten sam styl]"),+ ("Reset To Base", "Przywróć bazowy"),+ ("Apply Style to Selection", "Zastosuj styl do zaznaczenia"),("Restart Numbering", "Zacznij numerowanie od nowa"),("Continue Numbering", "Kontynuuj numerowanie"),("Keep Options…", "Opcje utrzymywania…"),diff --cc crates/ui-egui/src/i18n/pt_br.rsindex bd7bf0f58,db551ae70..cd1ee1ca6--- a/crates/ui-egui/src/i18n/pt_br.rs+++ b/crates/ui-egui/src/i18n/pt_br.rs@@@ -32,7 -32,10 +32,11 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Recortar"),("Copy", "Copiar"),("Paste", "Colar"),+ ("Keep In Frame", "Manter no quadro"),+ ("Next Style:", "Próximo estilo:"),+ ("[Same style]", "[Mesmo estilo]"),+ ("Reset To Base", "Redefinir para base"),+ ("Apply Style to Selection", "Aplicar estilo à seleção"),("Restart Numbering", "Reiniciar numeração"),("Continue Numbering", "Continuar numeração"),("Keep Options…", "Opções de manutenção…"),diff --cc crates/ui-egui/src/i18n/ru.rsindex 3399700b4,174afa9d9..3e24376bf--- a/crates/ui-egui/src/i18n/ru.rs+++ b/crates/ui-egui/src/i18n/ru.rs@@@ -34,8 -34,10 +34,12 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Вырезать"),("Copy", "Копировать"),("Paste", "Вставить"),+ ("Keep In Frame", "Сохранить во фрейме"),+ ("Gap Tint:", "Оттенок пробелов:"),+ ("Next Style:", "Следующий стиль:"),+ ("[Same style]", "[Тот же стиль]"),+ ("Reset To Base", "Сбросить до основы"),+ ("Apply Style to Selection", "Применить стиль к выделенному"),("Restart Numbering", "Начать нумерацию заново"),("Continue Numbering", "Продолжить нумерацию"),("Keep Options…", "Параметры удержания…"),diff --cc crates/ui-egui/src/i18n/table.rsindex 3e01872be,12c2b74b7..e606ff58f--- a/crates/ui-egui/src/i18n/table.rs+++ b/crates/ui-egui/src/i18n/table.rs@@@ -1,6 -1,18 +1,19 @@@/// English → [German, French, Spanish, Japanese, Simplified Chinese].pub(super) const TABLE: &[(&str, [&str; 5])] = &[+ ("Keep In Frame", ["Im Rahmen behalten", "Conserver dans le bloc", "Mantener en el marco", "フレーム内に保持", "保持在框架内"]),+ ("Next Style:", ["Nächstes Format:", "Style suivant :", "Estilo siguiente:", "次のスタイル :", "下一样式:"]),+ ("[Same style]", ["[Gleiches Format]", "[Même style]", "[Mismo estilo]", "[同じスタイル]", "[相同样式]"]),+ ("Reset To Base", ["Auf Basis zurücksetzen", "Rétablir la base", "Restablecer a base", "基準に戻す", "重置为基准"]),+ (+ "Apply Style to Selection",+ [+ "Format auf Auswahl anwenden",+ "Appliquer le style à la sélection",+ "Aplicar estilo a la selección",+ "選択範囲にスタイルを適用",+ "将样式应用于选区",+ ],+ ),("Character Formatting Controls",[diff --cc crates/ui-egui/src/i18n/uk.rsindex edb7b1378,a29c9ec4d..7105b3bef--- a/crates/ui-egui/src/i18n/uk.rs+++ b/crates/ui-egui/src/i18n/uk.rs@@@ -30,7 -30,10 +30,11 @@@ pub(super) const TABLE: &[(&str, &str)("Cut", "Вирізати"),("Copy", "Копіювати"),("Paste", "Вставити"),+ ("Keep In Frame", "Зберегти у фреймі"),+ ("Next Style:", "Наступний стиль:"),+ ("[Same style]", "[Той самий стиль]"),+ ("Reset To Base", "Скинути до основи"),+ ("Apply Style to Selection", "Застосувати стиль до виділеного"),("Restart Numbering", "Почати нумерацію знову"),("Continue Numbering", "Продовжити нумерацію"),("Keep Options…", "Параметри утримання…"),