From 6cb2d5dbc541cd690c2739c5be2fbacd627d4854 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 19 Feb 2022 09:08:56 +0400 Subject: [PATCH] updated equative explorer --- src/components/equative-explorer/explorer-selectors.tsx | 3 ++- src/components/equative-explorer/testme.nnb | 0 src/lib/equative-machine.ts | 2 +- src/types/gramm-types.d.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/components/equative-explorer/testme.nnb diff --git a/src/components/equative-explorer/explorer-selectors.tsx b/src/components/equative-explorer/explorer-selectors.tsx index 869d5dc..7237f2c 100644 --- a/src/components/equative-explorer/explorer-selectors.tsx +++ b/src/components/equative-explorer/explorer-selectors.tsx @@ -189,7 +189,8 @@ export function TenseSelector({ state, dispatch }: { }) { const options: { value: EquativeTense, label: string }[] = [ { value: "present", label: "Present" }, - { value: "subjunctive", label: "Habitual / Subjunctive" }, + { value: "habitual", label: "Habitual" }, + { value: "subjunctive", label: "Subjunctive" }, { value: "past", label: "Past" }, { value: "future", label: "Future" }, { value: "wouldBe", label: '"Would Be"' }, diff --git a/src/components/equative-explorer/testme.nnb b/src/components/equative-explorer/testme.nnb new file mode 100644 index 0000000..e69de29 diff --git a/src/lib/equative-machine.ts b/src/lib/equative-machine.ts index 071e2ca..cc326c0 100644 --- a/src/lib/equative-machine.ts +++ b/src/lib/equative-machine.ts @@ -73,7 +73,7 @@ export function assembleEquativeOutput(o: EquativeClauseOutput): T.SingleOrLengt function makeEquative(e: EquativeClause) { function getEngEq(row: number, col: number): string[] { - const t = grammarUnits.englishEquative[e.tense === "subjunctive" ? "present" : e.tense]; + const t = grammarUnits.englishEquative[(e.tense === "subjunctive" || e.tense === "habitual") ? "present" : e.tense]; return typeof t === "string" ? [t] : [t[row][col]]; diff --git a/src/types/gramm-types.d.ts b/src/types/gramm-types.d.ts index 23f3a1b..24e4e4d 100644 --- a/src/types/gramm-types.d.ts +++ b/src/types/gramm-types.d.ts @@ -1,4 +1,4 @@ -type EquativeTense = "present" | "subjunctive" | "past" | "future" | "wouldBe" | "pastSubjunctive"; +type EquativeTense = "present" | "subjunctive" | "habitual" | "past" | "future" | "wouldBe" | "pastSubjunctive"; type NounNumber = "singular" | "plural"; type EquativeClause = {