Skip to content

Commit 3fb6c99

Browse files
committed
(#6140) Changed german translations and logic to receive component list by version
1 parent 44c14b6 commit 3fb6c99

File tree

19 files changed

+970
-302
lines changed

19 files changed

+970
-302
lines changed

dev/i18n/de/code.json

Lines changed: 68 additions & 68 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"title": {
33
"message": "Blog",
4-
"description": "The title for the blog used in SEO"
4+
"description": "Der Titel für den Blog, der im SEO verwendet wird"
55
},
66
"description": {
77
"message": "Blog",
8-
"description": "The description for the blog used in SEO"
8+
"description": "Die Beschreibung für den Blog, die im SEO verwendet wird"
99
},
1010
"sidebar.title": {
1111
"message": "Neuste Beiträge",
12-
"description": "The label for the left sidebar"
12+
"description": "Die Bezeichnung für die linke Seitenleiste"
1313
}
1414
}

dev/i18n/de/docusaurus-plugin-content-docs/current.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
22
"version.label": {
33
"message": "Next",
4-
"description": "The label for version current"
4+
"description": "Die Bezeichnung für die aktuelleste Version"
55
},
66
"sidebar.tutorialSidebar.category.Motivation": {
77
"message": "Motivation"
88
},
99
"sidebar.tutorialSidebar.category.Motivation.link.generated-index.description": {
10-
"message": "5 minutes to learn the most important Docusaurus concepts."
10+
"message": "5 Minuten, um die wichtigsten Docusaurus-Konzepte zu lernen."
1111
},
1212
"sidebar.tutorialSidebar.category.Tutorial - Basics": {
13-
"message": "Tutorial - Basics"
13+
"message": "Tutorial - Grundlagen"
1414
},
1515
"sidebar.tutorialSidebar.category.Tutorial - Basics.link.generated-index.description": {
16-
"message": "5 minutes to learn the most important Docusaurus concepts."
16+
"message": "5 Minuten, um die wichtigsten Docusaurus-Konzepte zu lernen."
1717
},
1818
"sidebar.tutorialSidebar.category.Tutorial - Extras": {
1919
"message": "Tutorial - Extras"
2020
},
2121
"sidebar.tutorialSidebar.category.Get Started": {
2222
"message": "Get Started",
23-
"description": "The label for category Get Started in sidebar tutorialSidebar"
23+
"description": "Die Bezeichnung für die Kategorie Get Started in der Seitenleiste tutorialSidebar."
2424
},
2525
"sidebar.tutorialSidebar.category.Konzepte": {
2626
"message": "Konzepte",
27-
"description": "The label for category Konzepte in sidebar tutorialSidebar"
27+
"description": "Die Bezeichnung für die Kategorie Konzepte in der Seitenleiste tutorialSidebar."
2828
},
2929
"sidebar.tutorialSidebar.category.Styling & Design": {
3030
"message": "Styling & Design",
31-
"description": "The label for category Styling & Design in sidebar tutorialSidebar"
31+
"description": "Die Bezeichnung für die Kategorie Styling & Design in der Seitenleiste tutorialSidebar."
3232
},
3333
"sidebar.tutorialSidebar.category.Komponenten": {
3434
"message": "Komponenten",
35-
"description": "The label for category Komponenten in sidebar tutorialSidebar"
35+
"description": "Die Bezeichnung für die Kategorie Komponenten in der Seitenleiste tutorialSidebar."
3636
},
3737
"sidebar.tutorialSidebar.category.components": {
3838
"message": "components"
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"link.title.Inhalte": {
33
"message": "Inhalte",
4-
"description": "The title of the footer links column with title=Inhalte in the footer"
4+
"description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Inhalte in der Fußzeile"
55
},
66
"link.title.Community": {
77
"message": "Community",
8-
"description": "The title of the footer links column with title=Community in the footer"
8+
"description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Community in der Fußzeile"
99
},
1010
"link.title.Mehr": {
1111
"message": "Mehr",
12-
"description": "The title of the footer links column with title=Mehr in the footer"
12+
"description": "Der Titel der Fußzeilen-Linkspalte mit dem Titel=Mehr in der Fußzeile"
1313
},
1414
"link.item.label.Dokumentation": {
1515
"message": "Dokumentation",
16-
"description": "The label of footer link with label=Dokumentation linking to /docs"
16+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Dokumentation, die auf /docs verweist"
1717
},
1818
"link.item.label.Blog": {
1919
"message": "Blog",
20-
"description": "The label of footer link with label=Blog linking to /blog"
20+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Blog, die auf /blog verweist"
2121
},
2222
"link.item.label.Designer": {
2323
"message": "Designer"
@@ -33,34 +33,34 @@
3333
},
3434
"link.item.label.GitHub": {
3535
"message": "GitHub",
36-
"description": "The label of footer link with label=GitHub linking to https://github.com/public-ui"
36+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=GitHub, die auf https://github.com/public-ui verweist"
3737
},
3838
"link.item.label.ITZBund": {
3939
"message": "ITZBund",
40-
"description": "The label of footer link with label=ITZBund linking to https://itzbund.de"
40+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=ITZBund, die auf https://itzbund.de verweist"
4141
},
4242
"link.item.label.Portal Barrierefreiheit": {
4343
"message": "Portal Barrierefreiheit",
44-
"description": "The label of footer link with label=Portal Barrierefreiheit linking to https://www.barrierefreiheit-dienstekonsolidierung.bund.de/"
44+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Portal Barrierefreiheit, die auf https://www.barrierefreiheit-dienstekonsolidierung.bund.de/ verweist"
4545
},
4646
"copyright": {
4747
"message": "© Informationstechnikzentrum Bund (ITZBund) 2020 - 2023",
48-
"description": "The footer copyright"
48+
"description": "Das Fußzeilen-Copyright"
4949
},
5050
"link.item.label.FAQ": {
5151
"message": "FAQ",
52-
"description": "The label of footer link with label=FAQ linking to https://github.com/public-ui/kolibri/discussions"
52+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=FAQ, die auf https://github.com/public-ui/kolibri/discussions verweist"
5353
},
5454
"link.item.label.Mastodon": {
5555
"message": "Mastodon",
56-
"description": "The label of footer link with label=Mastodon linking to https://social.bund.de/@kolibri"
56+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Mastodon, die auf https://social.bund.de/@kolibri verweist"
5757
},
5858
"link.item.label.Impressum": {
5959
"message": "Impressum",
60-
"description": "The label of footer link with label=Impressum linking to /docs/impressum"
60+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Impressum, die auf /docs/impressum verweist"
6161
},
6262
"link.item.label.Community of Practices": {
6363
"message": "Community of Practices",
64-
"description": "The label of footer link with label=Community of Practices linking to https://github.com/public-ui/kolibri/discussions/516"
64+
"description": "Die Bezeichnung des Fußzeilen-Links mit der Bezeichnung=Community of Practices, die auf https://github.com/public-ui/kolibri/discussions/516 verweist"
6565
}
6666
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"title": {
33
"message": "KoliBri",
4-
"description": "The title in the navbar"
4+
"description": "Der Titel in der Navigationsleiste"
55
},
66
"item.label.Dokumentation": {
77
"message": "Dokumentation",
8-
"description": "Navbar item with label Dokumentation"
8+
"description": "Navigationsleisten-Element mit der Bezeichnung Dokumentation"
99
},
1010
"item.label.Blog": {
1111
"message": "Blog",
12-
"description": "Navbar item with label Blog"
12+
"description": "Navigationsleisten-Element mit der Bezeichnung Blog"
1313
},
1414
"item.label.Designer": {
1515
"message": "Designer"
@@ -19,6 +19,6 @@
1919
},
2020
"logo.alt": {
2121
"message": "KoliBri Logo",
22-
"description": "The alt text of navbar logo"
22+
"description": "Der Alt-Text des Navigationsleisten-Logos"
2323
}
2424
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Components
3+
description: On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
4+
tags:
5+
- Examples
6+
---
7+
8+
import { ComponentList } from '@site/src/components/docs/ComponentList';
9+
10+
# Components
11+
12+
On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
13+
14+
<ComponentList lang="en" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Components
3+
description: On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
4+
tags:
5+
- Examples
6+
---
7+
8+
import { ComponentList } from '@site/src/components/docs/ComponentList';
9+
10+
# Components
11+
12+
On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
13+
14+
<ComponentList lang="en" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Components
3+
description: On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
4+
tags:
5+
- Examples
6+
---
7+
8+
import { ComponentList } from '@site/src/components/docs/ComponentList';
9+
10+
# Components
11+
12+
On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
13+
14+
<ComponentList lang="en" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Components
3+
description: On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
4+
tags:
5+
- Examples
6+
---
7+
8+
import { ComponentList } from '@site/src/components/docs/ComponentList';
9+
10+
# Components
11+
12+
On the following pages, you will find an overview of all the components available in KoliBri. The components are divided into different categories, which you can access via the menu on the left.
13+
14+
<ComponentList lang="en" />

dev/src/components/docs/ComponentList.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ import { useHistory } from 'react-router-dom';
44
import { KolCard } from '@public-ui/react';
55

66
import type { Language } from '../../shares/language';
7+
import type { Version } from '../../shares/version';
78
import type { Component } from '../samplePreviews';
8-
import { components } from '../samplePreviews';
9+
import { COMPONENT_VERSIONS } from "../samplePreviews/version"
910

10-
type Props = Language;
11+
type Props = Language & {
12+
version?: Version
13+
}
1114

1215
const LazyLoadComponent: FC<Component & Language> = ({ name, lang, loadComponent }) => {
1316
const history = useHistory();
@@ -60,10 +63,14 @@ const LazyLoadComponent: FC<Component & Language> = ({ name, lang, loadComponent
6063
);
6164
};
6265

63-
export const ComponentList: FC<Props> = ({ lang }) => (
64-
<div className="components-overview">
65-
{components.map(({ name, loadComponent }) => (
66-
<LazyLoadComponent key={name} name={name} lang={lang} loadComponent={loadComponent} />
67-
))}
68-
</div>
69-
);
66+
export const ComponentList: FC<Props> = ({ lang, version }) => {
67+
const components = COMPONENT_VERSIONS?.[version ?? "current"] as Component[]
68+
if (components?.length <= 0) return null
69+
return (
70+
<div className="components-overview">
71+
{components.map(({ name, loadComponent }) => (
72+
<LazyLoadComponent key={name} name={name} lang={lang} loadComponent={loadComponent} />
73+
))}
74+
</div>
75+
)
76+
};

0 commit comments

Comments
 (0)