diff --git a/src/main.rs b/src/main.rs index 7200b4b..8afa8d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,10 +28,10 @@ use crate::events::{handle_event, poll_event}; #[derive(Parser, Debug)] #[command(name = "lines")] -#[command(about = "TUI pro rychlé spouštění často používaných příkazů")] +#[command(about = "TUI for running frequently used commands")] #[command(version)] struct Args { - /// Cesta k datové složce (výchozí: ~/.lines) + /// Path to the data directory (default: ~/.lines) #[arg(short, long)] dir: Option, } @@ -43,7 +43,7 @@ fn main() -> io::Result<()> { // Ensure data directory exists if let Err(e) = std::fs::create_dir_all(&config.data_dir) { eprintln!( - "Nepodařilo se vytvořit datovou složku {}: {}", + "Failed to create data directory {}: {}", config.data_dir.display(), e ); diff --git a/src/parser.rs b/src/parser.rs index 7d3735a..8b9e82c 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -157,10 +157,10 @@ mod tests { #[test] fn test_parse_markdown_run_all() { - let input = "# Spustí vše\n\n# Docker update\nssh root@192.168.53.3 /opt/mealie/update.sh\nssh root@192.168.53.5 /opt/yamtrack/update.sh\n"; + let input = "# Run all\n\n# Docker update\nssh admin@host1.example.com /opt/app/update.sh\nssh admin@host2.example.com /opt/app/update.sh\n"; let sections = parse_markdown(input); assert_eq!(sections.len(), 2); - assert_eq!(sections[0].title, "Spustí vše"); + assert_eq!(sections[0].title, "Run all"); assert!(sections[0].commands.is_empty()); assert_eq!(sections[1].commands.len(), 2); } diff --git a/src/ui.rs b/src/ui.rs index 777eb3d..9b4c3d1 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -54,7 +54,7 @@ fn draw_groups(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { .collect(); let block = Block::default() - .title(" Skupiny ") + .title(" Groups ") .borders(Borders::ALL) .border_style(border_style(app.focus == Focus::Groups)); @@ -81,7 +81,7 @@ fn draw_files(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { .collect(); let block = Block::default() - .title(" Soubory ") + .title(" Files ") .borders(Borders::ALL) .border_style(border_style(app.focus == Focus::Files)); @@ -96,7 +96,7 @@ fn draw_sections(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { .enumerate() .map(|(i, section)| { let label = if section.is_run_all() { - format!("{} (vše)", section.title) + format!("{} (all)", section.title) } else { section.title.clone() }; @@ -113,7 +113,7 @@ fn draw_sections(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { .collect(); let block = Block::default() - .title(" Příkazy ") + .title(" Commands ") .borders(Borders::ALL) .border_style(border_style(app.focus == Focus::Sections)); @@ -125,7 +125,7 @@ fn draw_preview(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { let text = match app.current_section() { Some(section) => { let title = if section.is_run_all() { - format!("{} — spustí všechny příkazy v souboru", section.title) + format!("{} — runs all commands in this file", section.title) } else { section.title.clone() }; @@ -161,11 +161,11 @@ fn draw_preview(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { Text::from(lines) } - None => Text::from("Žádný příkaz k zobrazení."), + None => Text::from("No command to display."), }; let block = Block::default() - .title(" Náhled ") + .title(" Preview ") .borders(Borders::ALL); let paragraph = Paragraph::new(text).block(block).wrap(Wrap { trim: true }); @@ -173,7 +173,7 @@ fn draw_preview(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { } fn draw_status(f: &mut Frame, app: &App, area: ratatui::layout::Rect) { - let help = "↑/↓ nebo j/k: pohyb | →/←: panel | Enter: spustit | e: editovat | r: reload | q: konec"; + let help = "↑/↓ or j/k: move | →/← or h/l: panel | Enter: run | o: open in new window | e: edit | r: reload | q: quit"; let text = match &app.message { Some(msg) => Text::from(msg.as_str()), None => Text::from(help),