Skip to content

Commit

Permalink
[web] Rename component
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez authored and lslezak committed Dec 6, 2023
1 parent 3953469 commit 3a1f1fe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions web/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
ShowTerminalButton,
Sidebar
} from "~/components/core";
import { LanguageSwitcher } from "./components/l10n";
import { InstallerLocaleSwitcher } from "./components/l10n";
import { Layout, Loading, Title } from "./components/layout";
import { useInstallerL10n } from "./context/installerL10n";

Expand Down Expand Up @@ -116,7 +116,7 @@ function App() {
</div>
<div className="full-width highlighted">
<div className="flex-stack">
<LanguageSwitcher />
<InstallerLocaleSwitcher />
</div>
</div>
</Sidebar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { _ } from "~/i18n";
import { useInstallerL10n } from "~/context/installerL10n";
import cockpit from "~/lib/cockpit";

export default function LanguageSwitcher() {
export default function InstallerLocaleSwitcher() {
const { language, changeLanguage } = useInstallerL10n();
const [selected, setSelected] = useState(null);
const languages = cockpit.manifests.agama?.locales || [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import React from "react";
import { screen } from "@testing-library/react";
import { plainRender } from "~/test-utils";
import LanguageSwitcher from "./LanguageSwitcher";
import InstallerLocaleSwitcher from "./InstallerLocaleSwitcher";

const mockLanguage = "es-es";
let mockChangeLanguageFn;
Expand Down Expand Up @@ -52,8 +52,8 @@ beforeEach(() => {
mockChangeLanguageFn = jest.fn();
});

it("LanguageSwitcher", async () => {
const { user } = plainRender(<LanguageSwitcher />);
it("InstallerLocaleSwitcher", async () => {
const { user } = plainRender(<InstallerLocaleSwitcher />);
expect(screen.getByRole("option", { name: "Español" }).selected).toBe(true);
await user.selectOptions(
screen.getByRole("combobox", { label: "Display Language" }),
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/l10n/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) [2022] SUSE LLC
* Copyright (c) [2022-2023] SUSE LLC
*
* All Rights Reserved.
*
Expand All @@ -19,8 +19,8 @@
* find current contact information at www.suse.com.
*/

export { default as InstallerLocaleSwitcher } from "./InstallerLocaleSwitcher";
export { default as KeymapSelector } from "./KeymapSelector";
export { default as L10nPage } from "./L10nPage";
export { default as LanguageSwitcher } from "./LanguageSwitcher";
export { default as LocaleSelector } from "./LocaleSelector";
export { default as TimezoneSelector } from "./TimezoneSelector";

0 comments on commit 3a1f1fe

Please sign in to comment.