This commit is contained in:
lingdocs 2022-05-31 19:18:25 -05:00
parent 3b36000a4b
commit c250539249
2 changed files with 1 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "2.7.1", "version": "2.7.2",
"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

@ -379,7 +379,6 @@ function addSpacesBetweenSegments(segments: Segment[]): (Segment | " " | "" | T.
} }
function compileEnglishVP(VP: T.VPRendered): string[] | undefined { function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
console.log("will compile english VP");
function insertEWords(e: string, { subject, object, APs }: { subject: string, object?: string, APs: string }): string { function insertEWords(e: string, { subject, object, APs }: { subject: string, object?: string, APs: string }): string {
return e.replace("$SUBJ", subject).replace("$OBJ", object || "") + APs; return e.replace("$SUBJ", subject).replace("$OBJ", object || "") + APs;
} }
@ -391,7 +390,6 @@ function compileEnglishVP(VP: T.VPRendered): string[] | undefined {
? "" ? ""
: undefined; : undefined;
const engAPs = getEnglishAPs(VP.blocks); const engAPs = getEnglishAPs(VP.blocks);
console.log({ base: VP.englishBase, obj, engSubj, engObj })
// require all English parts for making the English phrase // require all English parts for making the English phrase
return (VP.englishBase && engSubj && engObj !== undefined) return (VP.englishBase && engSubj && engObj !== undefined)
? VP.englishBase.map(e => insertEWords(e, { ? VP.englishBase.map(e => insertEWords(e, {