Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -0,0 +1,36 @@
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
const translations: Record<string, string> = {
"settings.language.heading": "Language",
"settings.language.description": "HiveGrid is available in German only in version 1.",
"settings.language.currentLabel": "Current language",
"settings.language.german": "German",
"settings.language.v2Note": "Additional languages and a language switcher will follow in a later version.",
};
vi.mock("react-i18next", () => ({
useTranslation: () => ({
t: (key: string) => translations[key] ?? key,
}),
}));
import { LanguageSettingsNotice } from "./LanguageSettingsNotice";
describe("LanguageSettingsNotice", () => {
it("renders the German-only notice with the current language and the v2 deferral note", () => {
render(<LanguageSettingsNotice />);
expect(screen.getByRole("heading", { name: "Language" })).toBeInTheDocument();
expect(screen.getByText("HiveGrid is available in German only in version 1.")).toBeInTheDocument();
expect(screen.getByText("German")).toBeInTheDocument();
expect(screen.getByText("Additional languages and a language switcher will follow in a later version.")).toBeInTheDocument();
});
it("routes every visible string through t() so no raw i18n keys leak into the UI", () => {
const { container } = render(<LanguageSettingsNotice />);
expect(container.textContent).not.toContain("settings.language.");
});
});
@@ -0,0 +1,28 @@
import { useTranslation } from "react-i18next";
// Static, read-only language notice. v1 ships German-only; a real language
// switcher and additional locales are deferred to v2 (see AK-P3 DoD 6/DoD 7).
// All copy goes through t() so the i18n build lint stays green.
export function LanguageSettingsNotice() {
const { t } = useTranslation();
return (
<section
data-ui-id="ui.settings.language.notice"
aria-labelledby="settings-language-heading"
className="flex w-full flex-col gap-4 rounded-md border border-solid border-border-default bg-surface-neutral-secondary px-4 py-4"
>
<div className="space-y-1">
<h2 id="settings-language-heading" className="text-body-default-semibold-0 font-body-default-semibold-0 text-text-neutral-primary">
{t("settings.language.heading")}
</h2>
<p className="text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-secondary">{t("settings.language.description")}</p>
</div>
<dl className="grid gap-1 text-body-small-regular-0 font-body-small-regular-0">
<dt className="text-text-neutral-secondary">{t("settings.language.currentLabel")}</dt>
<dd className="text-text-neutral-primary">{t("settings.language.german")}</dd>
</dl>
<p className="rounded-sm border border-dashed border-border-default bg-surface-neutral-primary px-3 py-2 text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-secondary">{t("settings.language.v2Note")}</p>
</section>
);
}