diff --git a/Resources/Private/JavaScript/media-module/src/core/CreateErrorHandler.ts b/Resources/Private/JavaScript/media-module/src/core/CreateErrorHandler.ts index 8f80d6215..c49c80099 100644 --- a/Resources/Private/JavaScript/media-module/src/core/CreateErrorHandler.ts +++ b/Resources/Private/JavaScript/media-module/src/core/CreateErrorHandler.ts @@ -1,23 +1,24 @@ -import { onError } from '@apollo/client/link/error'; +import {onError} from '@apollo/client/link/error'; const createErrorHandler = (notify: NeosNotification) => { const translate = (id, value = null, args = {}, packageKey = 'Flowpack.Media.Ui', source = 'Main') => { return window.NeosCMS.I18n.translate(id, value, packageKey, source, args); }; - return onError(({ graphQLErrors, networkError }) => { + return onError(({graphQLErrors, networkError}) => { if (graphQLErrors) { graphQLErrors.map((data) => { const isInternalError = data.extensions.category === 'internal'; - let errorTitleLabel = isInternalError ? 'errors.internal.title' : 'errors.graphql.title'; + const defaultErrorTitle = isInternalError ? translate('errors.internal.title', 'Internal server error') : translate('errors.graphql.title', 'Communication error'); let errorMessageLabel = ''; + let errorTitleLabel = ''; if (data.extensions.errorCode) { errorTitleLabel = `errors.${data.extensions.errorCode}.title`; errorMessageLabel = `errors.${data.extensions.errorCode}.message`; } notify.error( - translate(errorTitleLabel), + translate(errorTitleLabel, defaultErrorTitle), errorMessageLabel.length ? translate(errorMessageLabel) : data.message ); }); diff --git a/Resources/Private/Translations/de/Main.xlf b/Resources/Private/Translations/de/Main.xlf index fdeb4ff54..886a278a6 100644 --- a/Resources/Private/Translations/de/Main.xlf +++ b/Resources/Private/Translations/de/Main.xlf @@ -762,6 +762,180 @@ Gehe zu nächster Seite + + + + Internal server error + Interner Serverfehler + + + Communication error + Kommunikationsfehler + + + Failed to create tag + Tag-Erstellung fehlgeschlagen + + + This tag is already exists. Please choose a different one. + Dieser Tag existiert bereits. Bitte wählen Sie einen anderen aus. + + + The specified asset was not found. + Das angegebene Asset wurde nicht gefunden. + + + Parent must be an AssetCollection + Übergeordnetes Element muss eine Asset-Sammlung sein + + + Invalid metadata definition + Ungültige Metadaten-Definition + + + Failed to delete asset + Asset-Löschung fehlgeschlagen + + + Cannot update asset that was never imported + Asset kann nicht aktualisiert werden, da es nie importiert wurde + + + Failed to update asset + Asset-Aktualisierung fehlgeschlagen + + + Cannot tag asset that was never imported + Asset kann nicht getaggt werden, da es nie importiert wurde + + + Asset type does not support tagging + Asset-Typ unterstützt keine Tags + + + Cannot tag asset with tag that does not exist + Asset kann nicht mit einem nicht existierenden Tag versehen werden + + + Failed to update asset + Asset-Aktualisierung fehlgeschlagen + + + Cannot tag asset that was never imported + Asset kann nicht getaggt werden, da es nie importiert wurde + + + Asset type does not support tagging + Asset-Typ unterstützt keine Tags + + + Cannot tag asset with tag that does not exist + Asset kann nicht mit einem nicht existierenden Tag versehen werden + + + Failed to set asset tags + Setzen der Asset-Tags fehlgeschlagen + + + Cannot assign collections to asset that was never imported + Sammlungen können nicht zu einem Asset zugewiesen werden, das nie importiert wurde + + + Asset type does not support collections + Asset-Typ unterstützt keine Sammlungen + + + Cannot assign non existing assign collection to asset + Nicht existierende Sammlung kann nicht zugewiesen werden + + + Failed to assign asset collections + Zuweisung der Asset-Sammlungen fehlgeschlagen + + + Cannot untag asset that was never imported + Asset kann nicht ungetaggt werden, da es nie importiert wurde + + + Asset type does not support tagging + Asset-Typ unterstützt keine Tags + + + Cannot untag asset from tag that does not exist + Asset kann nicht von einem nicht existierenden Tag entfernt werden + + + Failed to update asset + Asset-Aktualisierung fehlgeschlagen + + + No proxy found for asset + Kein Proxy für Asset gefunden + + + Cannot replace asset that was never imported + Asset kann nicht ersetzt werden, da es nie importiert wurde + + + Asset type does not support replacing + Asset-Typ unterstützt kein Ersetzen + + + Filename was empty + Dateiname war leer + + + No proxy found for asset + Kein Proxy für Asset gefunden + + + Cannot rename asset that was never imported + Asset kann nicht umbenannt werden, da es nie importiert wurde + + + Asset type does not support renaming + Asset-Typ unterstützt kein Umbenennen + + + Could not import asset + Asset konnte nicht importiert werden + + + Asset collection not found + Asset-Collection nicht gefunden + + + Asset collection not found + Asset-Collection nicht gefunden + + + Cannot tag asset collection with tag that does not exist + Asset-Collection kann nicht mit einem nicht existierenden Tag versehen werden + + + Asset collection not found + Asset-Collection nicht gefunden + + + Parent asset collection not found + Übergeordnete Asset-Collection nicht gefunden + + + Tag not found + Tag nicht gefunden + + + Tag not found + Tag nicht gefunden + + + Not supported: AssetProxyQueryInterface::setLimit does not accept `null`. + Nicht unterstützt: AssetProxyQueryInterface::setLimit akzeptiert kein `null`. + + + This method requires "flowpack/entity-usage-databasestorage" to be installed.' + Diese Methode erfordert die Installation von "flowpack/entity-usage-databasestorage". + diff --git a/Resources/Private/Translations/en/Main.xlf b/Resources/Private/Translations/en/Main.xlf index fdd3ddef8..df268aa2c 100644 --- a/Resources/Private/Translations/en/Main.xlf +++ b/Resources/Private/Translations/en/Main.xlf @@ -594,13 +594,129 @@ Communication error - + Failed to create tag This tag is already exists. Please choose a different one. - + + The specified asset was not found. + + + Parent must be an AssetCollection + + + Invalid metadata definition + + + Failed to delete asset + + + Cannot update asset that was never imported + + + Failed to update asset + + + Cannot tag asset that was never imported + + + Asset type does not support tagging + + + Cannot tag asset with tag that does not exist + + + Failed to update asset + + + Cannot tag asset that was never imported + + + Asset type does not support tagging + + + Cannot tag asset with tag that does not exist + + + Failed to set asset tags + + + Cannot assign collections to asset that was never imported + + + Asset type does not support collections + + + Cannot assign non existing assign collection to asset + + + Failed to assign asset collections + + + Cannot untag asset that was never imported + + + Asset type does not support tagging + + + Cannot untag asset from tag that does not exist + + + Failed to update asset + + + No proxy found for asset + + + Cannot replace asset that was never imported + + + Asset type does not support replacing + + + Filename was empty + + + No proxy found for asset + + + Cannot rename asset that was never imported + + + Asset type does not support renaming + + + Could not import asset + + + Asset collection not found + + + Asset collection not found + + + Cannot tag asset collection with tag that does not exist + + + Asset collection not found + + + Parent asset collection not found + + + Tag not found + + + Tag not found + + + Not supported: AssetProxyQueryInterface::setLimit does not accept `null`. + + + This method requires "flowpack/entity-usage-databasestorage" to be installed.' +