chore: use getTrad so react-intl works

This commit is contained in:
Josh 2023-01-16 10:43:20 +00:00
parent 7e5bb3b333
commit 7de920548e
3 changed files with 8 additions and 6 deletions

View File

@ -77,6 +77,7 @@ const Notification = ({ dispatch, notification }) => {
{formattedMessage({
id: message?.id || message,
defaultMessage: message?.defaultMessage || message?.id || message,
values: message?.values,
})}
</Alert>
);

View File

@ -9,6 +9,7 @@ import { CarouselAssets } from './Carousel/CarouselAssets';
import { EditFolderDialog } from '../EditFolderDialog';
import { UploadAssetDialog } from '../UploadAssetDialog/UploadAssetDialog';
import getAllowedFiles from '../../utils/getAllowedFiles';
import getTrad from '../../utils/getTrad';
const STEPS = {
AssetSelect: 'SelectAsset',
@ -112,11 +113,11 @@ export const MediaLibraryInput = ({
type: 'warning',
timeout: 4000,
message: {
id: 'input.notification.not-supported',
defaultMessage: `You can't upload this type of file, only the following types are accepted ${fieldAllowedTypes.join(
','
)}`,
assetTypes: fieldAllowedTypes.join(','),
id: getTrad('input.notification.not-supported'),
defaultMessage: `You can't upload this type of file.`,
values: {
fileTypes: fieldAllowedTypes.join(','),
},
},
});
}

View File

@ -38,7 +38,7 @@
"input.placeholder.icon": "Drop the asset in this zone",
"input.url.description": "Separate your URL links by a carriage return.",
"input.url.label": "URL",
"input.notification.not-supported": "You can't upload this type of file.",
"input.notification.not-supported": "You can't upload this type of file, only the following types are accepted {fileTypes}",
"list.assets.title": "Assets ({count})",
"list.asset.at.finished": "The assets have finished loading.",
"list.assets-empty.search": "No result found",