Expand description
Subtitle translation command implementation.
This module wires CLI argument validation, configuration loading, input collection, safe output resolution, and translation engine invocation.
§Examples
ⓘ
use subx_cli::cli::TranslateArgs;
use subx_cli::commands::translate_command;
use subx_cli::config::TestConfigService;
let args = TranslateArgs {
paths: vec!["movie.srt".into()],
input_paths: vec![],
recursive: false,
target_language: Some("zh-TW".to_string()),
source_language: None,
glossary: None,
context: None,
output: None,
no_extract: false,
force: false,
replace: false,
};
let config_service = TestConfigService::with_defaults();
translate_command::execute(args, &config_service).await?;Structs§
- Translate
Execution - Resolved translate command inputs after CLI/config defaulting.
- Translate
Payload - Top-level payload for the
translatecommand JSON envelope. - Translated
File - Per-file record reported in the
translateJSON envelope.
Functions§
- execute
- Execute the
translatecommand. - execute_
with_ config - Execute the
translatecommand with an owned configuration service.