feat: add grouped TechLog route contracts

This commit is contained in:
DongHyeonka
2026-08-15 20:30:32 +09:00
parent 27dda3e0e3
commit adb8613cb9
15 changed files with 887 additions and 67 deletions
@@ -0,0 +1,24 @@
import {
TECH_LOG_ROUTE_REGISTRY,
type TechLogRouteId,
} from "./tech-log-route-contract.ts";
export type TechLogRouteMessageKey =
| `route.${TechLogRouteId}.title`
| `route.${TechLogRouteId}.navigation`;
function createCatalog(): Readonly<Record<TechLogRouteMessageKey, string>> {
return Object.freeze(
Object.fromEntries(
Object.values(TECH_LOG_ROUTE_REGISTRY).flatMap((definition) => [
[`route.${definition.routeId}.title`, definition.title],
[`route.${definition.routeId}.navigation`, definition.title],
]),
),
) as Readonly<Record<TechLogRouteMessageKey, string>>;
}
export const TECH_LOG_MESSAGE_CATALOGS = Object.freeze({
"ko-KR": createCatalog(),
"en-US": createCatalog(),
});