From 73aca5b5707ded54ada72c15f79849ef3f35a35c Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 2 Oct 2023 16:25:51 +0100 Subject: [PATCH] refactor: replace underscores --- frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts b/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts index 02c89c053..4e2e4bb9d 100644 --- a/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts +++ b/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts @@ -25,9 +25,10 @@ export function updateTime(sec: number, layout: string): void { } export function updateWords(words: number, layout: string): void { - let str = `${capitalizeFirstLetter(layout)} in: ${words} words`; + const layoutName = capitalizeFirstLetter(layout.replace(/_/g, " ")); + let str = `${layoutName} in: ${words} words`; if (words === 1) { - str = `${capitalizeFirstLetter(layout)} starting next word`; + str = `${layoutName} starting next word`; } $("#typingTest #layoutfluidTimer").text(str); }