fixed grammaticallyTransitive rendering

This commit is contained in:
lingdocs 2022-06-23 14:48:42 -05:00
parent 56ade06a30
commit ac88082d4e
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "3.0.7",
"version": "3.0.8",
"author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com",

View File

@ -263,12 +263,12 @@ function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
const obj = getObjectSelectionFromBlocks(VP.blocks).selection;
const engObj = typeof obj === "object"
? obj
: obj === "none"
: (obj === "none" || obj === T.Person.ThirdPlurMale)
? ""
: undefined;
const engAPs = getEngAPs(VP.blocks);
// require all English parts for making the English phrase
return (VP.englishBase && engSubj && engObj !== undefined)
const b = (VP.englishBase && engSubj && engObj !== undefined)
? VP.englishBase.map(e => insertEWords(e, {
// TODO: make sure we actually have the english
subject: getEnglishFromRendered(engSubj) || "",
@ -276,6 +276,7 @@ function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
APs: engAPs,
})).map(capitalizeFirstLetter)
: undefined;
return b;
}
function compileEnglishEP(EP: T.EPRendered): string[] | undefined {