WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -1,18 +1,20 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"coopcloud.tech/abra/pkg/envfile"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/i18n"
|
||||
)
|
||||
|
||||
func (r Recipe) SampleEnv() (map[string]string, error) {
|
||||
sampleEnv, err := envfile.ReadEnv(r.SampleEnvPath)
|
||||
if err != nil {
|
||||
return sampleEnv, fmt.Errorf("unable to discover .env.sample for %s", r.Name)
|
||||
return sampleEnv, errors.New(i18n.G("unable to discover .env.sample for %s", r.Name))
|
||||
}
|
||||
return sampleEnv, nil
|
||||
}
|
||||
@ -31,7 +33,7 @@ func (r Recipe) GetReleaseNotes(version string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
title := formatter.BoldStyle.Render(fmt.Sprintf("%s release notes:", version))
|
||||
title := formatter.BoldStyle.Render(i18n.G("%s release notes:", version))
|
||||
withTitle := fmt.Sprintf("%s\n%s\n", title, releaseNotes)
|
||||
|
||||
return withTitle, nil
|
||||
|
Reference in New Issue
Block a user