diff options
Diffstat (limited to 'Map/Presentation/Commands/MapCommands.swift')
| -rw-r--r-- | Map/Presentation/Commands/MapCommands.swift | 18 |
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")!) + } } } |