diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 53b5963821..0a321dcc11 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -64,6 +64,8 @@ "trainingDesc2": "InvokeAI already supports training custom embeddings using Textual Inversion using the main script.", "upload": "Upload", "close": "Close", + "cancel": "Cancel", + "accept": "Accept", "load": "Load", "back": "Back", "statusConnected": "Connected", diff --git a/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx b/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx index 4116182b1a..bd919c162a 100644 --- a/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx +++ b/invokeai/frontend/web/src/common/components/IAIAlertDialog.tsx @@ -9,6 +9,7 @@ import { useDisclosure, } from '@chakra-ui/react'; import { cloneElement, memo, ReactElement, ReactNode, useRef } from 'react'; +import { useTranslation } from 'react-i18next'; import IAIButton from './IAIButton'; type Props = { @@ -22,10 +23,12 @@ type Props = { }; const IAIAlertDialog = forwardRef((props: Props, ref) => { + const { t } = useTranslation(); + const { - acceptButtonText = 'Accept', + acceptButtonText = t('common.accept'), acceptCallback, - cancelButtonText = 'Cancel', + cancelButtonText = t('common.cancel'), cancelCallback, children, title,