Skip to content

Commit 4159c69

Browse files
committed
improve verb construction
1 parent ff8f60a commit 4159c69

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/translator/phrase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export function phraseAsVerb(
283283
adverb: [],
284284
presentPlural: "are",
285285
presentSingular: "is",
286-
past: "was",
286+
past: "were",
287287
wordEmphasis: false,
288288
reduplicationCount: 1,
289289
subjectComplement,

src/translator/verb.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,22 @@ export function fromVerbForms(
106106
} else {
107107
presentSingular = verbForms.presentSingular;
108108
}
109-
let present: string;
110-
if (quantity === "singular") {
111-
present = presentSingular;
109+
let pastPlural: string;
110+
let pastSingular: string;
111+
if (is) {
112+
pastPlural = "were";
113+
pastSingular = "was";
112114
} else {
115+
pastPlural = pastSingular = verbForms.past;
116+
}
117+
let past: string;
118+
let present: string;
119+
if (quantity !== "singular" || (!is && perspective !== "third")) {
120+
past = pastPlural;
113121
present = verbForms.presentPlural;
122+
} else {
123+
past = pastSingular;
124+
present = presentSingular;
114125
}
115126
let verb: Output<{ modal: null | string; infinite: string }>;
116127
switch (settings.tense) {
@@ -120,18 +131,18 @@ export function fromVerbForms(
120131
verb = new Output([{
121132
modal: null,
122133
infinite:
123-
`${presentSingular}/${verbForms.presentPlural}/${verbForms.past}/will be`,
134+
`${presentSingular}/${verbForms.presentPlural}/${pastSingular}/${pastPlural}/will be`,
124135
}]);
125136
} else {
126137
verb = new Output([{
127138
modal: null,
128-
infinite: `${present}/${verbForms.past}/will be`,
139+
infinite: `${present}/${past}/will be`,
129140
}]);
130141
}
131142
} else {
132143
verb = new Output([{
133144
modal: "(will)",
134-
infinite: condenseVerb(present, verbForms.past),
145+
infinite: condenseVerb(present, past),
135146
}]);
136147
}
137148
break;
@@ -144,7 +155,7 @@ export function fromVerbForms(
144155
}
145156
verb = new Output([
146157
{ modal: null, infinite: present },
147-
{ modal: null, infinite: verbForms.past },
158+
{ modal: null, infinite: past },
148159
{ modal: "will", infinite: future },
149160
]);
150161
break;

0 commit comments

Comments
 (0)