aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-01-29 22:50:09 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-01-29 22:50:09 +0100
commit11acc909f5c47bf669d1a992f11437018e467638 (patch)
treeca2d5b88d7cff6cfa7312775b10d3bd89ed80cf8 /crates
parentde2a86a984ec63958e48056894f91cd23815d308 (diff)
downloadmihi-11acc909f5c47bf669d1a992f11437018e467638.tar.gz
mihi-11acc909f5c47bf669d1a992f11437018e467638.zip
words: allow the creation of indeclinable nouns
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/cli/src/words.rs6
1 files changed, 6 insertions, 0 deletions
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<Declensio
Declension::Third,
Declension::Fourth,
Declension::Fifth,
+ Declension::Other,
];
idx = declension as usize - 1;
}
@@ -355,6 +356,11 @@ fn ask_for_word_based_on(enunciated: String, word: Word) -> Result<Word, String>
],
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 {