Mark user interface strings

For now exclude command help, as cobra itself is not localizable yet.
This commit is contained in:
Philipp Wolfer 2023-12-09 16:43:14 +01:00
parent 511b71b909
commit d6ca8d33f7
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
27 changed files with 1005 additions and 95 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/spf13/cast"
"github.com/spf13/viper"
"go.uploadedlobster.com/scotty/internal/i18n"
)
type ServiceConfig struct {
@ -123,5 +124,5 @@ func GetService(name string) (*ServiceConfig, error) {
return &service, nil
}
return nil, fmt.Errorf("no service configuration \"%v\"", name)
return nil, fmt.Errorf(i18n.Tr("no service configuration \"%v\"", name))
}