diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-01-27 22:25:45 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-01-27 22:25:45 +0100 |
| commit | 3aaddf6759e6865d4a9ca3dd24f1ef7d2906a9d1 (patch) | |
| tree | f7704a997e56871d0bdbed261eea964ff4770d61 /crates | |
| parent | 3185a44bb531023a1329402ee5f9c0b66133ab32 (diff) | |
| download | mihi-3aaddf6759e6865d4a9ca3dd24f1ef7d2906a9d1.tar.gz mihi-3aaddf6759e6865d4a9ca3dd24f1ef7d2906a9d1.zip | |
words: improve the description on verb conjugation
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/cli/src/words.rs | 15 |
1 files 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 { |
