mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add missing translations
This commit is contained in:
parent
5d068c1da1
commit
580d29257c
@ -203,7 +203,11 @@
|
||||
"prevPage": "Previous Page",
|
||||
"nextPage": "Next Page",
|
||||
"unknownError": "Unknown Error",
|
||||
"unsaved": "Unsaved"
|
||||
"unsaved": "Unsaved",
|
||||
"red": "Red",
|
||||
"green": "Green",
|
||||
"blue": "Blue",
|
||||
"alpha": "Alpha"
|
||||
},
|
||||
"controlnet": {
|
||||
"controlAdapter_one": "Control Adapter",
|
||||
@ -703,6 +707,7 @@
|
||||
"clearCheckpointFolder": "Clear Checkpoint Folder",
|
||||
"closeAdvanced": "Close Advanced",
|
||||
"config": "Config",
|
||||
"configFile": "Config File",
|
||||
"configValidationMsg": "Path to the config file of your model.",
|
||||
"conversionNotSupported": "Conversion Not Supported",
|
||||
"convert": "Convert",
|
||||
|
@ -12,6 +12,7 @@ import type {
|
||||
ColorPickerBaseProps,
|
||||
RgbaColor,
|
||||
} from 'react-colorful/dist/types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
type IAIColorPickerProps = ColorPickerBaseProps<RgbaColor> & {
|
||||
withNumberInput?: boolean;
|
||||
@ -37,6 +38,7 @@ const numberInputWidth: ChakraProps['w'] = '4.2rem';
|
||||
|
||||
const IAIColorPicker = (props: IAIColorPickerProps) => {
|
||||
const { color, onChange, withNumberInput, ...rest } = props;
|
||||
const { t } = useTranslation();
|
||||
const handleChangeR = useCallback(
|
||||
(r: number) => onChange({ ...color, r }),
|
||||
[color, onChange]
|
||||
@ -64,7 +66,7 @@ const IAIColorPicker = (props: IAIColorPickerProps) => {
|
||||
{withNumberInput && (
|
||||
<Flex>
|
||||
<FormControl>
|
||||
<FormLabel>Red</FormLabel>
|
||||
<FormLabel>{t('common.red')}</FormLabel>
|
||||
<CompositeNumberInput
|
||||
value={color.r}
|
||||
onChange={handleChangeR}
|
||||
@ -76,7 +78,7 @@ const IAIColorPicker = (props: IAIColorPickerProps) => {
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormLabel>Green</FormLabel>
|
||||
<FormLabel>{t('common.green')}</FormLabel>
|
||||
<CompositeNumberInput
|
||||
value={color.g}
|
||||
onChange={handleChangeG}
|
||||
@ -88,7 +90,7 @@ const IAIColorPicker = (props: IAIColorPickerProps) => {
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormLabel>Blue</FormLabel>
|
||||
<FormLabel>{t('common.blue')}</FormLabel>
|
||||
<CompositeNumberInput
|
||||
value={color.b}
|
||||
onChange={handleChangeB}
|
||||
@ -100,7 +102,7 @@ const IAIColorPicker = (props: IAIColorPickerProps) => {
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl>
|
||||
<FormLabel>Alpha</FormLabel>
|
||||
<FormLabel>{t('common.alpha')}</FormLabel>
|
||||
<CompositeNumberInput
|
||||
value={color.a}
|
||||
onChange={handleChangeA}
|
||||
|
@ -190,7 +190,7 @@ const CheckpointModelEdit = (props: CheckpointModelEditProps) => {
|
||||
</FormControl>
|
||||
)}
|
||||
<FormControl>
|
||||
<FormLabel>Use Custom Config</FormLabel>
|
||||
<FormLabel>{t('modelManager.useCustomConfig')}</FormLabel>
|
||||
<Checkbox
|
||||
isChecked={useCustomConfig}
|
||||
onChange={handleChangeUseCustomConfig}
|
||||
|
@ -6,6 +6,7 @@ import type {
|
||||
import { Combobox, FormControl, FormLabel } from '@invoke-ai/ui';
|
||||
import { memo, useCallback, useMemo } from 'react';
|
||||
import { useController, type UseControllerProps } from 'react-hook-form';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useGetCheckpointConfigsQuery } from 'services/api/endpoints/models';
|
||||
import type { CheckpointModelConfig } from 'services/api/types';
|
||||
|
||||
@ -15,6 +16,7 @@ const CheckpointConfigsSelect = (
|
||||
props: UseControllerProps<CheckpointModelConfig>
|
||||
) => {
|
||||
const { data } = useGetCheckpointConfigsQuery();
|
||||
const { t } = useTranslation();
|
||||
const options = useMemo<ComboboxOption[]>(
|
||||
() => (data ? data.map((i) => ({ label: i, value: i })) : []),
|
||||
[data]
|
||||
@ -33,7 +35,7 @@ const CheckpointConfigsSelect = (
|
||||
|
||||
return (
|
||||
<FormControl>
|
||||
<FormLabel>Config File</FormLabel>
|
||||
<FormLabel>{t('modelManager.configFile')}</FormLabel>
|
||||
<Combobox
|
||||
placeholder="Select A Config File"
|
||||
value={value}
|
||||
|
Loading…
Reference in New Issue
Block a user