summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorKarl Heitmann <khf1988@gmail.com>2023-07-31 19:42:41 -0400
committerKarl Heitmann <khf1988@gmail.com>2023-07-31 19:42:41 -0400
commitb7ba06fa5b01672e7a5012f1f47c4b07918d67d7 (patch)
tree6b307ed7462996b9ca7264287184550cbe01c28b /pkg/commands
parent51e205ce11d9c7301f4c78d1fc7f69d6bd313447 (diff)
Moves log related translations into its own Tr.Log. namespace
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git_commands/rebase.go8
-rw-r--r--pkg/commands/oscommands/os.go10
2 files changed, 9 insertions, 9 deletions
diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go
index c952c7fd1..dd76d0579 100644
--- a/pkg/commands/git_commands/rebase.go
+++ b/pkg/commands/git_commands/rebase.go
@@ -105,7 +105,7 @@ func (self *RebaseCommands) MoveCommitDown(commits []*models.Commit, index int)
sha := commits[index].Sha
msg := utils.ResolvePlaceholderString(
- self.Tr.Actions.LogMoveCommitDown,
+ self.Tr.Log.MoveCommitDown,
map[string]string{
"shortSha": utils.ShortSha(sha),
},
@@ -125,7 +125,7 @@ func (self *RebaseCommands) MoveCommitUp(commits []*models.Commit, index int) er
sha := commits[index].Sha
msg := utils.ResolvePlaceholderString(
- self.Tr.Actions.LogMoveCommitUp,
+ self.Tr.Log.MoveCommitUp,
map[string]string{
"shortSha": utils.ShortSha(sha),
},
@@ -162,7 +162,7 @@ func (self *RebaseCommands) InteractiveRebase(commits []*models.Commit, index in
func (self *RebaseCommands) EditRebase(branchRef string) error {
msg := utils.ResolvePlaceholderString(
- self.Tr.Actions.LogEditRebase,
+ self.Tr.Log.EditRebase,
map[string]string{
"ref": branchRef,
},
@@ -431,7 +431,7 @@ func (self *RebaseCommands) CherryPickCommits(commits []*models.Commit) error {
return fmt.Sprintf("%s %s", utils.ShortSha(commit.Sha), commit.Name)
})
msg := utils.ResolvePlaceholderString(
- self.Tr.Actions.LogCherryPickCommits,
+ self.Tr.Log.CherryPickCommits,
map[string]string{
"commitLines": strings.Join(commitLines, "\n"),
},
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index f260cce85..fc13eedf0 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -118,7 +118,7 @@ func (c *OSCommand) Quote(message string) string {
// AppendLineToFile adds a new line in file
func (c *OSCommand) AppendLineToFile(filename, line string) error {
msg := utils.ResolvePlaceholderString(
- c.Tr.Actions.LogAppendingLineToFile,
+ c.Tr.Log.AppendingLineToFile,
map[string]string{
"line": line,
"filename": filename,
@@ -163,7 +163,7 @@ func (c *OSCommand) AppendLineToFile(filename, line string) error {
// CreateFileWithContent creates a file with the given content
func (c *OSCommand) CreateFileWithContent(path string, content string) error {
msg := utils.ResolvePlaceholderString(
- c.Tr.Actions.LogCreateFileWithContent,
+ c.Tr.Log.CreateFileWithContent,
map[string]string{
"path": path,
},
@@ -185,7 +185,7 @@ func (c *OSCommand) CreateFileWithContent(path string, content string) error {
// Remove removes a file or directory at the specified path
func (c *OSCommand) Remove(filename string) error {
msg := utils.ResolvePlaceholderString(
- c.Tr.Actions.LogRemove,
+ c.Tr.Log.Remove,
map[string]string{
"filename": filename,
},
@@ -287,7 +287,7 @@ func (c *OSCommand) CopyToClipboard(str string) error {
truncated := utils.TruncateWithEllipsis(escaped, 40)
msg := utils.ResolvePlaceholderString(
- c.Tr.Actions.LogCopyToClipboard,
+ c.Tr.Log.CopyToClipboard,
map[string]string{
"str": truncated,
},
@@ -305,7 +305,7 @@ func (c *OSCommand) CopyToClipboard(str string) error {
func (c *OSCommand) RemoveFile(path string) error {
msg := utils.ResolvePlaceholderString(
- c.Tr.Actions.LogRemoveFile,
+ c.Tr.Log.RemoveFile,
map[string]string{
"path": path,
},