diff --git a/Kitodo/src/main/java/org/kitodo/production/services/data/ImportService.java b/Kitodo/src/main/java/org/kitodo/production/services/data/ImportService.java index 2eb73aec322..f0ef984f1eb 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/data/ImportService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/data/ImportService.java @@ -786,9 +786,8 @@ public LinkedList parseImportedEADCollection(DataRecord importedEAD List childElements = getEADElements(eadCollectionDocument, eadChildProcessLevel); if (parentElements.size() != 1) { - throw new ProcessGenerationException( - String.format("EAD XML does not contain exactly one element of parent level '%s'!", - eadParentProcessLevel)); + throw new ProcessGenerationException(Helper.getTranslation( + "importError.wrongNumberOfEadParentLevelElements", eadParentProcessLevel)); } // create temp processes for parent (e.g. "collection") and children (e.g. "files") diff --git a/Kitodo/src/main/resources/messages/errors_de.properties b/Kitodo/src/main/resources/messages/errors_de.properties index 5204a55a81b..dcd4eaed90e 100644 --- a/Kitodo/src/main/resources/messages/errors_de.properties +++ b/Kitodo/src/main/resources/messages/errors_de.properties @@ -83,6 +83,7 @@ errorImporting=Fehler beim Importieren von PPN {0}: {1} importFailedError=Der Import von {0} ist fehlgeschlagen. Die Fehlermeldung lautet\: {1}. imagePaginationError=Es wurden {1} Bilder gefunden, aber {0} Bilder erwartet. Bitte \u00FCberpr\u00FCfen Sie die Paginierung. importError.emptyDocument=Vorgang konnte nicht aus geladenem XML-Dokument erzeugt werden. +importError.wrongNumberOfEadParentLevelElements=EAD-XML enth\u00E4lt nicht genau ein Element vom ausgew\u00E4hltem EAD-Level "{0}"! invalidIdentifierCharacter=Der Wert des Identifikationsmerkmals {0} enth\u00E4lt ung\u00FCltige Zeichen. invalidIdentifierSame=Das Identifikationsmerkmal {0} enth\u00E4lt in {1} und {2} den gleichen Wert. diff --git a/Kitodo/src/main/resources/messages/errors_en.properties b/Kitodo/src/main/resources/messages/errors_en.properties index 1f56eeebc3d..d6cce6df241 100644 --- a/Kitodo/src/main/resources/messages/errors_en.properties +++ b/Kitodo/src/main/resources/messages/errors_en.properties @@ -83,6 +83,7 @@ errorImporting=Error importing PPN {0}: {1} importFailedError=The import of {0} failed. The error message is\: {1} imagePaginationError={1} images found but {0} images expected. Please check the pagination. importError.emptyDocument=Unable to create process from imported XML document. +importError.wrongNumberOfEadParentLevelElements=EAD XML does not contain exactly one element of parent level "{0}"! invalidIdentifierCharacter=The value of the identifier {0} contains invalid characters. invalidIdentifierSame=The identifier {0} has the same value in {1} and {2}.