Skip to content

Commit

Permalink
fix: imperative mood in lj/nj verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Jun 17, 2024
1 parent 2b822b9 commit 01642e2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/verb/conjugationVerb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ function buildConditional(lpa: string, refl: string): string[] {
function build_imperative(pref: string, ps: string, refl: string): string {
let p2s = '';
const i = ps.length - 1;
const last = ps[i];
const penultimate = ps[i - 1];

if (ps == 'jes') {
p2s = 'bųď';
Expand All @@ -674,15 +676,14 @@ function build_imperative(pref: string, ps: string, refl: string): string {
p2s = pref + ps + 'j';
} else if (ps in irregular_stems) {
p2s = pref + ps + 'ď';
} else if (ps.charAt(i) == 'ĵ' || ps.charAt(i) == 'j') {
p2s = pref + ps;
} else if (
ps.charAt(i) == 'a' ||
ps.charAt(i) == 'e' ||
ps.charAt(i) == 'ě'
(last == 'ĵ' || last == 'j') &&
!(penultimate === 'l' || penultimate === 'n')
) {
p2s = pref + ps;
} else if (last == 'a' || last == 'e' || last == 'ě') {
p2s = pref + ps + 'j';
} else if (ps.charAt(i) == 'i') {
} else if (last == 'i') {
p2s = pref + ps;
} else {
p2s = pref + ps + 'i';
Expand Down

0 comments on commit 01642e2

Please sign in to comment.