Added German language

This commit is contained in:
Sebastian Seedorf
2022-08-20 00:30:49 +02:00
parent f826537aec
commit 3fea0f851f
11 changed files with 155 additions and 33 deletions

View File

@@ -9,12 +9,15 @@ import { fixedEncodeURIComponent, uniquify } from '../../../src/utils'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useFactories } from '../../contexts/FactoryProvider'
import { i18n, I18n } from '../../shared/I18n/I18n'
import { useIntl } from 'react-intl'
interface Props {
group: Group
}
const GroupBoxBase: FC<Props> = ({ group }) => {
const intl = useIntl()
const { query } = useRouter()
const { factories, findFactory } = useFactories()
const {
@@ -99,19 +102,25 @@ const GroupBoxBase: FC<Props> = ({ group }) => {
onClick={() => (!isDeleteConfirm ? setDeleteConfirm(true) : removeGroup(name))}
style={{ display: 'block' }}
>
{isDeleteConfirm ? 'Delete GroupBox?' : 'X'}
{isDeleteConfirm ? i18n(intl, 'page.home.group.delete.confirmation') : 'X'}
</button>
<h4>Exported Factories</h4>
<h4>
<I18n id={'page.home.group.item.export'} />
</h4>
<FactorySelect
id={name + '-exports'}
factories={exports}
onSetFactories={setExportFactories}
/>
<h4>Mall Factories</h4>
<h4>
<I18n id={'page.home.group.item.mall'} />
</h4>
<FactorySelect id={name + '-malls'} factories={malls} onSetFactories={setMallFactories} />
{inputs.length ? (
<>
<h4>Input Factories ({inputs.length})</h4>
<h4>
<I18n id={'page.home.group.item.input'} /> ({inputs.length})
</h4>
<div className={styles.flex}>
{inputs.map(input => (
<EntitySpan
@@ -130,7 +139,9 @@ const GroupBoxBase: FC<Props> = ({ group }) => {
) : null}
{intermediates.length ? (
<>
<h4>Intermediate Factories ({intermediates.length})</h4>
<h4>
<I18n id={'page.home.group.item.intermediate'} /> ({intermediates.length})
</h4>
<div className={styles.flex}>
{intermediates.map(intermediate => (
<EntitySpan
@@ -144,7 +155,9 @@ const GroupBoxBase: FC<Props> = ({ group }) => {
) : null}
{suggestionsExport.length ? (
<>
<h4>Suggestions (Export)</h4>
<h4>
<I18n id={'page.home.group.item.suggestion.export'} />
</h4>
<div className={styles.flex}>
{suggestionsExport.map(suggestion => (
<EntitySpan
@@ -164,7 +177,9 @@ const GroupBoxBase: FC<Props> = ({ group }) => {
) : null}
{suggestionMall.length ? (
<>
<h4>Suggestions (Mall)</h4>
<h4>
<I18n id={'page.home.group.item.suggestion.mall'} />
</h4>
<div className={styles.flex}>
{suggestionMall.map(suggestion => (
<EntitySpan