aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-03-23 20:52:55 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-04-05 00:31:21 +0200
commit1d28fb5599337bf1891ac8cc43b7656975d239d7 (patch)
treee75bcfaed71d668c87afa65ca524d1a0338a0ce1 /src/main.rs
parentef32d65ac1852da581ac75d20f903dbcb2d0b5cd (diff)
Use english as the base language
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs72
1 files changed, 68 insertions, 4 deletions
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::<Vec<_>>(),
)
- .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 <a href="https://medium.com/wardleymaps">wardley map</a> 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.
+
+<big><b>Language Reference</b></big>
+
+The wmap language is a simple notation to create and edit wardley maps and is easy to pick up:
+
+<b>Components</b>
+
+Components are written as <tt>Name (x,y)</tt>. 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 <tt>[Square]</tt>, <tt>[Triangle]</tt>, or <tt>[x]</tt>. Here's some examples:
+
+<tt>Component (1,2)</tt>
+<tt>My Cool Component (10.0,21.0)</tt>
+<tt>A (1, 2.0) [Square]</tt>
+<tt>Rose Wall (44.3, 50.0) [x]</tt>
+
+<b>Dependencies</b>
+
+Dependencies connect two components, and they are written as <tt>Component A -- Component B</tt>. This will draw a simple line between them. If you want an arrow, you can use <tt>Component -&gt; Component</tt> instead.
+
+<tt>Component -- My Cool Component</tt>
+<tt>A -> Component</tt>
+
+<b>Inertia</b>
+
+You can place an inertia marker in front of a component by writing <tt>[Inertia] Component</tt>.
+
+<tt>[Inertia] My Cool Component</tt>
+<tt>[Inertia] A</tt>
+
+<b>Evolution</b>
+
+Evolution arrows are notated by using <tt>[Evolution] Component +x</tt> or <tt>[Evolution] Component -x</tt>, where x is a whole or decimal number between 0 and 100.
+
+<tt>[Evolution] My Cool Component -10</tt>
+<tt>[Evolution] A +15</tt>
+
+<b>Notes</b>
+
+Sometimes it's helpful to add some text clarifying the map. Writing <tt>[Note] (x, y) Text</tt> 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.
+
+<tt>[Note] (30, 45) Here we want to call out an explanation or context.</tt>
+<tt>[Note] (90, 25) We're close to the edge \n so we can multiline it.</tt>
+
+<b>Groups</b>
+
+You can group components together by using <tt>[Group] ComponentA, ComponentB...</tt>
+
+<tt>[Group] Tinker, Tailor, Soldier</tt>
+<tt>[Group] Two Words, Three Words Here</tt>
+
+<b>Resizing Evolution Stages</b>
+
+If you need more space for one of the four stages, you can use <b>[I] x</b>, <b>[II] x</b>, or <b>[III] x</b>. As with other lines, x is a number between 0-100.
+
+<tt>[I] 15</tt>
+<tt>[II] 35.5</tt>
+<tt>[III] 80</tt>"#
+ )
+}