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
+26
View File
@@ -0,0 +1,26 @@
// tests/unit/scripts/i18n/slugify.test.ts
import { describe, expect, it } from "vitest";
import { slugify } from "../../../../scripts/i18n/lib/slugify.mjs";
describe("slugify (VitePress/mdit-vue parity)", () => {
it("lowercases and dashes spaces", () => {
expect(slugify("Getting Started")).toBe("getting-started");
});
it("collapses punctuation runs to a single dash and trims", () => {
expect(slugify("File Processing (241 Tools)")).toBe("file-processing-241-tools");
expect(slugify("REST API & API Keys")).toBe("rest-api-api-keys");
});
it("strips combining marks via NFKD", () => {
expect(slugify("Café Details")).toBe("cafe-details");
});
it("prefixes a leading digit with underscore", () => {
expect(slugify("3 Steps")).toBe("_3-steps");
});
it("handles a plain two-word heading", () => {
expect(slugify("Quick Start")).toBe("quick-start");
});
});