diff --git a/web/src/components/core/InstallerOptions.test.tsx b/web/src/components/core/InstallerOptions.test.tsx index b75984fd7a..621bded93a 100644 --- a/web/src/components/core/InstallerOptions.test.tsx +++ b/web/src/components/core/InstallerOptions.test.tsx @@ -243,6 +243,15 @@ describe("InstallerOptions", () => { jest.spyOn(utils, "localConnection").mockReturnValue(false); }); + it("does not render keymap value in the toggle button", () => { + installerRender(, { withL10n: true }); + const toggle = screen.getByRole("button", { + name: "Change display language", + }); + expect(toggle).toHaveTextContent("Deutsch"); + expect(toggle).not.toHaveTextContent("us"); + }); + it("does not allow setting the keyboard layout", async () => { const { user } = await renderAndOpen(); const dialog = screen.getByRole("dialog"); diff --git a/web/src/components/core/InstallerOptions.tsx b/web/src/components/core/InstallerOptions.tsx index c7f2bfe506..446ed0a377 100644 --- a/web/src/components/core/InstallerOptions.tsx +++ b/web/src/components/core/InstallerOptions.tsx @@ -469,19 +469,6 @@ const CenteredContent = ({ ); -/** Toggle button for accessing both language and keyboard layout settings. */ -const AllSettingsToggle = ({ onClick, language, keymap }: ToggleProps) => ( - -); - /** Toggle button for accessing only language settings. */ const LanguageOnlyToggle = ({ onClick, language }: ToggleProps) => ( ); +/** Toggle button for accessing both language and keyboard layout settings. */ +const AllSettingsToggle = ({ onClick, language, keymap }: ToggleProps) => { + if (!localConnection()) return ; + + return ( + + ); +}; + /** * Maps each dialog variant to its corresponding React component. */