listenbrainz: localize duplicate listen message

This commit is contained in:
Philipp Wolfer 2024-01-14 22:09:12 +01:00
parent fa316b3025
commit 01380bd730
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
2 changed files with 2 additions and 2 deletions

View file

@ -146,7 +146,7 @@ func (b *ListenBrainzApiBackend) ImportListens(export models.ListensResult, impo
return importResult, err
} else if isDupe {
count -= 1
msg := fmt.Sprintf("Ignored duplicate listen %v: \"%v\" by %v (%v)",
msg := i18n.Tr("Ignored duplicate listen %v: \"%v\" by %v (%v)",
l.ListenedAt, l.TrackName, l.ArtistName(), l.RecordingMbid)
importResult.ImportErrors = append(importResult.ImportErrors, msg)
continue

View file

@ -147,7 +147,7 @@ func (c *TransferCmd[E, I, R]) Transfer(exp backends.ExportProcessor[R], imp bac
fmt.Println()
fmt.Println(i18n.Tr("During the import the following errors occurred:"))
for _, err := range result.ImportErrors {
fmt.Println(i18n.Tr("Error: %v\n", err))
fmt.Println(i18n.Tr("Error: %v", err))
}
}