aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Commands
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 09:14:56 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-07 09:14:56 +0200
commit933078c10e99002c8a5f647e476819f0f1706a14 (patch)
tree664f1f0f8f7651bf2f65e81290b6781b335fde4a /Map/Presentation/Commands
parentf4edef273e4501a28cac7cb43fa7ad6f224fcb4a (diff)
Adjust spacing and add more translation keys
Diffstat (limited to 'Map/Presentation/Commands')
-rw-r--r--Map/Presentation/Commands/MapCommands.swift18
1 files changed, 10 insertions, 8 deletions
diff --git a/Map/Presentation/Commands/MapCommands.swift b/Map/Presentation/Commands/MapCommands.swift
index e7ee8f8..bd0227d 100644
--- a/Map/Presentation/Commands/MapCommands.swift
+++ b/Map/Presentation/Commands/MapCommands.swift
@@ -42,7 +42,7 @@ struct MapCommands: Commands {
CommandGroup(after: CommandGroupPlacement.newItem) {
Menu(String(localized: "commands.file.new_from_template")) {
if templates.isEmpty {
- Text("No templates available")
+ Text("commands.file.new_from_template.empty")
.disabled(true)
} else {
ForEach(templates) { template in
@@ -56,7 +56,7 @@ struct MapCommands: Commands {
CommandGroup(after: CommandGroupPlacement.saveItem) {
Divider()
- Button("Export...") {
+ Button("commands.file.export") {
if let selectedEvolution, let document {
if let image = document.exportAsImage(withEvolution: selectedEvolution) {
@@ -93,7 +93,7 @@ struct MapCommands: Commands {
CommandGroup(after: CommandGroupPlacement.pasteboard) {
Divider()
- Button("Find...") {
+ Button("commands.edit.find") {
isSearching = isSearching != nil ? !isSearching! : true
}.keyboardShortcut(
"f", modifiers: EventModifiers([.command])
@@ -104,25 +104,25 @@ struct MapCommands: Commands {
CommandGroup(after: CommandGroupPlacement.toolbar) {
if viewStyle == .horizontal {
- Button("Use Vertical Layout") {
+ Button("commands.view.layout.vertical") {
viewStyle = .vertical
}.keyboardShortcut(
"l", modifiers: EventModifiers([.command])
).disabled(document == nil)
} else {
- Button("Use Horizontal Layout") {
+ Button("commands.view.layout.horizontal") {
viewStyle = .horizontal
}.keyboardShortcut(
"l", modifiers: EventModifiers([.command])
).disabled(document == nil)
}
Divider()
- Button("Zoom In") {
+ Button("commands.view.zoom_in") {
zoom = min(Constants.kMaxZoom, zoom + 0.1)
}.keyboardShortcut(
"+", modifiers: EventModifiers([.command])
).disabled(document == nil)
- Button("Zoom Out") {
+ Button("commands.view.zoom_out") {
zoom = max(Constants.kMinZoom, zoom - 0.1)
}.keyboardShortcut(
"-", modifiers: EventModifiers([.command])
@@ -131,7 +131,9 @@ struct MapCommands: Commands {
}
CommandGroup(replacing: CommandGroupPlacement.help) {
- Button("Map Help") { NSWorkspace.shared.open(URL(string: "https://map.tranquil.systems")!) }
+ Button("commands.help.help") {
+ NSWorkspace.shared.open(URL(string: "https://map.tranquil.systems")!)
+ }
}
}