mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-21 17:22:45 +02:00
* feat: add korean locale support * feat(i18n): localize Korean landing page * fix(i18n): refine Korean landing copy * fix(i18n): refine Korean translations * fix(i18n): translate Korean landing subpages * fix(i18n): route Korean landing docs links * fix(i18n): add Korean use case content * fix(i18n): polish Korean locale copy * fix(i18n): improve Korean landing copy * fix(onboarding): persist Korean helper artifacts Co-authored-by: multica-agent <github@multica.ai> * fix(web): add use case locale fallback Co-authored-by: multica-agent <github@multica.ai> * Align Korean pull requests wording Co-authored-by: multica-agent <github@multica.ai> * fix(i18n): dedupe docs href helper Co-authored-by: multica-agent <github@multica.ai> * fix(i18n): localize changelog dates Co-authored-by: multica-agent <github@multica.ai> * fix(docs): prerender Korean fallback pages Co-authored-by: multica-agent <github@multica.ai> * fix(docs): align fallback hreflang metadata Co-authored-by: multica-agent <github@multica.ai> * fix(i18n): preserve Chinese CJK font fallback order Co-authored-by: multica-agent <github@multica.ai> * chore(onboarding): update localized comment wording Co-authored-by: multica-agent <github@multica.ai> * test(i18n): harden CJK font fallback assertions Co-authored-by: multica-agent <github@multica.ai> * fix(docs): keep Chinese font fallbacks first Co-authored-by: multica-agent <github@multica.ai> * test(i18n): harden locale fallback coverage Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai>
19 lines
468 B
TypeScript
19 lines
468 B
TypeScript
type UseCasePageLike = {
|
|
slugs: readonly string[];
|
|
};
|
|
|
|
function pageKey(page: UseCasePageLike): string {
|
|
return page.slugs.join("/");
|
|
}
|
|
|
|
export function mergeUseCasePagesWithEnglishFallback<
|
|
TPage extends UseCasePageLike,
|
|
>(localizedPages: TPage[], englishPages: TPage[]): TPage[] {
|
|
const localizedSlugs = new Set(localizedPages.map(pageKey));
|
|
|
|
return [
|
|
...localizedPages,
|
|
...englishPages.filter((page) => !localizedSlugs.has(pageKey(page))),
|
|
];
|
|
}
|