Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : agentilab-web8 * File : lib/i18n/routes.ts9 * Module : I18n10 * Repository : https://git.spboucher.ai/agentilab-web11 * Project Website : Not specified12 * Created : 2026-12-0513 * Last Modified : 2026-12-0514 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : Proprietary34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import type { Locale } from './config';4445/** Matrice des routes : chaque page a une adresse dans chaque langue. */46export const routes = {47 home: { fr: '/', en: '/en' },48 company: { fr: '/entreprise', en: '/en/company' },49 ecosystem: { fr: '/ecosysteme', en: '/en/ecosystem' },50 groupeKa: { fr: '/ecosysteme/groupe-ka', en: '/en/ecosystem/groupe-ka' },51 orix: { fr: '/ecosysteme/orix', en: '/en/ecosystem/orix' },52 technologies: { fr: '/technologies', en: '/en/technologies' },53 contact: { fr: '/contact', en: '/en/contact' },54 privacy: { fr: '/confidentialite', en: '/en/privacy' },55 legal: { fr: '/mentions-legales', en: '/en/legal' },56} as const satisfies Record<string, Record<Locale, string>>;5758export type RouteId = keyof typeof routes;59export const routeIds = Object.keys(routes) as RouteId[];6061export function href(id: RouteId, locale: Locale): string {62 return routes[id][locale];63}6465/** Fil d'Ariane : parent de chaque page (l'accueil n'en a pas). */66export const routeParent: Record<RouteId, RouteId | null> = {67 home: null,68 company: 'home',69 ecosystem: 'home',70 groupeKa: 'ecosystem',71 orix: 'ecosystem',72 technologies: 'home',73 contact: 'home',74 privacy: 'home',75 legal: 'home',76};7778export function trail(id: RouteId): RouteId[] {79 const out: RouteId[] = [];80 for (let cur: RouteId | null = id; cur; cur = routeParent[cur]) out.unshift(cur);81 return out;82}83