feat: completed wodox locale; improved i18n logic

This commit is contained in:
Benjamin Singleton 2026-02-09 16:10:44 -06:00 committed by Sheldon Cooper
parent 9d5e67136e
commit 00651b8e36
11 changed files with 213 additions and 125 deletions

View file

@ -0,0 +1 @@
export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };

View file

@ -5,7 +5,7 @@ export function localizeLayout<T>(
layout: DeepReadonly<Layout<T>>,
): T[keyof T][] {
const sections: T[keyof T][] = [];
for (const sectionId of layout.layout ?? []) {
for (const sectionId of layout.order ?? []) {
const section = (layout.data as T)[sectionId as keyof T];
if (section) {
sections.push(section);