Skip to main content

assembleLocale

Assemble fresh locale state from compiled pages; cached page IR is never mutated.

Import​

import { assembleLocale } from '@bedrock-core/builder-guides';

Signature​

function assembleLocale( compiled: Map<string, GuidePageCompilation>, categories: Map<string, Record<string, unknown>>, prefix: string, report: Report, targets = new Set(compiled.keys()), ): LocaleBuild;

Parameters​

ParameterTypeDefaultDescription
compiledMap<string, GuidePageCompilation>—Current locale page compilations indexed by normalized page ID
categoriesMap<string, Record<string, unknown>>—Current category metadata indexed by category ID
prefixstring—Namespace prefix for generated language keys
reportReport—Warning/error sink used by locale assembly
targetsSet<string>new Set(compiled.keys())Known page IDs for link validation; defaults to the compiled page IDs

Returns​

Assembled locale pages, language entries and validated page IDs.