@@ -23,6 +23,7 @@ import {
2323} from 'features/controlLayers/store/paramsSlice' ;
2424import type { ChangeEvent } from 'react' ;
2525import { memo , useCallback , useMemo , useState } from 'react' ;
26+ import { useTranslation } from 'react-i18next' ;
2627import { PiArrowArcLeftBold , PiClockCounterClockwise , PiTrashBold , PiTrashSimpleBold } from 'react-icons/pi' ;
2728
2829export const PositivePromptHistoryIconButton = memo ( ( ) => {
@@ -51,6 +52,7 @@ export const PositivePromptHistoryIconButton = memo(() => {
5152PositivePromptHistoryIconButton . displayName = 'PositivePromptHistoryIconButton' ;
5253
5354const PromptHistoryContent = memo ( ( ) => {
55+ const { t } = useTranslation ( ) ;
5456 const dispatch = useAppDispatch ( ) ;
5557 const positivePromptHistory = useAppSelector ( selectPositivePromptHistory ) ;
5658 const [ searchTerm , setSearchTerm ] = useState ( '' ) ;
@@ -100,12 +102,12 @@ const PromptHistoryContent = memo(() => {
100102 < Flex flexDir = "column" flexGrow = { 1 } minH = { 0 } >
101103 { positivePromptHistory . length === 0 && (
102104 < Flex w = "full" h = "full" alignItems = "center" justifyContent = "center" >
103- < Text color = "base.300" > No prompt history recorded. </ Text >
105+ < Text color = "base.300" > { t ( ' prompt.noPromptHistory' ) } </ Text >
104106 </ Flex >
105107 ) }
106108 { positivePromptHistory . length !== 0 && filteredPrompts . length === 0 && (
107109 < Flex w = "full" h = "full" alignItems = "center" justifyContent = "center" >
108- < Text color = "base.300" > No matching prompts in history. </ Text > { ' ' }
110+ < Text color = "base.300" > { t ( 'prompt.noMatchingPrompts' ) } </ Text > { ' ' }
109111 </ Flex >
110112 ) }
111113 { filteredPrompts . length > 0 && (
@@ -120,7 +122,7 @@ const PromptHistoryContent = memo(() => {
120122 </ Flex >
121123 < Flex alignItems = "center" justifyContent = "center" pt = { 1 } >
122124 < Text color = "base.300" textAlign = "center" >
123- < Kbd textTransform = "lowercase" > alt+up/down</ Kbd > to switch between prompts.
125+ < Kbd textTransform = "lowercase" > alt+up/down</ Kbd > { t ( 'prompt.toSwitchBetweenPrompts' ) }
124126 </ Text >
125127 </ Flex >
126128 </ Flex >
0 commit comments