From e587a0419422ad3025454484afc54072b545a170 Mon Sep 17 00:00:00 2001 From: Marvin <52848568+mleem97@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:47:26 +0200 Subject: [PATCH] feat(i18n): add Mods page localization and shared links - Introduced a new file for Mods page localization with translations for multiple languages (en, de, fr, es, ru, ja). - Updated existing homepage localization files to include references to the new `gregFramework` terminology. - Added shared links for knowledge and workflow sections to enhance documentation accessibility across different languages. --- src/i18n/homepage/de.ts | 8 +- src/i18n/homepage/en.ts | 36 ++++--- src/i18n/homepage/es.ts | 8 +- src/i18n/homepage/fr.ts | 8 +- src/i18n/homepage/ja.ts | 8 +- src/i18n/homepage/ru.ts | 8 +- src/i18n/homepage/sharedLinks.ts | 180 +++++++++++++++++++++++++++++++ src/i18n/homepage/types.ts | 18 ++++ src/i18n/modsPage.ts | 85 +++++++++++++++ 9 files changed, 327 insertions(+), 32 deletions(-) create mode 100644 src/i18n/homepage/sharedLinks.ts create mode 100644 src/i18n/modsPage.ts diff --git a/src/i18n/homepage/de.ts b/src/i18n/homepage/de.ts index 068205e..22a0d76 100644 --- a/src/i18n/homepage/de.ts +++ b/src/i18n/homepage/de.ts @@ -1,10 +1,12 @@ import type { HomepageContent } from './types'; +import { homepageShellDe } from './sharedLinks'; export const de: HomepageContent = { + ...homepageShellDe, heroLine1: 'DATACENTER MODDING HUB.', heroLine2: 'SEI SMART WIE GREG.', heroSub1: 'Klar. Flexibel. Community-getrieben.', - heroSub2: 'Mit FrikaMF, Rust-Stacks, Multiplayer und Plugins.', + heroSub2: 'gregFramework, Rust-Stacks, Multiplayer und Plugins.', ctaStart: 'MODDING STARTEN', ctaMods: 'VERFÜGBARE STANDALONE MODS & PLUGINS', docsPaths: 'Dokumentationspfade', @@ -18,7 +20,7 @@ export const de: HomepageContent = { comingSoon: 'Kommt bald', comingSoonText: '`datacentermods.com` wird gerade vorbereitet. Bis zum Launch findest du alles unter `Docs Hub → Standalone Mods`.', communityTitle: 'Community & Maintainer', - communityText: 'Dieses Portal bündelt Framework-Doku und Community-Plugins für das Data-Center-Ökosystem.', + communityText: 'Dieses Portal bündelt gregFramework-Doku und Community-Plugins für das Data-Center-Ökosystem.', docsEndUserTitle: 'Endnutzer', docsEndUserDescription: 'Installation, Updates, FAQ und Fehlerbehebung.', docsModDevsTitle: 'Mod-Entwickler', @@ -28,7 +30,7 @@ export const de: HomepageContent = { docsCapabilityTitle: 'Capability Matrix', docsCapabilityDescription: 'Komplette Feature-Übersicht und konkrete Use Cases.', ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemCoreTitle: 'gregFramework Core', ecosystemCoreDescription: 'Hook-System, FFI-Bridge, Event-Verträge und Runtime-Architektur.', ecosystemCoreCta: 'Core-Doku öffnen →', ecosystemRustTitle: 'Standalone Rust', diff --git a/src/i18n/homepage/en.ts b/src/i18n/homepage/en.ts index d6232a8..1d9fe42 100644 --- a/src/i18n/homepage/en.ts +++ b/src/i18n/homepage/en.ts @@ -1,43 +1,45 @@ import type { HomepageContent } from './types'; +import { homepageShellEn } from './sharedLinks'; export const en: HomepageContent = { + ...homepageShellEn, heroLine1: 'DATACENTER MODDING HUB.', heroLine2: 'SMART LIKE GREG.', heroSub1: 'Streamlined. Flexible. Community-curated.', - heroSub2: 'Covering FrikaMF, Rust stacks, multiplayer and plugins.', + heroSub2: 'gregFramework, Rust stacks, multiplayer, and plugins.', ctaStart: 'START MODDING', ctaMods: 'AVAILABLE STANDALONE MODS & PLUGINS', - docsPaths: 'Documentation Paths', - featureTitles: ['Dual-Track Modding', 'Runtime Hook Bridge', 'Wiki-Driven Docs', 'Community Ecosystem'], + docsPaths: 'Documentation paths', + featureTitles: ['Dual-track modding', 'Runtime hook bridge', 'Wiki-driven docs', 'Community ecosystem'], featureDescriptions: [ - 'Build mods in C# directly or native in Rust via C-ABI/FFI.', + 'Build mods in C# or natively in Rust via C-ABI/FFI.', 'Harmony patches, event IDs, and deterministic hook forwarding.', 'Source of truth from .wiki with end-user and mod-dev paths.', 'Core framework docs plus standalone plugin and ecosystem docs.', ], - comingSoon: 'Coming Soon', - comingSoonText: '`datacentermods.com` is currently in preparation. Until launch, use `Docs Hub → Standalone Mods`.', - communityTitle: 'Community & Maintainers', - communityText: 'This portal is designed for framework docs and community-built plugins across the Data Center ecosystem.', - docsEndUserTitle: 'End-User', + comingSoon: 'Coming soon', + comingSoonText: '`datacentermods.com` is in preparation. Until launch, use `Docs Hub → Standalone Mods`.', + communityTitle: 'Community & maintainers', + communityText: 'This portal is designed for gregFramework docs and community-built plugins across the Data Center ecosystem.', + docsEndUserTitle: 'End-user', docsEndUserDescription: 'Install, update, FAQ, troubleshooting.', - docsModDevsTitle: 'Mod-Devs', + docsModDevsTitle: 'Mod developers', docsModDevsDescription: 'Debug workflows, setup, hooks and references.', docsContributorsTitle: 'Contributors', docsContributorsDescription: 'Conventions, CI checks, contribution workflow.', - docsCapabilityTitle: 'Capability Matrix', + docsCapabilityTitle: 'Capability matrix', docsCapabilityDescription: 'Complete feature map and implementation use cases.', - ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemTitle: 'Ecosystem coverage', + ecosystemCoreTitle: 'gregFramework core', ecosystemCoreDescription: 'Hook system, FFI bridge, event contracts and runtime architecture.', ecosystemCoreCta: 'Open core docs →', ecosystemRustTitle: 'Standalone Rust', ecosystemRustDescription: 'Rust/FFI implementation guides for external and standalone runtimes.', ecosystemRustCta: 'Open Rust/FFI docs →', - ecosystemMultiplayerTitle: 'Multiplayer & Plugins', + ecosystemMultiplayerTitle: 'Multiplayer & plugins', ecosystemMultiplayerDescription: 'Multiplayer roadmap, plugin docs, and community module references.', ecosystemMultiplayerCta: 'Open multiplayer docs →', - gregTitle: 'The Legend of Greg', + gregTitle: 'The legend of Greg', gregText1: 'Greg is the tireless server technician of this project. He looks like he has not slept for months, and he is usually quiet — but once a rack fails or a mod breaks, Greg is already there.', gregText2: @@ -45,8 +47,8 @@ export const en: HomepageContent = { gregQuote: '"Be smart. Be like Greg."', supportTitle: 'Support', supportText: 'Report bugs, request docs for new community plugins, and track workstreams.', - supportCta: 'Open GitHub Issues', - availableModsLabel: 'Available Mods', + supportCta: 'Open GitHub issues', + availableModsLabel: 'Available mods', repositoryLabel: 'Repository', joinLabel: 'JOIN', }; diff --git a/src/i18n/homepage/es.ts b/src/i18n/homepage/es.ts index 680e1d6..d82b310 100644 --- a/src/i18n/homepage/es.ts +++ b/src/i18n/homepage/es.ts @@ -1,10 +1,12 @@ import type { HomepageContent } from './types'; +import { homepageShellEn } from './sharedLinks'; export const es: HomepageContent = { + ...homepageShellEn, heroLine1: 'HUB DE MODDING DATACENTER.', heroLine2: 'SÉ INTELIGENTE. SÉ COMO GREG.', heroSub1: 'Claro. Flexible. Impulsado por la comunidad.', - heroSub2: 'Con FrikaMF, stacks Rust, multijugador y plugins.', + heroSub2: 'gregFramework, stacks Rust, multijugador y plugins.', ctaStart: 'EMPEZAR MODDING', ctaMods: 'MODS Y PLUGINS STANDALONE DISPONIBLES', docsPaths: 'Rutas de documentación', @@ -18,7 +20,7 @@ export const es: HomepageContent = { comingSoon: 'Próximamente', comingSoonText: '`datacentermods.com` está en preparación. Mientras tanto, usa `Docs Hub → Standalone Mods`.', communityTitle: 'Comunidad y mantenedores', - communityText: 'Este portal reúne docs del framework y plugins de la comunidad para el ecosistema Data Center.', + communityText: 'Este portal reúne docs de gregFramework y plugins de la comunidad para el ecosistema Data Center.', docsEndUserTitle: 'End-User', docsEndUserDescription: 'Install, update, FAQ, troubleshooting.', docsModDevsTitle: 'Mod-Devs', @@ -28,7 +30,7 @@ export const es: HomepageContent = { docsCapabilityTitle: 'Capability Matrix', docsCapabilityDescription: 'Complete feature map and implementation use cases.', ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemCoreTitle: 'gregFramework core', ecosystemCoreDescription: 'Hook system, FFI bridge, event contracts and runtime architecture.', ecosystemCoreCta: 'Open core docs →', ecosystemRustTitle: 'Standalone Rust', diff --git a/src/i18n/homepage/fr.ts b/src/i18n/homepage/fr.ts index 3c0475a..5424a8c 100644 --- a/src/i18n/homepage/fr.ts +++ b/src/i18n/homepage/fr.ts @@ -1,10 +1,12 @@ import type { HomepageContent } from './types'; +import { homepageShellEn } from './sharedLinks'; export const fr: HomepageContent = { + ...homepageShellEn, heroLine1: 'HUB DE MODDING DATACENTER.', heroLine2: 'SOYEZ MALIN, SOYEZ GREG.', heroSub1: 'Simple. Flexible. Piloté par la communauté.', - heroSub2: 'FrikaMF, stacks Rust, multijoueur et plugins.', + heroSub2: 'gregFramework, stacks Rust, multijoueur et plugins.', ctaStart: 'COMMENCER LE MODDING', ctaMods: 'MODS & PLUGINS STANDALONE DISPONIBLES', docsPaths: 'Parcours de documentation', @@ -18,7 +20,7 @@ export const fr: HomepageContent = { comingSoon: 'Bientôt disponible', comingSoonText: '`datacentermods.com` est en préparation. En attendant, consultez `Docs Hub → Standalone Mods`.', communityTitle: 'Communauté & Mainteneurs', - communityText: 'Ce portail regroupe la doc framework et les plugins communautaires de l’écosystème Data Center.', + communityText: 'Ce portail regroupe la doc gregFramework et les plugins communautaires de l’écosystème Data Center.', docsEndUserTitle: 'End-User', docsEndUserDescription: 'Install, update, FAQ, troubleshooting.', docsModDevsTitle: 'Mod-Devs', @@ -28,7 +30,7 @@ export const fr: HomepageContent = { docsCapabilityTitle: 'Capability Matrix', docsCapabilityDescription: 'Complete feature map and implementation use cases.', ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemCoreTitle: 'gregFramework core', ecosystemCoreDescription: 'Hook system, FFI bridge, event contracts and runtime architecture.', ecosystemCoreCta: 'Open core docs →', ecosystemRustTitle: 'Standalone Rust', diff --git a/src/i18n/homepage/ja.ts b/src/i18n/homepage/ja.ts index 8dd9990..8461457 100644 --- a/src/i18n/homepage/ja.ts +++ b/src/i18n/homepage/ja.ts @@ -1,10 +1,12 @@ import type { HomepageContent } from './types'; +import { homepageShellEn } from './sharedLinks'; export const ja: HomepageContent = { + ...homepageShellEn, heroLine1: 'DATACENTER MODDING HUB.', heroLine2: 'BE SMART. BE LIKE GREG.', heroSub1: 'シンプル。柔軟。コミュニティ主導。', - heroSub2: 'FrikaMF、Rustスタック、マルチプレイ、プラグインを網羅。', + heroSub2: 'gregFramework、Rustスタック、マルチプレイ、プラグインを網羅。', ctaStart: 'MODDING を始める', ctaMods: '利用可能な STANDALONE MODS & PLUGINS', docsPaths: 'ドキュメント導線', @@ -18,7 +20,7 @@ export const ja: HomepageContent = { comingSoon: '近日公開', comingSoonText: '`datacentermods.com` は準備中です。公開まで `Docs Hub → Standalone Mods` をご利用ください。', communityTitle: 'コミュニティ & メンテナー', - communityText: 'このポータルは Data Center エコシステム向けに framework docs と community plugins をまとめています。', + communityText: 'このポータルは Data Center エコシステム向けに gregFramework docs と community plugins をまとめています。', docsEndUserTitle: 'End-User', docsEndUserDescription: 'Install, update, FAQ, troubleshooting.', docsModDevsTitle: 'Mod-Devs', @@ -28,7 +30,7 @@ export const ja: HomepageContent = { docsCapabilityTitle: 'Capability Matrix', docsCapabilityDescription: 'Complete feature map and implementation use cases.', ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemCoreTitle: 'gregFramework core', ecosystemCoreDescription: 'Hook system, FFI bridge, event contracts and runtime architecture.', ecosystemCoreCta: 'Open core docs →', ecosystemRustTitle: 'Standalone Rust', diff --git a/src/i18n/homepage/ru.ts b/src/i18n/homepage/ru.ts index 4b5969a..349b08a 100644 --- a/src/i18n/homepage/ru.ts +++ b/src/i18n/homepage/ru.ts @@ -1,10 +1,12 @@ import type { HomepageContent } from './types'; +import { homepageShellEn } from './sharedLinks'; export const ru: HomepageContent = { + ...homepageShellEn, heroLine1: 'ХАБ МОДДИНГА DATACENTER.', heroLine2: 'БУДЬ УМНЫМ. БУДЬ КАК ГРЕГ.', heroSub1: 'Просто. Гибко. Силой сообщества.', - heroSub2: 'FrikaMF, Rust-стек, мультиплеер и плагины.', + heroSub2: 'gregFramework, Rust-стек, мультиплеер и плагины.', ctaStart: 'НАЧАТЬ МОДДИНГ', ctaMods: 'ДОСТУПНЫЕ STANDALONE МОДЫ И ПЛАГИНЫ', docsPaths: 'Разделы документации', @@ -18,7 +20,7 @@ export const ru: HomepageContent = { comingSoon: 'Скоро', comingSoonText: '`datacentermods.com` пока готовится. До запуска используйте `Docs Hub → Standalone Mods`.', communityTitle: 'Сообщество и мейнтейнеры', - communityText: 'Портал объединяет документацию фреймворка и community-плагинов экосистемы Data Center.', + communityText: 'Портал объединяет документацию gregFramework и community-плагинов экосистемы Data Center.', docsEndUserTitle: 'End-User', docsEndUserDescription: 'Install, update, FAQ, troubleshooting.', docsModDevsTitle: 'Mod-Devs', @@ -28,7 +30,7 @@ export const ru: HomepageContent = { docsCapabilityTitle: 'Capability Matrix', docsCapabilityDescription: 'Complete feature map and implementation use cases.', ecosystemTitle: 'Ecosystem Coverage', - ecosystemCoreTitle: 'FrikaMF Core', + ecosystemCoreTitle: 'gregFramework core', ecosystemCoreDescription: 'Hook system, FFI bridge, event contracts and runtime architecture.', ecosystemCoreCta: 'Open core docs →', ecosystemRustTitle: 'Standalone Rust', diff --git a/src/i18n/homepage/sharedLinks.ts b/src/i18n/homepage/sharedLinks.ts new file mode 100644 index 0000000..3a13ade --- /dev/null +++ b/src/i18n/homepage/sharedLinks.ts @@ -0,0 +1,180 @@ +import type { HomepageContent, HomepageDocLink } from './types'; + +/** English link hub — reused for locales without dedicated translations. */ +export const sharedKnowledgeLinksEn: HomepageDocLink[] = [ + { title: 'Wiki Overview', description: 'Canonical docs entry under /wiki.', link: '/wiki' }, + { + title: 'Framework Core', + description: 'Runtime hooks, bridge, events, and architecture.', + link: '/wiki/mods/framework', + }, + { + title: 'Plugin Wiki', + description: 'Plugin-specific docs and release pages.', + link: '/wiki/mods/extensions/', + }, + { title: 'Mod Wiki', description: 'Gameplay mods, releases, and module docs.', link: '/wiki/mods/mods' }, + { + title: 'FMF Hooks Catalog', + description: 'Hook strings and event IDs generated from core sources.', + link: '/wiki/reference/fmf-hooks-catalog', + }, + { + title: 'Release Channels', + description: 'Steam Workshop vs GitHub for discovery and betas.', + link: '/wiki/reference/release-channels', + }, + { + title: 'Unified Roadmap', + description: 'Consolidated planning with duplicate tracks removed.', + link: '/wiki/roadmap/unified-roadmap', + }, + { title: 'Mods Catalog', description: 'Dynamic /mods page with wiki and download links.', link: '/mods' }, +]; + +export const sharedWorkflowLinksEn: HomepageDocLink[] = [ + { + title: 'End-user docs', + description: 'Install, update, and troubleshooting paths.', + link: '/wiki/wiki-import/EndUser/End-User-Release', + }, + { + title: 'Mod developer docs', + description: 'Setup, debugging, and hook integration.', + link: '/wiki/wiki-import/ModDevs/Mod-Developer-Debug', + }, + { + title: 'Repo inventory', + description: 'Split-repo layout and drift notes for contributors.', + link: '/wiki/contributors/repo-inventory', + }, + { + title: 'Contributor workflow', + description: 'Standards, CI, and documentation workflow.', + link: '/wiki/contributors/docusaurus-workflow', + }, + { + title: 'Plugin security audit', + description: 'Submission and malicious-code review process.', + link: '/wiki/contributors/plugin-submission-audit', + }, +]; + +export const sharedKnowledgeLinksDe: HomepageDocLink[] = [ + { title: 'Wiki-Übersicht', description: 'Einstieg unter /wiki.', link: '/wiki' }, + { + title: 'Framework-Core', + description: 'Runtime-Hooks, Bridge, Events und Architektur.', + link: '/wiki/mods/framework', + }, + { + title: 'Plugin-Wiki', + description: 'Plugin-Doku und Release-Seiten.', + link: '/wiki/mods/extensions/', + }, + { title: 'Mod-Wiki', description: 'Gameplay-Mods, Releases und Modul-Doku.', link: '/wiki/mods/mods' }, + { + title: 'FMF-Hooks-Katalog', + description: 'Hook-Strings und Event-IDs aus den Core-Quellen.', + link: '/wiki/reference/fmf-hooks-catalog', + }, + { + title: 'Release-Kanäle', + description: 'Steam Workshop vs GitHub für Discovery und Betas.', + link: '/wiki/reference/release-channels', + }, + { + title: 'Einheitliche Roadmap', + description: 'Zusammengeführte Planung ohne doppelte Tracks.', + link: '/wiki/roadmap/unified-roadmap', + }, + { title: 'Mods-Katalog', description: 'Dynamische /mods-Seite mit Wiki- und Download-Links.', link: '/mods' }, +]; + +export const sharedWorkflowLinksDe: HomepageDocLink[] = [ + { + title: 'Endnutzer-Doku', + description: 'Installation, Updates und Fehlerbehebung.', + link: '/wiki/wiki-import/EndUser/End-User-Release', + }, + { + title: 'Mod-Entwickler-Doku', + description: 'Setup, Debugging und Hook-Integration.', + link: '/wiki/wiki-import/ModDevs/Mod-Developer-Debug', + }, + { + title: 'Repo-Inventar', + description: 'Split-Repo-Layout und Drift-Hinweise.', + link: '/wiki/contributors/repo-inventory', + }, + { + title: 'Contributor-Workflow', + description: 'Standards, CI und Doku-Workflow.', + link: '/wiki/contributors/docusaurus-workflow', + }, + { + title: 'Plugin-Security-Audit', + description: 'Einreichung und Review auf Schadcode.', + link: '/wiki/contributors/plugin-submission-audit', + }, +]; + +export const homepageShellEn: Pick< + HomepageContent, + | 'heroBadge' + | 'heroBrandLine1' + | 'heroBrandLine2Gradient' + | 'knowledgeSectionTitle' + | 'workflowSectionTitle' + | 'codeSectionTitle' + | 'codeSectionLead' + | 'ctaDiscordTitle' + | 'ctaDiscordLead' + | 'ctaDiscordButton' + | 'knowledgeLinks' + | 'workflowLinks' +> = { + heroBadge: 'gregFramework · docs live', + heroBrandLine1: 'greg', + heroBrandLine2Gradient: 'Framework', + knowledgeSectionTitle: 'Knowledge architecture', + workflowSectionTitle: 'Workflows', + codeSectionTitle: 'Engineered for mod authors', + codeSectionLead: + 'C# mods on MelonLoader, FMF plugins, and optional Rust FFI bridges — one documentation hub, versioned with the split repos.', + ctaDiscordTitle: 'Build with the community', + ctaDiscordLead: 'Ask questions, share mods, and follow framework releases alongside core development.', + ctaDiscordButton: 'Join Discord', + knowledgeLinks: sharedKnowledgeLinksEn, + workflowLinks: sharedWorkflowLinksEn, +}; + +export const homepageShellDe: Pick< + HomepageContent, + | 'heroBadge' + | 'heroBrandLine1' + | 'heroBrandLine2Gradient' + | 'knowledgeSectionTitle' + | 'workflowSectionTitle' + | 'codeSectionTitle' + | 'codeSectionLead' + | 'ctaDiscordTitle' + | 'ctaDiscordLead' + | 'ctaDiscordButton' + | 'knowledgeLinks' + | 'workflowLinks' +> = { + heroBadge: 'gregFramework · Live-Dokumentation', + heroBrandLine1: 'greg', + heroBrandLine2Gradient: 'Framework', + knowledgeSectionTitle: 'Wissensarchitektur', + workflowSectionTitle: 'Arbeitsabläufe', + codeSectionTitle: 'Für Mod-Autoren gebaut', + codeSectionLead: + 'C#-Mods auf MelonLoader, FMF-Plugins und optionale Rust-FFI-Brücken — ein Dokumentations-Hub, versioniert mit den Split-Repos.', + ctaDiscordTitle: 'Mit der Community bauen', + ctaDiscordLead: 'Fragen stellen, Mods teilen und Releases parallel zur Core-Entwicklung verfolgen.', + ctaDiscordButton: 'Discord beitreten', + knowledgeLinks: sharedKnowledgeLinksDe, + workflowLinks: sharedWorkflowLinksDe, +}; diff --git a/src/i18n/homepage/types.ts b/src/i18n/homepage/types.ts index 44c8f23..2531012 100644 --- a/src/i18n/homepage/types.ts +++ b/src/i18n/homepage/types.ts @@ -1,12 +1,30 @@ export type LocaleKey = 'en' | 'de' | 'fr' | 'es' | 'ru' | 'ja'; +export type HomepageDocLink = { + title: string; + description: string; + link: string; +}; + export type HomepageContent = { + heroBadge: string; + heroBrandLine1: string; + heroBrandLine2Gradient: string; heroLine1: string; heroLine2: string; heroSub1: string; heroSub2: string; ctaStart: string; ctaMods: string; + knowledgeSectionTitle: string; + workflowSectionTitle: string; + codeSectionTitle: string; + codeSectionLead: string; + ctaDiscordTitle: string; + ctaDiscordLead: string; + ctaDiscordButton: string; + knowledgeLinks: HomepageDocLink[]; + workflowLinks: HomepageDocLink[]; docsPaths: string; featureTitles: [string, string, string, string]; featureDescriptions: [string, string, string, string]; diff --git a/src/i18n/modsPage.ts b/src/i18n/modsPage.ts new file mode 100644 index 0000000..ed2e4ee --- /dev/null +++ b/src/i18n/modsPage.ts @@ -0,0 +1,85 @@ +import type { LocaleKey } from './homepage/types'; + +export type ModsPageStrings = { + title: string; + description: string; + pluginsHeading: string; + modsHeading: string; + wiki: string; + release: string; + download: string; + notReleased: string; +}; + +const byLocale: Record = { + en: { + title: 'Mods & plugins catalog', + description: + 'Generated from the module catalog. Each entry links to its wiki article, release page, and download route.', + pluginsHeading: 'Plugins', + modsHeading: 'Mods', + wiki: 'Wiki', + release: 'Release', + download: 'Download DLL', + notReleased: 'Not released yet', + }, + de: { + title: 'Mods- & Plugin-Katalog', + description: + 'Aus dem Modul-Katalog erzeugt. Jeder Eintrag verweist auf Wiki, Release-Seite und Download-Route.', + pluginsHeading: 'Plugins', + modsHeading: 'Mods', + wiki: 'Wiki', + release: 'Release', + download: 'DLL laden', + notReleased: 'Noch nicht veröffentlicht', + }, + fr: { + title: 'Catalogue mods & plugins', + description: + 'Généré depuis le catalogue des modules. Chaque entrée renvoie vers le wiki, la page release et le téléchargement.', + pluginsHeading: 'Plugins', + modsHeading: 'Mods', + wiki: 'Wiki', + release: 'Release', + download: 'Télécharger DLL', + notReleased: 'Pas encore publié', + }, + es: { + title: 'Catálogo de mods y plugins', + description: + 'Generado desde el catálogo de módulos. Cada entrada enlaza al wiki, la página de release y la descarga.', + pluginsHeading: 'Plugins', + modsHeading: 'Mods', + wiki: 'Wiki', + release: 'Release', + download: 'Descargar DLL', + notReleased: 'Aún no publicado', + }, + ru: { + title: 'Каталог модов и плагинов', + description: + 'Собрано из каталога модулей. Каждая запись ведёт на wiki, страницу релиза и маршрут загрузки.', + pluginsHeading: 'Плагины', + modsHeading: 'Моды', + wiki: 'Wiki', + release: 'Релиз', + download: 'Скачать DLL', + notReleased: 'Ещё не выпущено', + }, + ja: { + title: 'Mods & プラグインカタログ', + description: 'モジュールカタログから生成。各エントリは Wiki・リリースページ・ダウンロードへリンクします。', + pluginsHeading: 'プラグイン', + modsHeading: 'Mods', + wiki: 'Wiki', + release: 'リリース', + download: 'DLL を取得', + notReleased: '未リリース', + }, +}; + +export function getModsPageStrings(locale: string): ModsPageStrings { + const languageOnly = (locale || 'en').toLowerCase().split('-')[0] as LocaleKey; + return byLocale[languageOnly] ?? byLocale.en; +}