diff --git a/admin/src/components/DropFileZone/index.js b/admin/src/components/DropFileZone/index.js
index 00440c2..d3b6888 100644
--- a/admin/src/components/DropFileZone/index.js
+++ b/admin/src/components/DropFileZone/index.js
@@ -4,12 +4,17 @@ import PropTypes from "prop-types";
import DragAndDropIcon from "./DragAndDropIcon";
import { Label, P } from "./styles";
+import { useGlobalContext } from "strapi-helper-plugin";
+import getTrad from '../../utils/getTrad';
+
function DropFileZone({
acceptMimeTypes,
acceptFilesTypes,
onUploadFile,
onUploadError,
}) {
+ const { formatMessage } = useGlobalContext();
+
const validateFile = (file) => {
if (acceptMimeTypes.includes(file.type)) {
onUploadFile(file);
@@ -42,8 +47,8 @@ function DropFileZone({
- Drag & drop your file into this area or{" "} - browse for a file to upload + {formatMessage({ id: getTrad('import.dragAndDrop.firstPart')})}{" "} + {formatMessage({ id: getTrad('import.dragAndDrop.browse')})} {formatMessage({ id: getTrad('import.dragAndDrop.secondPart')})}
{isDragging && ( diff --git a/admin/src/components/ImportForm/index.js b/admin/src/components/ImportForm/index.js index b05f061..2e9ddbc 100644 --- a/admin/src/components/ImportForm/index.js +++ b/admin/src/components/ImportForm/index.js @@ -1,6 +1,9 @@ import React, { useState } from "react"; +import { useGlobalContext } from "strapi-helper-plugin"; function ImportForm() { + const { formatMessage } = useGlobalContext(); + const contentTypes = []; const [contentTypeSelected, setContentType] = useState(""); @@ -10,10 +13,10 @@ function ImportForm() { return (