Files
SnapOtter/tests/unit/scripts/i18n/shared-i18n.test.ts
T
SnapOtterandGitHub 00b651c9f8 feat(i18n): 21-language pipeline, landing/docs/API wiring, landing+API translations
Shared Claude Code translation pipeline (scripts/i18n, no API key) plus Astro/VitePress/Scalar i18n wiring. Landing and API reference translated into all 20 languages; docs i18n wiring + English source anchors. The translated docs markdown (apps/docs/<locale>/**, 3,620 files) follows in a companion PR because it exceeds GitHub's per-PR CI file limit.
2026-07-11 13:01:55 +08:00

22 lines
769 B
TypeScript

// tests/unit/scripts/i18n/shared-i18n.test.ts
import { describe, expect, it } from "vitest";
import { loadToolStrings, localeCodes } from "../../../../scripts/i18n/lib/shared-i18n.mjs";
describe("shared-i18n", () => {
it("returns all 21 locale codes including en and ar", () => {
const codes = localeCodes();
expect(codes).toContain("en");
expect(codes).toContain("ar");
expect(codes).toContain("pt-BR");
expect(codes.length).toBe(21);
});
it("loads translated tool name/description for a locale", async () => {
const en = await loadToolStrings("en");
expect(en.convert).toBeTruthy();
expect(typeof en.convert.name).toBe("string");
const de = await loadToolStrings("de");
expect(de.convert.name).toBeTruthy();
});
});