File tree 4 files changed +9
-1
lines changed
4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 125
125
Allow X ala X partial parsing</ label >
126
126
< label > < input type ="checkbox " id ="separate-repeated-modifiers " />
127
127
Allow separate repeated modifiers</ label >
128
+ < label > < input type ="checkbox " id ="hardcoded-anu-la " checked />
129
+ Use hardcoded "anu la" translation</ label >
128
130
</ details >
129
131
< div >
130
132
< button id ="reset-button "> Reset to default</ button >
Original file line number Diff line number Diff line change @@ -233,6 +233,9 @@ export const PREPOSITION_RULE: ReadonlyArray<(phrase: Preposition) => boolean> =
233
233
export const CONTEXT_CLAUSE_RULE : ReadonlyArray <
234
234
( contextClause : ContextClause ) => boolean
235
235
> = [
236
+ // Only allow "anu la" when allowed by the settings
237
+ ( clause ) => clause . type !== "anu" || settings . hardcodedAnuLa ,
238
+
236
239
// Prevent "anu ala anu la"
237
240
( clause ) =>
238
241
clause . type !== "anu" || clause . anu . type !== "x ala x" ||
Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ export type Settings = {
9
9
tense : RedundancySettings ;
10
10
xAlaXPartialParsing : boolean ;
11
11
separateRepeatedModifiers : boolean ;
12
+ hardcodedAnuLa : boolean ;
12
13
} ;
13
- // the default value may change
14
+ // the default value may change, also change `index.html`
14
15
export const defaultSettings : Readonly < Settings > = Object . freeze ( {
15
16
teloMisikeke : true ,
16
17
randomize : false ,
@@ -19,6 +20,7 @@ export const defaultSettings: Readonly<Settings> = Object.freeze({
19
20
tense : "both" ,
20
21
xAlaXPartialParsing : false ,
21
22
separateRepeatedModifiers : false ,
23
+ hardcodedAnuLa : true ,
22
24
} ) ;
23
25
// This global constant is mutable
24
26
export const settings : Settings = Object . seal ( { ...defaultSettings } ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ const UPDATERS: Readonly<{ [K in keyof Settings]: Updater<Settings[K]> }> = {
51
51
tense : REDUNDANCY_UPDATER ,
52
52
xAlaXPartialParsing : BOOL_UPDATER ,
53
53
separateRepeatedModifiers : BOOL_UPDATER ,
54
+ hardcodedAnuLa : BOOL_UPDATER ,
54
55
} ;
55
56
const KEYS = Object . keys ( UPDATERS ) as ReadonlyArray < keyof Settings > ;
56
57
You can’t perform that action at this time.
0 commit comments