Files
CodeNomad/packages/ui/src/lib/i18n/messages/merge.ts
Shantur Rathore feccbd13bd feat(ui): add locales and split catalogs
Adds Spanish, French, Russian, Japanese, and Simplified Chinese catalogs and wires supported locales into the i18n layer.
2026-01-26 12:56:26 +00:00

15 lines
359 B
TypeScript

export function mergeMessageParts(...parts: Array<Record<string, string>>) {
const result: Record<string, string> = {}
for (const part of parts) {
for (const [key, value] of Object.entries(part)) {
if (key in result) {
throw new Error(`Duplicate i18n message key: ${key}`)
}
result[key] = value
}
}
return result
}