error w english for dynamic compounds

This commit is contained in:
lingdocs 2021-07-05 14:49:56 +03:00
parent b6d2098028
commit b16967e5ce
3 changed files with 12 additions and 3 deletions

View File

@ -45,8 +45,12 @@ export default verbs;`;
}); });
function getFromTsS(entries) { function getFromTsS(entries) {
return allTsS.map(ts => { const missingEc = [];
const toReturn = allTsS.map(ts => {
const entry = entries.find(x => ts === x.ts); const entry = entries.find(x => ts === x.ts);
if (!entry.ec) {
missingEc.push(entry.ts);
}
if (!entry) { if (!entry) {
console.log("couldn't find ts", ts); console.log("couldn't find ts", ts);
return undefined; return undefined;
@ -60,4 +64,9 @@ function getFromTsS(entries) {
} }
return { entry }; return { entry };
}).filter(x => x); }).filter(x => x);
if (missingEc.length !== 0) {
console.log("missingEc", missingEc);
}
return toReturn;
} }

View File

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

View File

@ -85,7 +85,7 @@ export default function addPronouns({ s, subject, object, info, displayForm, int
} }
} }
function makeEnglish(englishBuilder: T.EnglishBuilder, englishConjugation: T.EnglishVerbConjugation): string[] { 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) => ( const addRest = (s: string) => (
`${s}${noObject ? "" : ` ${engObj(object)}`}${englishConjugation.ep ? ` ${englishConjugation.ep}` : ""}` `${s}${noObject ? "" : ` ${engObj(object)}`}${englishConjugation.ep ? ` ${englishConjugation.ep}` : ""}`
); );