diff --git a/resources/lang/en.json b/resources/lang/en.json index 41e04b5d54..5425260b5d 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -1180,6 +1180,13 @@ "teams_of": "{teamCount} teams of {playersPerTeam}", "teams_title": "Teams" }, + "multi_tab": { + "detected": "Multiple open game tabs detected.", + "explanation": "To ensure fair play, only one active game tab is permitted at a time.", + "please_wait": "Please wait", + "seconds": "seconds", + "warning": "Vigilant Mode Warning" + }, "new_lobby_prompt": { "confirm": "Start a new lobby? All players will be invited to join.", "dismiss": "Dismiss", diff --git a/tests/client/MultiTabModal.test.ts b/tests/client/MultiTabModal.test.ts new file mode 100644 index 0000000000..220972be6d --- /dev/null +++ b/tests/client/MultiTabModal.test.ts @@ -0,0 +1,26 @@ +import fs from "fs"; +import path from "path"; +import { describe, expect, it } from "vitest"; + +const EN_JSON = path.join( + __dirname, + "..", + "..", + "resources", + "lang", + "en.json", +); + +describe("multi_tab translations", () => { + it("includes all multi_tab modal translation keys in en.json", () => { + const en = JSON.parse(fs.readFileSync(EN_JSON, "utf8")); + expect(en.multi_tab).toBeDefined(); + expect(en.multi_tab.warning).toBe("Vigilant Mode Warning"); + expect(en.multi_tab.detected).toBe("Multiple open game tabs detected."); + expect(en.multi_tab.please_wait).toBe("Please wait"); + expect(en.multi_tab.seconds).toBe("seconds"); + expect(en.multi_tab.explanation).toBe( + "To ensure fair play, only one active game tab is permitted at a time.", + ); + }); +});