diff --git a/i18n/en/code.json b/i18n/en/code.json index 8e78e5b..dd52140 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -482,5 +482,35 @@ "theme.contentVisibility.draftBanner.message": { "message": "This page is a draft. It will only be visible in dev and be excluded from the production build.", "description": "The draft content banner message" + }, + ":edu S2": { + "message": ":edu S2" + }, + ":edu": { + "message": ":edu" + }, + ":bike": { + "message": ":bike" + }, + ":CO2 Ampel": { + "message": ":CO2 Traffic Light" + }, + ":home": { + "message": ":home" + }, + ":mini": { + "message": ":mini" + }, + "openSenseMap": { + "message": "openSenseMap" + }, + "Blockly": { + "message": "Blockly" + }, + "Hardware Glossar": { + "message": "Hardware Glossary" + }, + "senseBox Dokumentation": { + "message": "senseBox Documentation" } } diff --git a/i18n/en/docusaurus-theme-classic/footer.json b/i18n/en/docusaurus-theme-classic/footer.json index 467bc08..55f5841 100644 --- a/i18n/en/docusaurus-theme-classic/footer.json +++ b/i18n/en/docusaurus-theme-classic/footer.json @@ -8,8 +8,8 @@ "description": "The title of the footer links column with title=Community in the footer" }, "link.item.label.Impressum": { - "message": "Impressum", - "description": "The label of footer link with label=Impressum linking to https://sensebox.de/impressum" + "message": "Imprint", + "description": "The label of footer link with label=Impressum linking to https://sensebox.de/de/imprint" }, "link.item.label.openSenseMap": { "message": "openSenseMap", diff --git a/src/components/HomepageFeatures/index.jsx b/src/components/HomepageFeatures/index.jsx index e6a8332..c781620 100755 --- a/src/components/HomepageFeatures/index.jsx +++ b/src/components/HomepageFeatures/index.jsx @@ -1,17 +1,34 @@ -import React from 'react' -import clsx from 'clsx' -import styles from './styles.module.css' -import Link from '@docusaurus/Link' +import React from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; +import Link from '@docusaurus/Link'; import Translate, {translate} from '@docusaurus/Translate'; -import LogoSensebox from '@site/static/img/logo.svg' -import osem from '@site/static/img/osem.png' -import blockly from '@site/static/img/blockly.png' -import hardware from '@site/static/img/hardware.jpg' -import { useBoardStore } from '@site/src/lib/stores/store' +import LogoSensebox from '@site/static/img/logo.svg'; +import osem from '@site/static/img/osem.png'; +import blockly from '@site/static/img/blockly.png'; +import hardware from '@site/static/img/hardware.jpg'; +import { useBoardStore } from '@site/src/lib/stores/store'; + +// Localisation function for the title +const translateTitle = (title) => { + const translations = { + ':edu S2': translate({ message: ':edu S2' }), + ':edu': translate({ message: ':edu' }), + ':bike': translate({ message: ':bike' }), + ':CO2 Ampel': translate({ message: ':CO2 Ampel' }), + ':home': translate({ message: ':home' }), + ':mini': translate({ message: ':mini' }), + 'openSenseMap': translate({ message: 'openSenseMap' }), + 'Blockly': translate({ message: 'Blockly' }), + 'Hardware Glossar': translate({ message: 'Hardware Glossar' }), + 'senseBox Dokumentation': translate({ message: 'senseBox Dokumentation' }), // Neue Zeile + }; + return translations[title] || title; + }; const FeatureList = [ { - title: ':edu S2', + title: translateTitle(':edu S2'), description: ( Die zweite Generation der senseBox:edu für den Einsatz im @@ -21,7 +38,7 @@ const FeatureList = [ to: '/docs/boards/mcus2/mcu-s2-overview?board=edus2', }, { - title: ':edu', + title: translateTitle(':edu'), description: ( Informationen zum Anschluss und zur Programmierung der senseBox:edu für @@ -31,7 +48,7 @@ const FeatureList = [ to: '/docs/boards/mcu/mcu-overview?board=edu', }, { - title: ':bike', + title: translateTitle(':bike'), description: ( Anleitung und Informationen zur senseBox:bike, der dazugehörigen App und @@ -41,7 +58,7 @@ const FeatureList = [ to: '/docs/category/bike?board=bike', }, { - title: ':CO2 Ampel', + title: translateTitle(':CO2 Ampel'), description: ( Informationen zum Anschluss und Programmierung der Sensoren, Bees und @@ -51,7 +68,7 @@ const FeatureList = [ to: '/docs/products/co2Ampel/co2Ampel-overview?board=co2', }, { - title: ':home', + title: translateTitle(':home'), description: ( Aufstellungsort, Installation und alle weiteren Informationen zu @@ -61,7 +78,7 @@ const FeatureList = [ to: '/docs/boards/mcu/mcu-overview?board=home', }, { - title: ':mini', + title: translateTitle(':mini'), description: ( Alle relevanten Informationen zur Miniaturversion der senseBox findest @@ -70,11 +87,11 @@ const FeatureList = [ ), to: '/docs/boards/mini/mini-overview?board=mini', }, -] +]; const ThumbNailPreviewList = [ { - title: 'openSenseMap', + title: translateTitle('openSenseMap'), Image: osem, description: ( @@ -84,7 +101,7 @@ const ThumbNailPreviewList = [ to: 'https://docs.opensensemap.org/', }, { - title: 'Blockly', + title: translateTitle('Blockly'), Image: blockly, description: ( @@ -97,7 +114,7 @@ const ThumbNailPreviewList = [ to: '/docs/category/blockly-2', }, { - title: 'Hardware Glossar', + title: translateTitle('Hardware Glossar'), Image: hardware, description: ( @@ -110,7 +127,7 @@ const ThumbNailPreviewList = [ }, to: '/docs/category/glossar', }, -] +]; function ThumbailPreview({ Image, title, description, onClick, to }) { return ( @@ -131,10 +148,7 @@ function ThumbailPreview({ Image, title, description, onClick, to }) { function Feature({ title, description, to }) { const handleBoardChange = selectedBoard => { - // Verwende die setBoard-Funktion direkt, um das Board im Store zu aktualisieren useBoardStore.setState({ board: selectedBoard }) - - // Hier kannst du weitere Aktionen ausführen, wenn sich das Board ändert } return ( @@ -153,32 +167,33 @@ function Feature({ title, description, to }) { ) } + export default function HomepageFeatures() { - return ( -
-
-
-
-
-

senseBox Dokumentation

-

Der Platz für die senseBox-Dokumentation.

-
-
- -
-
-
- {FeatureList.map((props, idx) => ( - - ))} -
-
-
-
- {ThumbNailPreviewList.map((props, idx) => ( - - ))} -
-
- ) -} + return ( +
+
+
+
+
+

{translateTitle('senseBox Dokumentation')}

+

Der Platz für die senseBox-Dokumentation.

+
+
+ +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+
+ {ThumbNailPreviewList.map((props, idx) => ( + + ))} +
+
+ ) + } \ No newline at end of file