Internationalize failed img retry text (#551)
This commit is contained in:
@@ -13,6 +13,7 @@ import { Theme, SxProps, Stack, Button } from '@mui/material';
|
|||||||
|
|
||||||
import BrokenImageIcon from '@mui/icons-material/BrokenImage';
|
import BrokenImageIcon from '@mui/icons-material/BrokenImage';
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
src: string;
|
src: string;
|
||||||
@@ -29,6 +30,8 @@ interface IProps {
|
|||||||
export function SpinnerImage(props: IProps) {
|
export function SpinnerImage(props: IProps) {
|
||||||
const { src, alt, onImageLoad, imgRef, spinnerStyle, imgStyle } = props;
|
const { src, alt, onImageLoad, imgRef, spinnerStyle, imgStyle } = props;
|
||||||
|
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const [imgLoadRetryKey, setImgLoadRetryKey] = useState(0);
|
const [imgLoadRetryKey, setImgLoadRetryKey] = useState(0);
|
||||||
const [isLoading, setIsLoading] = useState<boolean | undefined>(undefined);
|
const [isLoading, setIsLoading] = useState<boolean | undefined>(undefined);
|
||||||
const [hasError, setHasError] = useState(false);
|
const [hasError, setHasError] = useState(false);
|
||||||
@@ -69,7 +72,7 @@ export function SpinnerImage(props: IProps) {
|
|||||||
}}
|
}}
|
||||||
size="large"
|
size="large"
|
||||||
>
|
>
|
||||||
Retry
|
{t('global.button.retry')}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -286,6 +286,7 @@
|
|||||||
"reset_to_default": "Reset to Default",
|
"reset_to_default": "Reset to Default",
|
||||||
"restore": "Restore",
|
"restore": "Restore",
|
||||||
"resume": "Resume",
|
"resume": "Resume",
|
||||||
|
"retry": "Retry",
|
||||||
"select": "Select",
|
"select": "Select",
|
||||||
"select_all": "Select all",
|
"select_all": "Select all",
|
||||||
"set": "Set",
|
"set": "Set",
|
||||||
|
|||||||
Reference in New Issue
Block a user