|
| 1 | +import React from "react"; |
| 2 | +import { Link, Typography } from "@mui/material"; |
| 3 | +import { VBox } from "./LayoutBoxes"; |
| 4 | +import useTranslation, { pickLang } from "@/ui/language/useTranslation"; |
| 5 | + |
| 6 | +const GITHUB_URL = "https://github.com/Citizen-Knowledge-Graph"; |
| 7 | +const CONTACT_EMAIL = "benjamin.degenhart@foerderfunke.org"; |
| 8 | + |
| 9 | +// Kept out of translations.js: that file has no de_es section (de_es falls back |
| 10 | +// to de wholesale), while pickLang supports a dedicated Einfache-Sprache variant. |
| 11 | +const texts = { |
| 12 | + en: { |
| 13 | + part1: "FörderFunke has been discontinued and there will be no further updates — thanks for your interest! The code is ", |
| 14 | + codeLink: "open source", |
| 15 | + part2: ", and ", |
| 16 | + nameLink: "Benjamin", |
| 17 | + part3: " is happy to walk you through the code or the concept. Just get in touch." |
| 18 | + }, |
| 19 | + de: { |
| 20 | + part1: "FörderFunke wurde eingestellt und es wird keine weiteren Updates geben – danke für euer Interesse! Der Code ist ", |
| 21 | + codeLink: "Open Source", |
| 22 | + part2: " und ", |
| 23 | + nameLink: "Benjamin", |
| 24 | + part3: " führt gerne durch Code oder Konzept. Meldet euch einfach." |
| 25 | + }, |
| 26 | + de_es: { |
| 27 | + part1: "FörderFunke gibt es nicht mehr. Es gibt keine neuen Updates. Danke für Ihr Interesse! Der Code ist ", |
| 28 | + codeLink: "offen für alle", |
| 29 | + part2: ". ", |
| 30 | + nameLink: "Benjamin", |
| 31 | + part3: " zeigt Ihnen gerne den Code oder die Idee. Schreiben Sie ihm einfach." |
| 32 | + }, |
| 33 | +}; |
| 34 | + |
| 35 | +const linkStyle = { color: 'inherit', textDecoration: 'underline', fontWeight: 500 }; |
| 36 | + |
| 37 | +const DiscontinuationBanner = () => { |
| 38 | + const { language } = useTranslation(); |
| 39 | + const text = pickLang(texts, language, texts.en); |
| 40 | + |
| 41 | + return ( |
| 42 | + <VBox sx={{ backgroundColor: 'primary.main', padding: '8px 16px', alignItems: 'center' }}> |
| 43 | + <Typography variant="body2" sx={{ textAlign: 'center' }}> |
| 44 | + {text.part1} |
| 45 | + <Link href={GITHUB_URL} target="_blank" rel="noopener noreferrer" sx={linkStyle}> |
| 46 | + {text.codeLink} |
| 47 | + </Link> |
| 48 | + {text.part2} |
| 49 | + <Link href={`mailto:${CONTACT_EMAIL}`} sx={linkStyle}> |
| 50 | + {text.nameLink} |
| 51 | + </Link> |
| 52 | + {text.part3} |
| 53 | + </Typography> |
| 54 | + </VBox> |
| 55 | + ); |
| 56 | +}; |
| 57 | + |
| 58 | +export default DiscontinuationBanner; |
0 commit comments