From 3aaddf6759e6865d4a9ca3dd24f1ef7d2906a9d1 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 27 Jan 2026 22:25:45 +0100 Subject: words: improve the description on verb conjugation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- crates/cli/src/words.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/words.rs b/crates/cli/src/words.rs index 1aed8e3..40f3f26 100644 --- a/crates/cli/src/words.rs +++ b/crates/cli/src/words.rs @@ -868,14 +868,25 @@ fn title_for_word(word: &Word) -> String { format!("{}; {})", s, flags) } +fn humanize_conjugation(id: isize) -> String { + match id { + 1 => "1st (ā-stems)", + 2 => "2nd (ē-stems)", + 3 => "3rd (ĕ-stems)", + 4 => "3rd (-iō variants)", + 5 => "4th (ī-stems)", + _ => panic!("bad conjugation id {id}"), + } + .to_string() +} + fn show_info(word: Word) -> Result<(), String> { // Title. println!("Word: {}", title_for_word(&word)); // Conjugation, declension + kind. - // TODO: to_human match word.conjugation_id { - Some(id) => println!("Conjugation: {}", id), + Some(id) => println!("Conjugation: {}", humanize_conjugation(id)), None => { if let Some(did) = word.declension_id { if did > 5 { -- cgit v1.2.3