From ac88082d4e40cf83acb68006a4cb6753cc3c9432 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Thu, 23 Jun 2022 14:48:42 -0500 Subject: [PATCH] fixed grammaticallyTransitive rendering --- package.json | 2 +- src/lib/phrase-building/compile.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b0c8b57..b4b1639 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/lib/phrase-building/compile.ts b/src/lib/phrase-building/compile.ts index c45ac21..da0630a 100644 --- a/src/lib/phrase-building/compile.ts +++ b/src/lib/phrase-building/compile.ts @@ -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 {