From 11acc909f5c47bf669d1a992f11437018e467638 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 29 Jan 2026 22:50:09 +0100 Subject: words: allow the creation of indeclinable nouns 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 | 6 ++++++ lib/mihi/src/word.rs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/crates/cli/src/words.rs b/crates/cli/src/words.rs index 83e2b5a..3789076 100644 --- a/crates/cli/src/words.rs +++ b/crates/cli/src/words.rs @@ -218,6 +218,7 @@ fn prompt_declension(cat: &Category, declension: Declension) -> Result Result ], Some(Declension::Fourth) => vec!["fus"], Some(Declension::Fifth) => vec!["ies", "es"], + // NOTE: for the 'other' declension we only allow to enter + // 'indeclinable' words, as that's the only thing that can be + // added from now on (e.g. things like 'ego' have been manually + // inserted). + Some(Declension::Other) => vec!["indeclinable"], _ => panic!("shouldn't be here :D"), }; if options.len() == 1 { diff --git a/lib/mihi/src/word.rs b/lib/mihi/src/word.rs index b12609b..750562f 100644 --- a/lib/mihi/src/word.rs +++ b/lib/mihi/src/word.rs @@ -198,6 +198,8 @@ pub enum Declension { Third, Fourth, Fifth, + + // Used for highly irregular words (e.g. 'īnstar'). Other, } -- cgit v1.2.3