diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json
index 3b6faf8497..5d6eb56e3e 100644
--- a/invokeai/frontend/web/public/locales/en.json
+++ b/invokeai/frontend/web/public/locales/en.json
@@ -1,7 +1,25 @@
{
"accessibility": {
"modelSelect": "Model Select",
- "invokeProgressBar": "Invoke progress bar"
+ "invokeProgressBar": "Invoke progress bar",
+ "reset": "Reset",
+ "uploadImage": "Upload Image",
+ "previousImage": "Previous Image",
+ "nextImage": "Next Image",
+ "useThisParameter": "Use this parameter",
+ "copyMetadataJson": "Copy metadata JSON",
+ "exitViewer": "ExitViewer",
+ "zoomIn": "Zoom In",
+ "zoomOut": "Zoom Out",
+ "rotateCounterClockwise": "Rotate Counter-Clockwise",
+ "rotateClockwise": "Rotate Clockwise",
+ "flipHorizontally": "Flip Horizontally",
+ "flipVertically": "Flip Vertically",
+ "modifyConfig": "Modify Config",
+ "toggleAutoscroll": "Toggle autoscroll",
+ "toggleLogViewer": "Toggle Log Viewer",
+ "showGallery": "Show Gallery",
+ "showOptionsPanel": "Show Options Panel"
},
"common": {
"hotkeysLabel": "Hotkeys",
diff --git a/invokeai/frontend/web/src/common/components/IAISlider.tsx b/invokeai/frontend/web/src/common/components/IAISlider.tsx
index 1acc64db23..af67d997d9 100644
--- a/invokeai/frontend/web/src/common/components/IAISlider.tsx
+++ b/invokeai/frontend/web/src/common/components/IAISlider.tsx
@@ -26,6 +26,7 @@ import {
import { clamp } from 'lodash';
import { FocusEvent, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { BiReset } from 'react-icons/bi';
import IAIIconButton, { IAIIconButtonProps } from './IAIIconButton';
@@ -96,6 +97,8 @@ export default function IAISlider(props: IAIFullSliderProps) {
...rest
} = props;
+ const { t } = useTranslation();
+
const [localInputValue, setLocalInputValue] = useState<
string | number | undefined
>(String(value));
@@ -234,7 +237,7 @@ export default function IAISlider(props: IAIFullSliderProps) {
{withReset && (
}
onClick={handleResetDisable}
diff --git a/invokeai/frontend/web/src/common/components/ImageUploaderIconButton.tsx b/invokeai/frontend/web/src/common/components/ImageUploaderIconButton.tsx
index d3c7e4f7b4..169651cbc8 100644
--- a/invokeai/frontend/web/src/common/components/ImageUploaderIconButton.tsx
+++ b/invokeai/frontend/web/src/common/components/ImageUploaderIconButton.tsx
@@ -1,14 +1,16 @@
import { ImageUploaderTriggerContext } from 'app/contexts/ImageUploaderTriggerContext';
import { useContext } from 'react';
+import { useTranslation } from 'react-i18next';
import { FaUpload } from 'react-icons/fa';
import IAIIconButton from './IAIIconButton';
const ImageUploaderIconButton = () => {
+ const { t } = useTranslation();
const openImageUploader = useContext(ImageUploaderTriggerContext);
return (
}
onClick={openImageUploader || undefined}
diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx
index 192b832454..ce10e255c1 100644
--- a/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/ImageMetaDataViewer/ImageMetadataViewer.tsx
@@ -42,6 +42,7 @@ import {
import { setShouldShowImageDetails } from 'features/ui/store/uiSlice';
import { memo } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
+import { useTranslation } from 'react-i18next';
import { FaCopy } from 'react-icons/fa';
import { IoArrowUndoCircleOutline } from 'react-icons/io5';
import { APP_METADATA_HEIGHT } from 'theme/util/constants';
@@ -66,12 +67,14 @@ const MetadataItem = ({
labelPosition,
withCopy = false,
}: MetadataItemProps) => {
+ const { t } = useTranslation();
+
return (
{onClick && (
}
size="xs"
variant="ghost"
@@ -162,6 +165,8 @@ const ImageMetadataViewer = memo(
width,
} = metadata;
+ const { t } = useTranslation();
+
const metadataJSON = JSON.stringify(image.metadata, null, 2);
return (
@@ -422,7 +427,7 @@ const ImageMetadataViewer = memo(
}
size="xs"
variant="ghost"
diff --git a/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx
index 0cf41cb057..2da7579fd9 100644
--- a/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/NextPrevImageButtons.tsx
@@ -3,6 +3,7 @@ import { createSelector } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'app/storeHooks';
import { isEqual } from 'lodash';
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { FaAngleLeft, FaAngleRight } from 'react-icons/fa';
import { gallerySelector } from '../store/gallerySelectors';
import {
@@ -51,6 +52,7 @@ export const nextPrevImageButtonsSelector = createSelector(
const NextPrevImageButtons = () => {
const dispatch = useAppDispatch();
+ const { t } = useTranslation();
const { isOnFirstImage, isOnLastImage } = useAppSelector(
nextPrevImageButtonsSelector
@@ -95,7 +97,7 @@ const NextPrevImageButtons = () => {
>
{shouldShowNextPrevButtons && !isOnFirstImage && (
}
variant="unstyled"
onClick={handleClickPrevButton}
@@ -114,7 +116,7 @@ const NextPrevImageButtons = () => {
>
{shouldShowNextPrevButtons && !isOnLastImage && (
}
variant="unstyled"
onClick={handleClickNextButton}
diff --git a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx b/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx
index 79b2655583..5f792901aa 100644
--- a/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx
+++ b/invokeai/frontend/web/src/features/lightbox/components/Lightbox.tsx
@@ -38,6 +38,7 @@ export const lightboxSelector = createSelector(
export default function Lightbox() {
const dispatch = useAppDispatch();
+ const { t } = useTranslation();
const isLightBoxOpen = useAppSelector(
(state: RootState) => state.lightbox.isLightboxOpen
);
@@ -96,7 +97,7 @@ export default function Lightbox() {
>
}
- aria-label="Exit Viewer"
+ aria-label={t('accessibility.exitViewer')}
onClick={() => {
dispatch(setIsLightboxOpen(false));
}}
diff --git a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx
index fffe609ab7..ee9be65cc1 100644
--- a/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx
+++ b/invokeai/frontend/web/src/features/lightbox/components/ReactPanZoomButtons.tsx
@@ -1,5 +1,6 @@
import { ButtonGroup } from '@chakra-ui/react';
import IAIIconButton from 'common/components/IAIIconButton';
+import { useTranslation } from 'react-i18next';
import {
BiReset,
BiRotateLeft,
@@ -26,12 +27,13 @@ const ReactPanZoomButtons = ({
reset,
}: ReactPanZoomButtonsProps) => {
const { zoomIn, zoomOut, resetTransform } = useTransformContext();
+ const { t } = useTranslation();
return (
}
- aria-label="Zoom In"
+ aria-label={t('accessibility.zoomIn')}
tooltip="Zoom In"
onClick={() => zoomIn()}
fontSize={20}
@@ -39,7 +41,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Zoom Out"
+ aria-label={t('accessibility.zoomOut')}
tooltip="Zoom Out"
onClick={() => zoomOut()}
fontSize={20}
@@ -47,7 +49,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Rotate Counter-Clockwise"
+ aria-label={t('accessibility.rotateCounterClockwise')}
tooltip="Rotate Counter-Clockwise"
onClick={rotateCounterClockwise}
fontSize={20}
@@ -55,7 +57,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Rotate Clockwise"
+ aria-label={t('accessibility.rotateClockwise')}
tooltip="Rotate Clockwise"
onClick={rotateClockwise}
fontSize={20}
@@ -63,7 +65,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Flip Horizontally"
+ aria-label={t('accessibility.flipHorizontally')}
tooltip="Flip Horizontally"
onClick={flipHorizontally}
fontSize={20}
@@ -71,7 +73,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Flip Vertically"
+ aria-label={t('accessibility.flipVertically')}
tooltip="Flip Vertically"
onClick={flipVertically}
fontSize={20}
@@ -79,7 +81,7 @@ const ReactPanZoomButtons = ({
}
- aria-label="Reset"
+ aria-label={t('accessibility.reset')}
tooltip="Reset"
onClick={() => {
resetTransform();
diff --git a/invokeai/frontend/web/src/features/system/components/Console.tsx b/invokeai/frontend/web/src/features/system/components/Console.tsx
index 562b339c59..226c96ea13 100644
--- a/invokeai/frontend/web/src/features/system/components/Console.tsx
+++ b/invokeai/frontend/web/src/features/system/components/Console.tsx
@@ -11,6 +11,7 @@ import { isEqual } from 'lodash';
import { Resizable } from 're-resizable';
import { useLayoutEffect, useRef, useState } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
+import { useTranslation } from 'react-i18next';
import { FaAngleDoubleDown, FaCode, FaMinus } from 'react-icons/fa';
import { systemSelector } from '../store/systemSelectors';
@@ -46,6 +47,7 @@ const consoleSelector = createSelector(
*/
const Console = () => {
const dispatch = useAppDispatch();
+ const { t } = useTranslation();
const log = useAppSelector(logSelector);
const { shouldShowLogViewer, hasError, wasErrorSeen } =
useAppSelector(consoleSelector);
@@ -156,7 +158,7 @@ const Console = () => {
>
}
onClick={() => setShouldAutoscroll(!shouldAutoscroll)}
isChecked={shouldAutoscroll}
@@ -175,7 +177,7 @@ const Console = () => {
>
: }
onClick={handleClickLogViewerToggle}
sx={{
diff --git a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx
index 9b2b6d29f4..6b9e4d1cfd 100644
--- a/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx
+++ b/invokeai/frontend/web/src/features/system/components/ModelManager/ModelListItem.tsx
@@ -94,7 +94,7 @@ export default function ModelListItem(props: ModelListItemProps) {
icon={}
size="sm"
onClick={openModelHandler}
- aria-label="Modify Config"
+ aria-label={t('accessibility.modifyConfig')}
isDisabled={status === 'active' || isProcessing || !isConnected}
/>
{
+ const { t } = useTranslation();
const dispatch = useAppDispatch();
const { shouldShowGalleryButton, shouldPinGallery } =
useAppSelector(floatingSelector);
@@ -21,7 +23,7 @@ const FloatingGalleryButton = () => {
{
const dispatch = useAppDispatch();
+ const { t } = useTranslation();
const {
shouldShowParametersPanelButton,
shouldShowProcessButtons,
@@ -95,7 +97,7 @@ const FloatingParametersPanelButtons = () => {