update translations

This commit is contained in:
Philipp Wolfer 2023-12-10 15:24:15 +01:00
parent 788fa3828d
commit c6be6c558f
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
3 changed files with 157 additions and 136 deletions

View file

@ -35,6 +35,7 @@ import (
"go.uploadedlobster.com/scotty/internal/backends/spotify"
"go.uploadedlobster.com/scotty/internal/backends/subsonic"
"go.uploadedlobster.com/scotty/internal/config"
"go.uploadedlobster.com/scotty/internal/i18n"
"go.uploadedlobster.com/scotty/internal/models"
)
@ -52,7 +53,7 @@ func TestResolveBackendUnknown(t *testing.T) {
c.Set("backend", "foo")
service := config.NewServiceConfig("test", c)
_, err := backends.ResolveBackend[models.ListensImport](service)
assert.EqualError(t, err, "unknown backend \"foo\"")
assert.EqualError(t, err, i18n.Tr("unknown backend \"%s\"", "foo"))
}
func TestResolveBackendInvalidInterface(t *testing.T) {
@ -60,7 +61,7 @@ func TestResolveBackendInvalidInterface(t *testing.T) {
c.Set("backend", "dump")
service := config.NewServiceConfig("test", c)
_, err := backends.ResolveBackend[models.ListensExport](service)
assert.EqualError(t, err, "backend dump does not implement ListensExport")
assert.EqualError(t, err, i18n.Tr("backend %s does not implement %s", "dump", "ListensExport"))
}
func TestGetBackends(t *testing.T) {