Files
SnapOtter/apps/landing/src/lib/tool-strings.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

14 lines
463 B
TypeScript

// apps/landing/src/lib/tool-strings.ts
import { loadTranslations } from "@snapotter/shared";
/** Translated tool name/description for a locale, keyed by toolId. */
export async function loadToolStrings(
locale: string,
): Promise<Record<string, { name: string; description: string }>> {
const dict = await loadTranslations(locale);
return (
(dict as unknown as { tools?: Record<string, { name: string; description: string }> }).tools ??
{}
);
}