feat(i18n): expand catalog runtime and developer tooling

- add Intl-backed locale definitions, formatters, catalog loaders, and runtime hooks\n- compile hashed production catalogs from package-scoped catalog sources\n- drive Lingui extraction and compilation directly from project JSON config\n- redesign the devtool with localized controls, draggable persistence, settings, navigation, copy actions, ANSI output, and fullscreen support\n- extend repository APIs, CLI coverage, documentation, and runtime tests
This commit is contained in:
Maofeng
2026-07-30 14:47:42 +08:00
parent 0d0aad1d47
commit 0768e8fa29
55 changed files with 7553 additions and 495 deletions
+11
View File
@@ -1,5 +1,10 @@
export type DevtoolAction = "compile" | "extract"
export interface DevtoolProject {
locales: readonly string[]
sourceLocale: string
}
interface ApiError {
error?: string
}
@@ -29,3 +34,9 @@ export async function runDevtoolAction(
{ method: "POST" }
)
}
export async function requestDevtoolProject(baseUrl = "/__i18n") {
const normalizedBaseUrl = baseUrl.replace(/\/+$/, "")
return requestDevtoolJson<DevtoolProject>(`${normalizedBaseUrl}/project`)
}