From 8076acf3339429a10dcae6994495fc6b982c8bb7 Mon Sep 17 00:00:00 2001 From: Miodec Date: Thu, 22 Feb 2024 23:14:13 +0100 Subject: [PATCH] impr(typing): always allow lazy mode when in custom mode, no matter the current language selection closes #5071 --- frontend/src/ts/test/test-logic.ts | 3 ++- frontend/src/ts/test/words-generator.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 629f1eec8..cfba51c40 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -471,7 +471,8 @@ export async function init(): Promise { UpdateConfig.setTapeMode("off"); } - if (Config.lazyMode && language.noLazyMode) { + const allowLazyMode = !language.noLazyMode || Config.mode === "custom"; + if (Config.lazyMode && !allowLazyMode) { rememberLazyMode = true; Notifications.add("This language does not support lazy mode.", 0, { important: true, diff --git a/frontend/src/ts/test/words-generator.ts b/frontend/src/ts/test/words-generator.ts index a79aeb08a..7ea035327 100644 --- a/frontend/src/ts/test/words-generator.ts +++ b/frontend/src/ts/test/words-generator.ts @@ -338,7 +338,8 @@ function applyLazyModeToWord( word: string, language: MonkeyTypes.LanguageObject ): string { - if (Config.lazyMode && !language.noLazyMode) { + const allowLazyMode = !language.noLazyMode || Config.mode === "custom"; + if (Config.lazyMode && allowLazyMode) { word = LazyMode.replaceAccents(word, language.additionalAccents); } return word;