BUGFIX: Wrong plural form in modal of coding contract (#1939)

This commit is contained in:
catloversg
2025-02-02 12:42:56 +07:00
committed by GitHub
parent 1cc0288cd8
commit 67aff2a6a0
9 changed files with 37 additions and 20 deletions
+4 -1
View File
@@ -7,6 +7,7 @@ import { GetAllServers } from "../../Server/AllServers";
import { resolveTextFilePath } from "../../Paths/TextFilePath";
import { dialogBoxCreate as dialogBoxCreateOriginal } from "../../ui/React/DialogBox";
import { Terminal } from "../../Terminal";
import { pluralize } from "../I18nUtils";
// Temporary until fixing alerts manager to store alerts outside of react scope
const dialogBoxCreate = (text: string) => setTimeout(() => dialogBoxCreateOriginal(text), 2000);
@@ -64,7 +65,9 @@ export function showAPIBreaks(version: string, ...breakInfos: APIBreakInfo[]) {
[...scriptImpactMap]
.map(
([filename, lineNumbers]) =>
`${filename}: (Line number${lineNumbers.length > 1 ? "s" : ""}: ${lineNumbers.join(", ")})`,
`${filename}: (${pluralize(lineNumbers.length, "Line number", undefined, true)}: ${lineNumbers.join(
", ",
)})`,
)
.join("\n"),
)