;
-export const GalleryFallbackText = ({children, className, ...props}: GalleryFallbackTextProps) => (
-
- {children || i18n('cannot-display-file')}
-
-);
+export const GalleryFallbackText = ({children, className, ...props}: GalleryFallbackTextProps) => {
+ const {t} = i18n.useTranslation();
+
+ return (
+
+ {children || t('cannot-display-file')}
+
+ );
+};
diff --git a/src/components/Gallery/components/MobileGalleryHeader/MobileGalleryHeader.tsx b/src/components/Gallery/components/MobileGalleryHeader/MobileGalleryHeader.tsx
index 5ca5d817..dc3b3e35 100644
--- a/src/components/Gallery/components/MobileGalleryHeader/MobileGalleryHeader.tsx
+++ b/src/components/Gallery/components/MobileGalleryHeader/MobileGalleryHeader.tsx
@@ -34,6 +34,8 @@ export const MobileGalleryHeader = ({
hidden,
interactive,
}: MobileGalleryHeaderProps) => {
+ const {t} = i18n.useTranslation();
+
const [mobileActionsOpen, setMobileActionsOpen] = React.useState(false);
const handleMobileActionClose = React.useCallback(() => {
@@ -58,7 +60,7 @@ export const MobileGalleryHeader = ({
size="xl"
view="flat"
onClick={onBackClick}
- aria-label={i18n('back')}
+ aria-label={t('back')}
color="primary"
>
@@ -75,7 +77,7 @@ export const MobileGalleryHeader = ({
size="xl"
view="flat"
onClick={handleMobileActionClick}
- aria-label={i18n('close')}
+ aria-label={t('close')}
color="primary"
className={cnGalleryHeaderMobile('button-actions')}
>
diff --git a/src/components/Gallery/components/actions/FullScreenAction/FullScreenAction.tsx b/src/components/Gallery/components/actions/FullScreenAction/FullScreenAction.tsx
index a7d30000..d1761b2e 100644
--- a/src/components/Gallery/components/actions/FullScreenAction/FullScreenAction.tsx
+++ b/src/components/Gallery/components/actions/FullScreenAction/FullScreenAction.tsx
@@ -13,13 +13,15 @@ export type FullScreenActionProps = {
export const FullScreenAction = React.memo(
({fullScreen, onUpdateFullScreen, ...buttonProps}: FullScreenActionProps) => {
+ const {t} = i18n.useTranslation();
+
const handleToggleFullScreen = React.useCallback(() => {
onUpdateFullScreen((value) => !value);
}, [onUpdateFullScreen]);
return (