diff --git a/src/components/np-picker/PronounPicker.tsx b/src/components/np-picker/PronounPicker.tsx index 3ca9dd8..eec0183 100644 --- a/src/components/np-picker/PronounPicker.tsx +++ b/src/components/np-picker/PronounPicker.tsx @@ -21,9 +21,9 @@ const labels = { [{ masc: "He/It", fem: "She/It"}, "They"], ], eObject: [ - ["I", "Us"], - ["You", "You pl."], - [{ masc: "Him/It", fem: "Her/It"}, "Them"], + ["I", "us"], + ["you", "you (pl.)"], + [{ masc: "him/it", fem: "her/it"}, "them"], ], p: { far: [ diff --git a/src/content/index.ts b/src/content/index.ts index 7610435..2fa1450 100644 --- a/src/content/index.ts +++ b/src/content/index.ts @@ -84,7 +84,7 @@ import * as games from "!babel-loader!@lingdocs/mdx-loader!./games.mdx"; // @ts-ignore import * as pronounPicker from "!babel-loader!@lingdocs/mdx-loader!./practice-tools/pronoun-picker.mdx"; // @ts-ignore -import * as phraseBuilder from "!babel-loader!@lingdocs/mdx-loader!./practice-tools/phrase-builder.mdx"; +// import * as phraseBuilder from "!babel-loader!@lingdocs/mdx-loader!./practice-tools/phrase-builder.mdx"; const contentTree = [ { @@ -271,10 +271,10 @@ const contentTree = [ import: pronounPicker, slug: "pronoun-picker", }, - { - import: phraseBuilder, - slug: "phrase-builder", - }, + // { + // import: phraseBuilder, + // slug: "phrase-builder", + // }, ], }, ]; diff --git a/src/lib/np-tools.ts b/src/lib/np-tools.ts index 7ce1c0b..8409dbc 100644 --- a/src/lib/np-tools.ts +++ b/src/lib/np-tools.ts @@ -24,15 +24,23 @@ export function randomPerson(p?: T.Person) { } function isInvalidSubjObjCombo(subj: T.Person, obj: T.Person): boolean { - // subject is first person - if ([0, 1, 6, 7].includes(subj)) { - return [0, 1, 6, 7].includes(obj); - } - // subject is second person - if ([2, 3, 8, 9].includes(subj)) { - return [2, 3, 8, 9].includes(obj); - } - return false; + const firstPeople = [ + T.Person.FirstSingMale, + T.Person.FirstSingFemale, + T.Person.FirstPlurMale, + T.Person.FirstPlurFemale, + ]; + const secondPeople = [ + T.Person.SecondSingMale, + T.Person.SecondSingFemale, + T.Person.SecondPlurMale, + T.Person.SecondPlurFemale, + ]; + return ( + (firstPeople.includes(subj) && firstPeople.includes(obj)) + || + (secondPeople.includes(subj) && secondPeople.includes(obj)) + ); } export function randomSubjObj(old?: { subj: T.Person, obj: T.Person }): { subj: T.Person, obj: T.Person } {