From 1d28fb5599337bf1891ac8cc43b7656975d239d7 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 23 Mar 2026 20:52:55 +0100 Subject: Use english as the base language --- src/main.rs | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e40681f..1d45a42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -168,7 +168,7 @@ impl AppModel { } fn window_title(&self) -> String { - let default_name = tr!("document.untitled"); + let default_name = tr!("Untitled"); let filename = self .current_file .as_ref() @@ -177,9 +177,9 @@ impl AppModel { .unwrap_or(&default_name); if self.modified { - format!("{}* - {}", filename, tr!("application.name")) + format!("{}* - {}", filename, tr!("Map")) } else { - format!("{} - {}", filename, tr!("application.name")) + format!("{} - {}", filename, tr!("Map")) } } @@ -602,7 +602,7 @@ impl SimpleComponent for AppModel { .map(String::from) .collect::>(), ) - .comments(tr!("about.comment")) + .comments(about_comment()) .copyright("© 2026 Rubén Beltrán del Río") .license_type(gtk::License::Agpl30) .application_icon("systems.tranquil.Map") @@ -648,3 +648,67 @@ fn main() { initial_content, }); } + +fn about_comment() -> String { + tr!( + r#"Map is a wardley map editor for linux that uses a simple language to easily create and edit maps. Draw components, link dependencies, create groups, write notes, or add inertia and evolution markers, and see your map change in an instant. + +Language Reference + +The wmap language is a simple notation to create and edit wardley maps and is easy to pick up: + +Components + +Components are written as Name (x,y). The name can contain spaces, and the x and y coordinates are a whole or decimal number from 0 to 100 and represent how far from the top left corner the component will be drawn. + +By default, components will be drawn as a circle, but you can specify the shape by appending [Square], [Triangle], or [x]. Here's some examples: + +Component (1,2) +My Cool Component (10.0,21.0) +A (1, 2.0) [Square] +Rose Wall (44.3, 50.0) [x] + +Dependencies + +Dependencies connect two components, and they are written as Component A -- Component B. This will draw a simple line between them. If you want an arrow, you can use Component -> Component instead. + +Component -- My Cool Component +A -> Component + +Inertia + +You can place an inertia marker in front of a component by writing [Inertia] Component. + +[Inertia] My Cool Component +[Inertia] A + +Evolution + +Evolution arrows are notated by using [Evolution] Component +x or [Evolution] Component -x, where x is a whole or decimal number between 0 and 100. + +[Evolution] My Cool Component -10 +[Evolution] A +15 + +Notes + +Sometimes it's helpful to add some text clarifying the map. Writing [Note] (x, y) Text will create a note block right at those coordinates. Just like components, x and y are numbers between 0 and 100. You can write \n to force a line break. + +[Note] (30, 45) Here we want to call out an explanation or context. +[Note] (90, 25) We're close to the edge \n so we can multiline it. + +Groups + +You can group components together by using [Group] ComponentA, ComponentB... + +[Group] Tinker, Tailor, Soldier +[Group] Two Words, Three Words Here + +Resizing Evolution Stages + +If you need more space for one of the four stages, you can use [I] x, [II] x, or [III] x. As with other lines, x is a number between 0-100. + +[I] 15 +[II] 35.5 +[III] 80"# + ) +} -- cgit