0
0
forked from toolshed/abra

feat: translation support

See toolshed/abra#483
This commit is contained in:
2025-08-19 11:22:52 +02:00
parent 5cf6048ecb
commit 4e205cf13e
108 changed files with 11217 additions and 1645 deletions

View File

@ -1,8 +1,9 @@
package git
import (
"fmt"
"errors"
"coopcloud.tech/abra/pkg/i18n"
"coopcloud.tech/abra/pkg/log"
"github.com/go-git/go-git/v5"
)
@ -10,7 +11,7 @@ import (
// Commit runs a git commit
func Commit(repoPath, commitMessage string, dryRun bool) error {
if commitMessage == "" {
return fmt.Errorf("no commit message specified?")
return errors.New(i18n.G("no commit message specified?"))
}
commitRepo, err := git.PlainOpen(repoPath)
@ -38,9 +39,9 @@ func Commit(repoPath, commitMessage string, dryRun bool) error {
if err != nil {
return err
}
log.Debug("git changes commited")
log.Debug(i18n.G("git changes commited"))
} else {
log.Debug("dry run: no changes commited")
log.Debug(i18n.G("dry run: no changes commited"))
}
return nil