sooo
This commit is contained in:
parent
533ac8bd8b
commit
b591379a59
File diff suppressed because it is too large
Load Diff
|
@ -131,10 +131,9 @@ function makePronoun(sub: T.Person): T.PsString[] {
|
||||||
function makeUnisexNoun(e: UnisexNounInput, subjPerson: T.Person | undefined): T.PsString[] {
|
function makeUnisexNoun(e: UnisexNounInput, subjPerson: T.Person | undefined): T.PsString[] {
|
||||||
// reuse english from make noun - do the a / an sensitivity
|
// reuse english from make noun - do the a / an sensitivity
|
||||||
// if it's the predicate - get the inflection according to the subjPerson
|
// if it's the predicate - get the inflection according to the subjPerson
|
||||||
const isPredicate = subjPerson !== undefined;
|
if (subjPerson !== undefined) {
|
||||||
if (isPredicate) {
|
|
||||||
const inf = inflectWord(e);
|
const inf = inflectWord(e);
|
||||||
const english = getEnglishFromNoun(e, personIsPlural(subjPerson || 0), "predicate");
|
const english = getEnglishFromNoun(e, personIsPlural(subjPerson), "predicate");
|
||||||
if (!inf) {
|
if (!inf) {
|
||||||
return [psStringFromEntry(e, english)];
|
return [psStringFromEntry(e, english)];
|
||||||
}
|
}
|
||||||
|
@ -143,9 +142,9 @@ function makeUnisexNoun(e: UnisexNounInput, subjPerson: T.Person | undefined): T
|
||||||
}
|
}
|
||||||
// if plural // anim // chose that
|
// if plural // anim // chose that
|
||||||
// otherwise just chose inflection (or add both)
|
// otherwise just chose inflection (or add both)
|
||||||
const pashto = ((): T.ArrayOneOrMore<T.PsString> => { // needed for older version of typescript
|
const pashto = ((): T.ArrayOneOrMore<T.PsString> => {
|
||||||
if ("plural" in inf && inf.plural !== undefined && personIsPlural(subjPerson || 0)) {
|
if ("plural" in inf && inf.plural !== undefined && personIsPlural(subjPerson)) {
|
||||||
const gender = personGender(subjPerson || 0);
|
const gender = personGender(subjPerson);
|
||||||
if (gender === "masc" && "masc" in inf.plural) {
|
if (gender === "masc" && "masc" in inf.plural) {
|
||||||
return inf.plural.masc[0];
|
return inf.plural.masc[0];
|
||||||
}
|
}
|
||||||
|
@ -155,7 +154,7 @@ function makeUnisexNoun(e: UnisexNounInput, subjPerson: T.Person | undefined): T
|
||||||
throw new Error("gender not available for plural");
|
throw new Error("gender not available for plural");
|
||||||
}
|
}
|
||||||
if (isUnisexSet(inf.inflections)) {
|
if (isUnisexSet(inf.inflections)) {
|
||||||
return chooseInflection(inf.inflections, subjPerson || 0);
|
return chooseInflection(inf.inflections, subjPerson);
|
||||||
} else {
|
} else {
|
||||||
return [psStringFromEntry(e, english)];
|
return [psStringFromEntry(e, english)];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue