Replaced ImportResult.ImportErrors with ImportResult.ImportLog

This commit is contained in:
Philipp Wolfer 2024-01-15 08:00:17 +01:00
parent 91f9b62db3
commit 8a2ddb7772
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
5 changed files with 55 additions and 13 deletions

View file

@ -143,11 +143,11 @@ func (c *TransferCmd[E, I, R]) Transfer(exp backends.ExportProcessor[R], imp bac
}
// Print errors
if len(result.ImportErrors) > 0 {
if len(result.ImportLog) > 0 {
fmt.Println()
fmt.Println(i18n.Tr("During the import the following errors occurred:"))
for _, err := range result.ImportErrors {
fmt.Println(i18n.Tr("Error: %v", err))
fmt.Println(i18n.Tr("Import log:"))
for _, entry := range result.ImportLog {
fmt.Println(i18n.Tr("%v: %v", entry.Type, entry.Message))
}
}