diff --git a/src/components/AnnotationManifestsItem.js b/src/components/AnnotationManifestsItem.js index cb277e382ae0d9fd4314a2bae53b14faa71d43b8..326b22807ef217ff0a84c5ad0c555856a183939a 100644 --- a/src/components/AnnotationManifestsItem.js +++ b/src/components/AnnotationManifestsItem.js @@ -7,6 +7,7 @@ import { import Button from '@material-ui/core/Button'; import Tooltip from '@material-ui/core/Tooltip'; import ns from '../config/css-ns'; +import ErrorIcon from '@material-ui/icons/ErrorOutlineSharp'; /** * AnnotationManifestsItem @@ -42,18 +43,16 @@ export class AnnotationManifestsItem extends Component { classes, t, manifestId, thumbnail, title, description, error, ready } = this.props; - if (!ready) { + if (error) { return ( - <Typography> - Chargement de la ressource en cours - </Typography> + <Typography>{t('resourceError', { manifestId })}</Typography> ); } - if (error) { + if (!ready) { return ( <Typography> - Impossible de charger le manifest + <Typography>{t('resourceLoading')}</Typography> </Typography> ); } diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index ed080f8e4541262829bd7ae934093adcadba8dc1..29471e77cec96dad0281ca49f372ecc5e6cfecb0 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -116,6 +116,8 @@ "previousCanvas": "Previous item", "related": "Related", "resource": "Resource", + "resourceError": "Error when loading ressource from {{ manifestId }}", + "resourceLoading": "Loading ressource ... ", "retry": "Retry", "right": "Right", "rights": "License", diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json index 435b6c0bd2b644c8ee80b4ea7cc728997877e9e8..45ce26156c700987ae2c0c192c1fbff6b73a17d2 100644 --- a/src/locales/fr/translation.json +++ b/src/locales/fr/translation.json @@ -112,6 +112,8 @@ "previousCanvas": "Précédent", "related": "En relation", "resource": "Ressource", + "resourceError": "Erreur lors du changement de la ressource {{ manifestId }}", + "resourceLoading": "Chargement en cours de la ressource ... ", "retry": "Réessayer", "right": "Droite", "rights": "Licence",