chore: fix prettier formatting, regenerate phase9 manifest, add missing config files (.env.example, .node-version, .nvmrc, CI workflow)
CI / test (push) Failing after 28s

This commit is contained in:
root
2026-06-25 20:12:15 -04:00
parent c43620a005
commit b7a640735c
36 changed files with 3402 additions and 1857 deletions
@@ -1,13 +1,21 @@
import manifest from "../localization/ROUTE_MANIFEST_v1.0.json";
type Locale = "en"|"fr"|"ar";
export function localizedPath(routeId:string, locale:Locale):string {
import manifest from '../localization/ROUTE_MANIFEST_v1.0.json';
type Locale = 'en' | 'fr' | 'ar';
export function localizedPath(routeId: string, locale: Locale): string {
const route = manifest.routes.find((item) => item.id === routeId);
if (!route) throw new Error(`Unknown route: ${routeId}`);
const slug = route.slugs[locale];
return slug ? `/${locale}/${slug}` : `/${locale}`;
}
export function hreflangLinks(origin:string, routeId:string) {
const alternates = manifest.locales.map((locale) => ({ rel:"alternate", hreflang:locale, href:new URL(localizedPath(routeId, locale as Locale),origin).href }));
alternates.push({ rel:"alternate", hreflang:"x-default", href:new URL(localizedPath(routeId,"en"),origin).href });
export function hreflangLinks(origin: string, routeId: string) {
const alternates = manifest.locales.map((locale) => ({
rel: 'alternate',
hreflang: locale,
href: new URL(localizedPath(routeId, locale as Locale), origin).href,
}));
alternates.push({
rel: 'alternate',
hreflang: 'x-default',
href: new URL(localizedPath(routeId, 'en'), origin).href,
});
return alternates;
}