Added German language
This commit is contained in:
@@ -1,15 +1,25 @@
|
||||
import { FC, useState } from 'react'
|
||||
import { FactorySelect } from '../FactorySelect/FactorySelect'
|
||||
import { useGroups } from '../../contexts/GroupProvider'
|
||||
import { i18n, I18n } from '../../shared/I18n/I18n'
|
||||
import { useIntl } from 'react-intl'
|
||||
|
||||
export const Preferences: FC = () => {
|
||||
const intl = useIntl()
|
||||
const { addGroup, baseFactories, setBaseFactories, ignoredFactories, setIgnoredFactories } =
|
||||
useGroups()
|
||||
const [newGroupValue, setNewGroupValue] = useState('New group')
|
||||
const [newGroupValue, setNewGroupValue] = useState(
|
||||
i18n(intl, 'page.home.group.add.default_group_name')
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<fieldset>
|
||||
<legend>Basic Values</legend>
|
||||
<legend>
|
||||
<I18n id={'page.home.pref.basic.title'} />
|
||||
</legend>
|
||||
<span>
|
||||
<I18n id={'page.home.pref.basic.description'} />
|
||||
</span>
|
||||
<FactorySelect
|
||||
id={'baseFactoriesSelect'}
|
||||
factories={baseFactories}
|
||||
@@ -18,7 +28,12 @@ export const Preferences: FC = () => {
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Ignored Values</legend>
|
||||
<legend>
|
||||
<I18n id={'page.home.pref.ignored.title'} />
|
||||
</legend>
|
||||
<span>
|
||||
<I18n id={'page.home.pref.ignored.description'} />
|
||||
</span>
|
||||
<FactorySelect
|
||||
id={'ignoredFactoriesSelect'}
|
||||
factories={ignoredFactories}
|
||||
@@ -26,7 +41,9 @@ export const Preferences: FC = () => {
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Add new groups</legend>
|
||||
<legend>
|
||||
<I18n id={'page.home.group.add.title'} />
|
||||
</legend>
|
||||
<input value={newGroupValue} onChange={e => setNewGroupValue(e.target.value)} />
|
||||
<button
|
||||
disabled={!newGroupValue}
|
||||
@@ -35,7 +52,7 @@ export const Preferences: FC = () => {
|
||||
setNewGroupValue('New group')
|
||||
}}
|
||||
>
|
||||
Add group "{newGroupValue}"
|
||||
<I18n id={'page.home.group.add.button_text'} values={{ name: newGroupValue }} />
|
||||
</button>
|
||||
</fieldset>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user