mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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.
22 lines
769 B
TypeScript
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();
|
|
});
|
|
});
|