mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
added translation where needed
This commit is contained in:
parent
fafe8ccc59
commit
ea1d2d6a4c
@ -4,7 +4,7 @@ import { motion } from 'framer-motion';
|
|||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import { memo, useRef } from 'react';
|
import { memo, useRef } from 'react';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
type Props = {
|
type Props = {
|
||||||
isOver: boolean;
|
isOver: boolean;
|
||||||
label?: ReactNode;
|
label?: ReactNode;
|
||||||
@ -23,7 +23,8 @@ const exit: AnimationProps['exit'] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const IAIDropOverlay = (props: Props) => {
|
const IAIDropOverlay = (props: Props) => {
|
||||||
const { isOver, label = 'Drop' } = props;
|
const { t } = useTranslation();
|
||||||
|
const { isOver, label = t('gallery.drop') } = props;
|
||||||
const motionId = useRef(uuidv4());
|
const motionId = useRef(uuidv4());
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
@ -3,6 +3,7 @@ import { createMemoizedSelector } from 'app/store/createMemoizedSelector';
|
|||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
import IAIDndImage from 'common/components/IAIDndImage';
|
import IAIDndImage from 'common/components/IAIDndImage';
|
||||||
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
|
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import type {
|
import type {
|
||||||
TypesafeDraggableData,
|
TypesafeDraggableData,
|
||||||
TypesafeDroppableData,
|
TypesafeDroppableData,
|
||||||
@ -20,6 +21,7 @@ const selectInitialImage = createMemoizedSelector(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const InitialImage = () => {
|
const InitialImage = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const initialImage = useAppSelector(selectInitialImage);
|
const initialImage = useAppSelector(selectInitialImage);
|
||||||
const isConnected = useAppSelector((s) => s.system.isConnected);
|
const isConnected = useAppSelector((s) => s.system.isConnected);
|
||||||
@ -62,7 +64,7 @@ const InitialImage = () => {
|
|||||||
fitContainer
|
fitContainer
|
||||||
dropLabel="Set as Initial Image"
|
dropLabel="Set as Initial Image"
|
||||||
noContentFallback={
|
noContentFallback={
|
||||||
<IAINoContentFallback label="No initial image selected" />
|
<IAINoContentFallback label={t('parameters.invoke.noInitialImageSelected')} />
|
||||||
}
|
}
|
||||||
dataTestId="initial-image"
|
dataTestId="initial-image"
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user