From b16967e5cedd04c84be58bbb0e8279ce42940eca Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Mon, 5 Jul 2021 14:49:56 +0300 Subject: [PATCH] error w english for dynamic compounds --- get-verbs.js | 11 ++++++++++- package.json | 2 +- src/lib/add-pronouns.ts | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/get-verbs.js b/get-verbs.js index 1a02fa2..c29a2fe 100644 --- a/get-verbs.js +++ b/get-verbs.js @@ -45,8 +45,12 @@ export default verbs;`; }); function getFromTsS(entries) { - return allTsS.map(ts => { + const missingEc = []; + const toReturn = allTsS.map(ts => { const entry = entries.find(x => ts === x.ts); + if (!entry.ec) { + missingEc.push(entry.ts); + } if (!entry) { console.log("couldn't find ts", ts); return undefined; @@ -60,4 +64,9 @@ function getFromTsS(entries) { } return { entry }; }).filter(x => x); + if (missingEc.length !== 0) { + console.log("missingEc", missingEc); + } + return toReturn; + } diff --git a/package.json b/package.json index 5f04fe0..fd8ec46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lingdocs/pashto-inflector", - "version": "0.5.4", + "version": "0.5.5", "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/add-pronouns.ts b/src/lib/add-pronouns.ts index 560106b..93555e3 100644 --- a/src/lib/add-pronouns.ts +++ b/src/lib/add-pronouns.ts @@ -85,7 +85,7 @@ export default function addPronouns({ s, subject, object, info, displayForm, int } } function makeEnglish(englishBuilder: T.EnglishBuilder, englishConjugation: T.EnglishVerbConjugation): string[] { - const noObject = (intransitive || info.transitivity === "grammatically transitive"); + const noObject = (intransitive || info.transitivity === "grammatically transitive" || info.type === "dynamic compound"); const addRest = (s: string) => ( `${s}${noObject ? "" : ` ${engObj(object)}`}${englishConjugation.ep ? ` ${englishConjugation.ep}` : ""}` );