feat: add i18n dictionaries and service data

Locale-aware EN/FR string dictionaries and the two-service data model
(CVE Watch with per-locale URLs, Convert with a single URL).
This commit is contained in:
2026-08-02 15:51:45 +02:00
parent e9d34f9d13
commit 2606508713
6 changed files with 164 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import type { Locale } from './locale';
export interface Service {
id: string;
url: string | Record<Locale, string>;
name: Record<Locale, string>;
tag: Record<Locale, string>;
description: Record<Locale, string>;
}
export const services: Service[] = [
{
id: 'cve',
url: {
en: 'https://cve-en.ombrora.com',
fr: 'https://cve-fr.ombrora.com',
},
name: { en: 'CVE Watch', fr: 'Veille CVE' },
tag: { en: 'Security blog', fr: 'Blog sécurité' },
description: {
en: 'Daily-tracked CVE disclosures, explained.',
fr: 'Les CVE publiées, suivies et expliquées au quotidien.',
},
},
{
id: 'convert',
url: 'https://convert.ombrora.com',
name: { en: 'Convert', fr: 'Convert' },
tag: { en: 'File converter', fr: 'Convertisseur de fichiers' },
description: {
en: 'Convert documents, audio, images, video, and archives.',
fr: 'Convertissez documents, audio, images, vidéos et archives.',
},
},
];
export function resolveServiceUrl(service: Service, locale: Locale): string {
return typeof service.url === 'string' ? service.url : service.url[locale];
}