fix(gui): translate tab labels
This commit is contained in:
parent
19b84ed28d
commit
a7568dbef1
|
@ -5,6 +5,7 @@ import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|||
import { Allotment } from 'allotment';
|
||||
import * as React from 'react';
|
||||
import { useContext, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useHash } from 'react-use/lib/useHash';
|
||||
import { useStore } from 'zustand';
|
||||
|
||||
|
@ -126,6 +127,7 @@ export function TabGroup(props: TabGroupProps) {
|
|||
const layout = LAYOUT_STYLES[props.direction];
|
||||
|
||||
const [hash, setHash] = useHash();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return <Stack direction='column' minWidth={layout.control.width} sx={{ mx: STANDARD_MARGIN }}>
|
||||
<TabContext value={getTab(hash)}>
|
||||
|
@ -133,7 +135,7 @@ export function TabGroup(props: TabGroupProps) {
|
|||
<TabList onChange={(_e, idx) => {
|
||||
setHash(idx);
|
||||
}}>
|
||||
{TAB_LABELS.map((name) => <Tab key={name} label={name} value={name} />)}
|
||||
{TAB_LABELS.map((name) => <Tab key={name} label={t(`tab.${name}`)} value={name} />)}
|
||||
</TabList>
|
||||
</Box>
|
||||
<TabPanel value='txt2img'>
|
||||
|
|
|
@ -75,7 +75,7 @@ export const I18N_STRINGS_DE = {
|
|||
},
|
||||
loading: {
|
||||
cancel: 'Stornieren',
|
||||
progress: '{{current}} von {{total}} Schritten, {{tiles.current}} of {{tiles.total}} Kacheln, {{stages.current}} of {{stages.total}} Abschnitten',
|
||||
progress: '{{steps.current}} von {{steps.total}} Schritten, {{tiles.current}} of {{tiles.total}} Kacheln, {{stages.current}} of {{stages.total}} Abschnitten',
|
||||
queue: '{{current}} von {{total}} in der Warteschlange',
|
||||
server: 'Verbindung zum Server...',
|
||||
unknown: 'vielen',
|
||||
|
@ -248,6 +248,8 @@ export const I18N_STRINGS_DE = {
|
|||
blend: 'Mischung',
|
||||
img2img: 'Img2img',
|
||||
inpaint: '',
|
||||
models: 'Modelle',
|
||||
settings: 'Einstellungen',
|
||||
txt2txt: 'Txt2txt',
|
||||
txt2img: 'Txt2img',
|
||||
upscale: 'Vergrößern',
|
||||
|
|
|
@ -329,6 +329,8 @@ export const I18N_STRINGS_EN = {
|
|||
blend: 'Blend',
|
||||
img2img: 'Img2img',
|
||||
inpaint: 'Inpaint',
|
||||
models: 'Models',
|
||||
settings: 'Settings',
|
||||
txt2txt: 'Txt2txt',
|
||||
txt2img: 'Txt2img',
|
||||
upscale: 'Upscale',
|
||||
|
|
|
@ -250,6 +250,8 @@ export const I18N_STRINGS_ES = {
|
|||
blend: 'Mezclar',
|
||||
img2img: 'Img2img',
|
||||
inpaint: 'Inpaint',
|
||||
models: '',
|
||||
settings: '',
|
||||
txt2txt: 'Txt2txt',
|
||||
txt2img: 'Txt2img',
|
||||
upscale: 'Aumentar',
|
||||
|
|
|
@ -250,6 +250,8 @@ export const I18N_STRINGS_FR = {
|
|||
blend: '',
|
||||
img2img: '',
|
||||
inpaint: '',
|
||||
models: '',
|
||||
settings: '',
|
||||
txt2txt: '',
|
||||
txt2img: '',
|
||||
upscale: '',
|
||||
|
|
Loading…
Reference in New Issue