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.
This commit is contained in:
SnapOtter
2026-07-11 13:01:55 +08:00
committed by GitHub
parent 2e91368816
commit 00b651c9f8
353 changed files with 564607 additions and 2594 deletions
+18
View File
@@ -0,0 +1,18 @@
// tests/unit/scripts/i18n/hash.test.ts
import { describe, expect, it } from "vitest";
import { hash } from "../../../../scripts/i18n/lib/hash.mjs";
describe("hash", () => {
it("is stable and 12 hex chars", () => {
expect(hash("hello world")).toMatch(/^[0-9a-f]{12}$/);
expect(hash("hello world")).toBe(hash("hello world"));
});
it("changes when source changes", () => {
expect(hash("a")).not.toBe(hash("b"));
});
it("normalizes CRLF to LF so line-ending churn does not re-translate", () => {
expect(hash("line1\r\nline2")).toBe(hash("line1\nline2"));
});
});