fix(webui): localize the component gallery

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-20 16:52:44 +08:00
1 parent 282839cc65
commit ae5cb64e9e
54 files changed
+11120 -719

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ for (const locale of ["en", "zh-CN"]) {
await page.setViewportSize({ width, height: 900 });
await page.addInitScript((language) => localStorage.setItem("nanobot.locale", language), locale);
await page.goto("/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fsettings%2Fmodels%2FProviderParameterFields.tsx");
const preview = page.getByRole("region", { name: "Component preview" });
const preview = page.getByRole("region", { name: locale === "en" ? "Component preview" : "组件预览" });
const rows = preview.getByRole("button");
await expect(rows).toHaveCount(3);