1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Use sentence case everywhere

We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
This commit is contained in:
Jesse Duffield
2023-05-25 21:11:51 +10:00
parent e5534d9781
commit d772c9f1d4
143 changed files with 2691 additions and 2683 deletions

View File

@ -37,44 +37,44 @@ func (self *BasicCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
{
Key: opts.GetKey(opts.Config.Commits.CheckoutCommit),
Handler: self.checkSelected(self.checkout),
Description: self.c.Tr.LcCheckoutCommit,
Description: self.c.Tr.CheckoutCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.CopyCommitAttributeToClipboard),
Handler: self.checkSelected(self.copyCommitAttribute),
Description: self.c.Tr.LcCopyCommitAttributeToClipboard,
Description: self.c.Tr.CopyCommitAttributeToClipboard,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Commits.OpenInBrowser),
Handler: self.checkSelected(self.openInBrowser),
Description: self.c.Tr.LcOpenCommitInBrowser,
Description: self.c.Tr.OpenCommitInBrowser,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.checkSelected(self.newBranch),
Description: self.c.Tr.LcCreateNewBranchFromCommit,
Description: self.c.Tr.CreateNewBranchFromCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.checkSelected(self.createResetMenu),
Description: self.c.Tr.LcViewResetOptions,
Description: self.c.Tr.ViewResetOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Commits.CherryPickCopy),
Handler: self.checkSelected(self.copy),
Description: self.c.Tr.LcCherryPickCopy,
Description: self.c.Tr.CherryPickCopy,
},
{
Key: opts.GetKey(opts.Config.Commits.CherryPickCopyRange),
Handler: self.checkSelected(self.copyRange),
Description: self.c.Tr.LcCherryPickCopyRange,
Description: self.c.Tr.CherryPickCopyRange,
},
{
Key: opts.GetKey(opts.Config.Commits.ResetCherryPick),
Handler: self.c.Helpers().CherryPick.Reset,
Description: self.c.Tr.LcResetCherryPick,
Description: self.c.Tr.ResetCherryPick,
},
}
@ -101,35 +101,35 @@ func (self *BasicCommitsController) copyCommitAttribute(commit *models.Commit) e
Title: self.c.Tr.Actions.CopyCommitAttributeToClipboard,
Items: []*types.MenuItem{
{
Label: self.c.Tr.LcCommitSha,
Label: self.c.Tr.CommitSha,
OnPress: func() error {
return self.copyCommitSHAToClipboard(commit)
},
Key: 's',
},
{
Label: self.c.Tr.LcCommitURL,
Label: self.c.Tr.CommitURL,
OnPress: func() error {
return self.copyCommitURLToClipboard(commit)
},
Key: 'u',
},
{
Label: self.c.Tr.LcCommitDiff,
Label: self.c.Tr.CommitDiff,
OnPress: func() error {
return self.copyCommitDiffToClipboard(commit)
},
Key: 'd',
},
{
Label: self.c.Tr.LcCommitMessage,
Label: self.c.Tr.CommitMessage,
OnPress: func() error {
return self.copyCommitMessageToClipboard(commit)
},
Key: 'm',
},
{
Label: self.c.Tr.LcCommitAuthor,
Label: self.c.Tr.CommitAuthor,
OnPress: func() error {
return self.copyAuthorToClipboard(commit)
},
@ -235,7 +235,7 @@ func (self *BasicCommitsController) createResetMenu(commit *models.Commit) error
func (self *BasicCommitsController) checkout(commit *models.Commit) error {
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.LcCheckoutCommit,
Title: self.c.Tr.CheckoutCommit,
Prompt: self.c.Tr.SureCheckoutThisCommit,
HandleConfirm: func() error {
self.c.LogAction(self.c.Tr.Actions.CheckoutCommit)

View File

@ -31,7 +31,7 @@ func (self *BisectController) GetKeybindings(opts types.KeybindingsOpts) []*type
{
Key: opts.GetKey(opts.Config.Commits.ViewBisectOptions),
Handler: opts.Guards.OutsideFilterMode(self.checkSelected(self.openMenu)),
Description: self.c.Tr.LcViewBisectOptions,
Description: self.c.Tr.ViewBisectOptions,
OpensMenu: true,
},
}

View File

@ -33,53 +33,53 @@ func (self *BranchesController) GetKeybindings(opts types.KeybindingsOpts) []*ty
{
Key: opts.GetKey(opts.Config.Universal.Select),
Handler: self.checkSelected(self.press),
Description: self.c.Tr.LcCheckout,
Description: self.c.Tr.Checkout,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.checkSelected(self.newBranch),
Description: self.c.Tr.LcNewBranch,
Description: self.c.Tr.NewBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.CreatePullRequest),
Handler: self.checkSelected(self.handleCreatePullRequest),
Description: self.c.Tr.LcCreatePullRequest,
Description: self.c.Tr.CreatePullRequest,
},
{
Key: opts.GetKey(opts.Config.Branches.ViewPullRequestOptions),
Handler: self.checkSelected(self.handleCreatePullRequestMenu),
Description: self.c.Tr.LcCreatePullRequestOptions,
Description: self.c.Tr.CreatePullRequestOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Branches.CopyPullRequestURL),
Handler: self.copyPullRequestURL,
Description: self.c.Tr.LcCopyPullRequestURL,
Description: self.c.Tr.CopyPullRequestURL,
},
{
Key: opts.GetKey(opts.Config.Branches.CheckoutBranchByName),
Handler: self.checkoutByName,
Description: self.c.Tr.LcCheckoutByName,
Description: self.c.Tr.CheckoutByName,
},
{
Key: opts.GetKey(opts.Config.Branches.ForceCheckoutBranch),
Handler: self.forceCheckout,
Description: self.c.Tr.LcForceCheckout,
Description: self.c.Tr.ForceCheckout,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelectedAndReal(self.delete),
Description: self.c.Tr.LcDeleteBranch,
Description: self.c.Tr.DeleteBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.RebaseBranch),
Handler: opts.Guards.OutsideFilterMode(self.rebase),
Description: self.c.Tr.LcRebaseBranch,
Description: self.c.Tr.RebaseBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.MergeIntoCurrentBranch),
Handler: opts.Guards.OutsideFilterMode(self.merge),
Description: self.c.Tr.LcMergeIntoCurrentBranch,
Description: self.c.Tr.MergeIntoCurrentBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.FastForward),
@ -89,23 +89,23 @@ func (self *BranchesController) GetKeybindings(opts types.KeybindingsOpts) []*ty
{
Key: opts.GetKey(opts.Config.Branches.CreateTag),
Handler: self.checkSelected(self.createTag),
Description: self.c.Tr.LcCreateTag,
Description: self.c.Tr.CreateTag,
},
{
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.checkSelected(self.createResetMenu),
Description: self.c.Tr.LcViewResetOptions,
Description: self.c.Tr.ViewResetOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Branches.RenameBranch),
Handler: self.checkSelectedAndReal(self.rename),
Description: self.c.Tr.LcRenameBranch,
Description: self.c.Tr.RenameBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.SetUpstream),
Handler: self.checkSelected(self.setUpstream),
Description: self.c.Tr.LcSetUnsetUpstream,
Description: self.c.Tr.SetUnsetUpstream,
OpensMenu: true,
},
}
@ -140,7 +140,7 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error
Title: self.c.Tr.Actions.SetUnsetUpstream,
Items: []*types.MenuItem{
{
LabelColumns: []string{self.c.Tr.LcUnsetUpstream},
LabelColumns: []string{self.c.Tr.UnsetUpstream},
OnPress: func() error {
if err := self.c.Git().Branch.UnsetUpstream(selectedBranch.Name); err != nil {
return self.c.Error(err)
@ -159,7 +159,7 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error
Key: 'u',
},
{
LabelColumns: []string{self.c.Tr.LcSetUpstream},
LabelColumns: []string{self.c.Tr.SetUpstream},
OnPress: func() error {
return self.c.Helpers().Upstream.PromptForUpstreamWithoutInitialContent(selectedBranch, func(upstream string) error {
upstreamRemote, upstreamBranch, err := self.c.Helpers().Upstream.ParseUpstream(upstream)
@ -437,7 +437,7 @@ func (self *BranchesController) rename(branch *models.Branch) error {
}
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.LcRenameBranch,
Title: self.c.Tr.RenameBranch,
Prompt: self.c.Tr.RenameBranchWarning,
HandleConfirm: promptForNewName,
})
@ -457,13 +457,13 @@ func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Bra
menuItemsForBranch := func(branch *models.Branch) []*types.MenuItem {
return []*types.MenuItem{
{
LabelColumns: fromToLabelColumns(branch.Name, self.c.Tr.LcDefaultBranch),
LabelColumns: fromToLabelColumns(branch.Name, self.c.Tr.DefaultBranch),
OnPress: func() error {
return self.createPullRequest(branch.Name, "")
},
},
{
LabelColumns: fromToLabelColumns(branch.Name, self.c.Tr.LcSelectBranch),
LabelColumns: fromToLabelColumns(branch.Name, self.c.Tr.SelectBranch),
OnPress: func() error {
return self.c.Prompt(types.PromptOpts{
Title: branch.Name + " →",

View File

@ -29,12 +29,12 @@ func (self *CommitMessageController) GetKeybindings(opts types.KeybindingsOpts)
{
Key: opts.GetKey(opts.Config.Universal.SubmitEditorText),
Handler: self.confirm,
Description: self.c.Tr.LcConfirm,
Description: self.c.Tr.Confirm,
},
{
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: self.close,
Description: self.c.Tr.LcClose,
Description: self.c.Tr.Close,
},
{
Key: opts.GetKey(opts.Config.Universal.PrevItem),

View File

@ -30,42 +30,42 @@ func (self *CommitFilesController) GetKeybindings(opts types.KeybindingsOpts) []
{
Key: opts.GetKey(opts.Config.CommitFiles.CheckoutCommitFile),
Handler: self.checkSelected(self.checkout),
Description: self.c.Tr.LcCheckoutCommitFile,
Description: self.c.Tr.CheckoutCommitFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.discard),
Description: self.c.Tr.LcDiscardOldFileChange,
Description: self.c.Tr.DiscardOldFileChange,
},
{
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.checkSelected(self.open),
Description: self.c.Tr.LcOpenFile,
Description: self.c.Tr.OpenFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.checkSelected(self.edit),
Description: self.c.Tr.LcEditFile,
Description: self.c.Tr.EditFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Select),
Handler: self.checkSelected(self.toggleForPatch),
Description: self.c.Tr.LcToggleAddToPatch,
Description: self.c.Tr.ToggleAddToPatch,
},
{
Key: opts.GetKey(opts.Config.Files.ToggleStagedAll),
Handler: self.checkSelected(self.toggleAllForPatch),
Description: self.c.Tr.LcToggleAllInPatch,
Description: self.c.Tr.ToggleAllInPatch,
},
{
Key: opts.GetKey(opts.Config.Universal.GoInto),
Handler: self.checkSelected(self.enter),
Description: self.c.Tr.LcEnterFile,
Description: self.c.Tr.EnterFile,
},
{
Key: opts.GetKey(opts.Config.Files.ToggleTreeView),
Handler: self.toggleTreeView,
Description: self.c.Tr.LcToggleTreeView,
Description: self.c.Tr.ToggleTreeView,
},
}
@ -189,7 +189,7 @@ func (self *CommitFilesController) edit(node *filetree.CommitFileNode) error {
func (self *CommitFilesController) toggleForPatch(node *filetree.CommitFileNode) error {
toggle := func() error {
return self.c.WithWaitingStatus(self.c.Tr.LcUpdatingPatch, func() error {
return self.c.WithWaitingStatus(self.c.Tr.UpdatingPatch, func() error {
if !self.c.Git().Patch.PatchBuilder.Active() {
if err := self.startPatchBuilder(); err != nil {
return err

View File

@ -26,13 +26,13 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
{
Key: opts.GetKey(opts.Config.Universal.Confirm),
Handler: func() error { return self.context().State.OnConfirm() },
Description: self.c.Tr.LcConfirm,
Description: self.c.Tr.Confirm,
Display: true,
},
{
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: func() error { return self.context().State.OnClose() },
Description: self.c.Tr.LcCloseCancel,
Description: self.c.Tr.CloseCancel,
Display: true,
},
{

View File

@ -18,17 +18,17 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
menuItems := []*types.MenuItem{
{
Label: "reset patch",
Label: self.c.Tr.ResetPatch,
OnPress: self.c.Helpers().PatchBuilding.Reset,
Key: 'c',
},
{
Label: "apply patch",
Label: self.c.Tr.ApplyPatch,
OnPress: func() error { return self.handleApplyPatch(false) },
Key: 'a',
},
{
Label: "apply patch in reverse",
Label: self.c.Tr.ApplyPatchInReverse,
OnPress: func() error { return self.handleApplyPatch(true) },
Key: 'r',
},
@ -37,17 +37,17 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
if self.c.Git().Patch.PatchBuilder.CanRebase && self.c.Git().Status.WorkingTreeState() == enums.REBASE_MODE_NONE {
menuItems = append(menuItems, []*types.MenuItem{
{
Label: fmt.Sprintf("remove patch from original commit (%s)", self.c.Git().Patch.PatchBuilder.To),
Label: fmt.Sprintf(self.c.Tr.RemovePatchFromOriginalCommit, self.c.Git().Patch.PatchBuilder.To),
OnPress: self.handleDeletePatchFromCommit,
Key: 'd',
},
{
Label: "move patch out into index",
Label: self.c.Tr.MovePatchOutIntoIndex,
OnPress: self.handleMovePatchIntoWorkingTree,
Key: 'i',
},
{
Label: "move patch into new commit",
Label: self.c.Tr.MovePatchIntoNewCommit,
OnPress: self.handlePullPatchIntoNewCommit,
Key: 'n',
},
@ -62,7 +62,7 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
append(
[]*types.MenuItem{
{
Label: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
Label: fmt.Sprintf(self.c.Tr.MovePatchToSelectedCommit, selectedCommit.Sha),
OnPress: self.handleMovePatchToSelectedCommit,
Key: 'm',
},
@ -75,7 +75,7 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
menuItems = append(menuItems, []*types.MenuItem{
{
Label: "copy patch to clipboard",
Label: self.c.Tr.CopyPatchToClipboard,
OnPress: func() error { return self.copyPatchToClipboard() },
Key: 'y',
},

View File

@ -20,7 +20,7 @@ func (self *DiffingMenuAction) Call() error {
name := name
menuItems = append(menuItems, []*types.MenuItem{
{
Label: fmt.Sprintf("%s %s", self.c.Tr.LcDiff, name),
Label: fmt.Sprintf("%s %s", self.c.Tr.Diff, name),
OnPress: func() error {
self.c.Modes().Diffing.Ref = name
// can scope this down based on current view but too lazy right now
@ -32,10 +32,10 @@ func (self *DiffingMenuAction) Call() error {
menuItems = append(menuItems, []*types.MenuItem{
{
Label: self.c.Tr.LcEnterRefToDiff,
Label: self.c.Tr.EnterRefToDiff,
OnPress: func() error {
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcEnteRefName,
Title: self.c.Tr.EnteRefName,
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetRefsSuggestionsFunc(),
HandleConfirm: func(response string) error {
self.c.Modes().Diffing.Ref = strings.TrimSpace(response)
@ -49,14 +49,14 @@ func (self *DiffingMenuAction) Call() error {
if self.c.Modes().Diffing.Active() {
menuItems = append(menuItems, []*types.MenuItem{
{
Label: self.c.Tr.LcSwapDiff,
Label: self.c.Tr.SwapDiff,
OnPress: func() error {
self.c.Modes().Diffing.Reverse = !self.c.Modes().Diffing.Reverse
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
},
},
{
Label: self.c.Tr.LcExitDiffMode,
Label: self.c.Tr.ExitDiffMode,
OnPress: func() error {
self.c.Modes().Diffing = diffing.New()
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})

View File

@ -31,12 +31,12 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Universal.Select),
Handler: self.checkSelectedFileNode(self.press),
Description: self.c.Tr.LcToggleStaged,
Description: self.c.Tr.ToggleStaged,
},
{
Key: opts.GetKey(opts.Config.Files.OpenStatusFilter),
Handler: self.handleStatusFilterPressed,
Description: self.c.Tr.LcFileFilter,
Description: self.c.Tr.FileFilter,
},
{
Key: opts.GetKey(opts.Config.Files.CommitChanges),
@ -46,7 +46,7 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Files.CommitChangesWithoutHook),
Handler: self.c.Helpers().WorkingTree.HandleWIPCommitPress,
Description: self.c.Tr.LcCommitChangesWithoutHook,
Description: self.c.Tr.CommitChangesWithoutHook,
},
{
Key: opts.GetKey(opts.Config.Files.AmendLastCommit),
@ -61,39 +61,39 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.checkSelectedFileNode(self.edit),
Description: self.c.Tr.LcEditFile,
Description: self.c.Tr.EditFile,
},
{
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.Open,
Description: self.c.Tr.LcOpenFile,
Description: self.c.Tr.OpenFile,
},
{
Key: opts.GetKey(opts.Config.Files.IgnoreFile),
Handler: self.checkSelectedFileNode(self.ignoreOrExcludeMenu),
Description: self.c.Tr.Actions.LcIgnoreExcludeFile,
Description: self.c.Tr.Actions.IgnoreExcludeFile,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Files.RefreshFiles),
Handler: self.refresh,
Description: self.c.Tr.LcRefreshFiles,
Description: self.c.Tr.RefreshFiles,
},
{
Key: opts.GetKey(opts.Config.Files.StashAllChanges),
Handler: self.stash,
Description: self.c.Tr.LcStashAllChanges,
Description: self.c.Tr.StashAllChanges,
},
{
Key: opts.GetKey(opts.Config.Files.ViewStashOptions),
Handler: self.createStashMenu,
Description: self.c.Tr.LcViewStashOptions,
Description: self.c.Tr.ViewStashOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Files.ToggleStagedAll),
Handler: self.toggleStagedAll,
Description: self.c.Tr.LcToggleStagedAll,
Description: self.c.Tr.ToggleStagedAll,
},
{
Key: opts.GetKey(opts.Config.Universal.GoInto),
@ -103,29 +103,29 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.createResetToUpstreamMenu,
Description: self.c.Tr.LcViewResetToUpstreamOptions,
Description: self.c.Tr.ViewResetToUpstreamOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Files.ViewResetOptions),
Handler: self.createResetMenu,
Description: self.c.Tr.LcViewResetOptions,
Description: self.c.Tr.ViewResetOptions,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Files.ToggleTreeView),
Handler: self.toggleTreeView,
Description: self.c.Tr.LcToggleTreeView,
Description: self.c.Tr.ToggleTreeView,
},
{
Key: opts.GetKey(opts.Config.Files.OpenMergeTool),
Handler: self.c.Helpers().WorkingTree.OpenMergeTool,
Description: self.c.Tr.LcOpenMergeTool,
Description: self.c.Tr.OpenMergeTool,
},
{
Key: opts.GetKey(opts.Config.Files.Fetch),
Handler: self.fetch,
Description: self.c.Tr.LcFetch,
Description: self.c.Tr.Fetch,
},
}
}
@ -559,7 +559,7 @@ func (self *FilesController) ignore(node *filetree.FileNode) error {
if node.GetPath() == ".gitignore" {
return self.c.ErrorMsg(self.c.Tr.Actions.IgnoreFileErr)
}
err := self.ignoreOrExcludeFile(node, self.c.Tr.IgnoreTracked, self.c.Tr.IgnoreTrackedPrompt, self.c.Tr.Actions.LcIgnoreExcludeFile, self.c.Git().WorkingTree.Ignore)
err := self.ignoreOrExcludeFile(node, self.c.Tr.IgnoreTracked, self.c.Tr.IgnoreTrackedPrompt, self.c.Tr.Actions.IgnoreExcludeFile, self.c.Git().WorkingTree.Ignore)
if err != nil {
return err
}
@ -585,10 +585,10 @@ func (self *FilesController) exclude(node *filetree.FileNode) error {
func (self *FilesController) ignoreOrExcludeMenu(node *filetree.FileNode) error {
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.Actions.LcIgnoreExcludeFile,
Title: self.c.Tr.Actions.IgnoreExcludeFile,
Items: []*types.MenuItem{
{
LabelColumns: []string{self.c.Tr.LcIgnoreFile},
LabelColumns: []string{self.c.Tr.IgnoreFile},
OnPress: func() error {
if err := self.ignore(node); err != nil {
return self.c.Error(err)
@ -598,7 +598,7 @@ func (self *FilesController) ignoreOrExcludeMenu(node *filetree.FileNode) error
Key: 'i',
},
{
LabelColumns: []string{self.c.Tr.LcExcludeFile},
LabelColumns: []string{self.c.Tr.ExcludeFile},
OnPress: func() error {
if err := self.exclude(node); err != nil {
return self.c.Error(err)
@ -690,10 +690,10 @@ func (self *FilesController) switchToMerge() error {
func (self *FilesController) createStashMenu() error {
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.LcStashOptions,
Title: self.c.Tr.StashOptions,
Items: []*types.MenuItem{
{
Label: self.c.Tr.LcStashAllChanges,
Label: self.c.Tr.StashAllChanges,
OnPress: func() error {
if !self.c.Helpers().WorkingTree.IsWorkingTreeDirty() {
return self.c.ErrorMsg(self.c.Tr.NoFilesToStash)
@ -703,7 +703,7 @@ func (self *FilesController) createStashMenu() error {
Key: 'a',
},
{
Label: self.c.Tr.LcStashAllChangesKeepIndex,
Label: self.c.Tr.StashAllChangesKeepIndex,
OnPress: func() error {
if !self.c.Helpers().WorkingTree.IsWorkingTreeDirty() {
return self.c.ErrorMsg(self.c.Tr.NoFilesToStash)
@ -714,14 +714,14 @@ func (self *FilesController) createStashMenu() error {
Key: 'i',
},
{
Label: self.c.Tr.LcStashIncludeUntrackedChanges,
Label: self.c.Tr.StashIncludeUntrackedChanges,
OnPress: func() error {
return self.handleStashSave(self.c.Git().Stash.StashIncludeUntrackedChanges, self.c.Tr.Actions.StashIncludeUntrackedChanges)
},
Key: 'U',
},
{
Label: self.c.Tr.LcStashStagedChanges,
Label: self.c.Tr.StashStagedChanges,
OnPress: func() error {
// there must be something in staging otherwise the current implementation mucks the stash up
if !self.c.Helpers().WorkingTree.AnyStagedFiles() {
@ -732,7 +732,7 @@ func (self *FilesController) createStashMenu() error {
Key: 's',
},
{
Label: self.c.Tr.LcStashUnstagedChanges,
Label: self.c.Tr.StashUnstagedChanges,
OnPress: func() error {
if !self.c.Helpers().WorkingTree.IsWorkingTreeDirty() {
return self.c.ErrorMsg(self.c.Tr.NoFilesToStash)

View File

@ -31,7 +31,7 @@ func (self *FilesRemoveController) GetKeybindings(opts types.KeybindingsOpts) []
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelectedFileNode(self.remove),
Description: self.c.Tr.LcViewDiscardOptions,
Description: self.c.Tr.ViewDiscardOptions,
OpensMenu: true,
},
}
@ -44,7 +44,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
if node.File == nil {
menuItems = []*types.MenuItem{
{
Label: self.c.Tr.LcDiscardAllChanges,
Label: self.c.Tr.DiscardAllChanges,
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.DiscardAllChangesInDirectory)
if err := self.c.Git().WorkingTree.DiscardAllDirChanges(node); err != nil {
@ -64,7 +64,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
if node.GetHasStagedChanges() && node.GetHasUnstagedChanges() {
menuItems = append(menuItems, &types.MenuItem{
Label: self.c.Tr.LcDiscardUnstagedChanges,
Label: self.c.Tr.DiscardUnstagedChanges,
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.DiscardUnstagedChangesInDirectory)
if err := self.c.Git().WorkingTree.DiscardUnstagedDirChanges(node); err != nil {
@ -91,7 +91,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
menuItems = []*types.MenuItem{
{
Label: self.c.Tr.LcSubmoduleStashAndReset,
Label: self.c.Tr.SubmoduleStashAndReset,
OnPress: func() error {
return self.ResetSubmodule(submodule)
},
@ -100,7 +100,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
} else {
menuItems = []*types.MenuItem{
{
Label: self.c.Tr.LcDiscardAllChanges,
Label: self.c.Tr.DiscardAllChanges,
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.DiscardAllChangesInFile)
if err := self.c.Git().WorkingTree.DiscardAllFileChanges(file); err != nil {
@ -120,7 +120,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
if file.HasStagedChanges && file.HasUnstagedChanges {
menuItems = append(menuItems, &types.MenuItem{
Label: self.c.Tr.LcDiscardUnstagedChanges,
Label: self.c.Tr.DiscardUnstagedChanges,
OnPress: func() error {
self.c.LogAction(self.c.Tr.Actions.DiscardAllUnstagedChangesInFile)
if err := self.c.Git().WorkingTree.DiscardUnstagedFileChanges(file); err != nil {
@ -145,7 +145,7 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
}
func (self *FilesRemoveController) ResetSubmodule(submodule *models.SubmoduleConfig) error {
return self.c.WithWaitingStatus(self.c.Tr.LcResettingSubmoduleStatus, func() error {
return self.c.WithWaitingStatus(self.c.Tr.ResettingSubmoduleStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.ResetSubmodule)
file := self.c.Helpers().WorkingTree.FileForSubmodule(submodule)

View File

@ -30,7 +30,7 @@ func (self *FilteringMenuAction) Call() error {
if fileName != "" {
menuItems = append(menuItems, &types.MenuItem{
Label: fmt.Sprintf("%s '%s'", self.c.Tr.LcFilterBy, fileName),
Label: fmt.Sprintf("%s '%s'", self.c.Tr.FilterBy, fileName),
OnPress: func() error {
return self.setFiltering(fileName)
},
@ -38,7 +38,7 @@ func (self *FilteringMenuAction) Call() error {
}
menuItems = append(menuItems, &types.MenuItem{
Label: self.c.Tr.LcFilterPathOption,
Label: self.c.Tr.FilterPathOption,
OnPress: func() error {
return self.c.Prompt(types.PromptOpts{
FindSuggestionsFunc: self.c.Helpers().Suggestions.GetFilePathSuggestionsFunc(),
@ -52,7 +52,7 @@ func (self *FilteringMenuAction) Call() error {
if self.c.Modes().Filtering.Active() {
menuItems = append(menuItems, &types.MenuItem{
Label: self.c.Tr.LcExitFilterMode,
Label: self.c.Tr.ExitFilterMode,
OnPress: self.c.Helpers().Mode.ClearFiltering,
})
}

View File

@ -30,7 +30,7 @@ func (self *GitFlowController) GetKeybindings(opts types.KeybindingsOpts) []*typ
{
Key: opts.GetKey(opts.Config.Branches.ViewGitFlowOptions),
Handler: self.checkSelected(self.handleCreateGitFlowMenu),
Description: self.c.Tr.LcGitFlowOptions,
Description: self.c.Tr.GitFlowOptions,
OpensMenu: true,
},
}

View File

@ -24,7 +24,7 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
{
Key: opts.GetKey(opts.Config.Universal.ExecuteCustomCommand),
Handler: self.customCommand,
Description: self.c.Tr.LcExecuteCustomCommand,
Description: self.c.Tr.ExecuteCustomCommand,
},
{
Key: opts.GetKey(opts.Config.Universal.CreatePatchOptionsMenu),
@ -41,17 +41,17 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
{
Key: opts.GetKey(opts.Config.Universal.Refresh),
Handler: self.refresh,
Description: self.c.Tr.LcRefresh,
Description: self.c.Tr.Refresh,
},
{
Key: opts.GetKey(opts.Config.Universal.NextScreenMode),
Handler: self.nextScreenMode,
Description: self.c.Tr.LcNextScreenMode,
Description: self.c.Tr.NextScreenMode,
},
{
Key: opts.GetKey(opts.Config.Universal.PrevScreenMode),
Handler: self.prevScreenMode,
Description: self.c.Tr.LcPrevScreenMode,
Description: self.c.Tr.PrevScreenMode,
},
{
ViewName: "",
@ -65,26 +65,26 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
Modifier: gocui.ModNone,
// we have the description on the alt key and not the main key for legacy reasons
// (the original main key was 'x' but we've reassigned that to other purposes)
Description: self.c.Tr.LcOpenMenu,
Description: self.c.Tr.OpenMenu,
Handler: self.createOptionsMenu,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.FilteringMenu),
Handler: self.createFilteringMenu,
Description: self.c.Tr.LcOpenFilteringMenu,
Description: self.c.Tr.OpenFilteringMenu,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Universal.DiffingMenu),
Handler: self.createDiffingMenu,
Description: self.c.Tr.LcOpenDiffingMenu,
Description: self.c.Tr.OpenDiffingMenu,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Universal.DiffingMenuAlt),
Handler: self.createDiffingMenu,
Description: self.c.Tr.LcOpenDiffingMenu,
Description: self.c.Tr.OpenDiffingMenu,
OpensMenu: true,
},
{

View File

@ -180,7 +180,7 @@ func (self *MergeAndRebaseHelper) workingTreeStateNoun() string {
// PromptToContinueRebase asks the user if they want to continue the rebase/merge that's in progress
func (self *MergeAndRebaseHelper) PromptToContinueRebase() error {
return self.c.Confirm(types.ConfirmOpts{
Title: "continue",
Title: self.c.Tr.Continue,
Prompt: self.c.Tr.ConflictsResolved,
HandleConfirm: func() error {
return self.genericMergeCommand(REBASE_OPTION_CONTINUE)

View File

@ -53,7 +53,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
return self.withResetButton(
fmt.Sprintf(
"%s %s",
self.c.Tr.LcShowingGitDiff,
self.c.Tr.ShowingGitDiff,
"git diff "+strings.Join(self.diffHelper.DiffArgs(), " "),
),
style.FgMagenta,
@ -64,7 +64,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
{
IsActive: self.c.Git().Patch.PatchBuilder.Active,
Description: func() string {
return self.withResetButton(self.c.Tr.LcBuildingPatch, style.FgYellow.SetBold())
return self.withResetButton(self.c.Tr.BuildingPatch, style.FgYellow.SetBold())
},
Reset: self.patchBuildingHelper.Reset,
},
@ -74,7 +74,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
return self.withResetButton(
fmt.Sprintf(
"%s '%s'",
self.c.Tr.LcFilteringBy,
self.c.Tr.FilteringBy,
self.c.Modes().Filtering.GetPath(),
),
style.FgRed,
@ -86,9 +86,9 @@ func (self *ModeHelper) Statuses() []ModeStatus {
IsActive: self.c.Modes().CherryPicking.Active,
Description: func() string {
copiedCount := len(self.c.Modes().CherryPicking.CherryPickedCommits)
text := self.c.Tr.LcCommitsCopied
text := self.c.Tr.CommitsCopied
if copiedCount == 1 {
text = self.c.Tr.LcCommitCopied
text = self.c.Tr.CommitCopied
}
return self.withResetButton(
@ -109,7 +109,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
Description: func() string {
workingTreeState := self.c.Git().Status.WorkingTreeState()
return self.withResetButton(
presentation.FormatWorkingTreeState(workingTreeState), style.FgYellow,
presentation.FormatWorkingTreeStateTitle(self.c.Tr, workingTreeState), style.FgYellow,
)
},
Reset: self.mergeAndRebaseHelper.AbortMergeOrRebaseWithConfirm,
@ -119,7 +119,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
return self.c.Model().BisectInfo.Started()
},
Description: func() string {
return self.withResetButton("bisecting", style.FgGreen)
return self.withResetButton(self.c.Tr.Bisect.Bisecting, style.FgGreen)
},
Reset: self.bisectHelper.Reset,
},

View File

@ -584,7 +584,7 @@ func (self *RefreshHelper) refreshStatus() {
workingTreeState := self.c.Git().Status.WorkingTreeState()
if workingTreeState != enums.REBASE_MODE_NONE {
status += style.FgYellow.Sprintf("(%s) ", presentation.FormatWorkingTreeState(workingTreeState))
status += style.FgYellow.Sprintf("(%s) ", presentation.FormatWorkingTreeStateLower(self.c.Tr, workingTreeState))
}
name := presentation.GetBranchTextStyle(currentBranch.Name).Sprint(currentBranch.Name)

View File

@ -121,18 +121,20 @@ func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string
func (self *RefsHelper) CreateGitResetMenu(ref string) error {
type strengthWithKey struct {
strength string
label string
key types.Key
}
strengths := []strengthWithKey{
{strength: "soft", key: 's'},
{strength: "mixed", key: 'm'},
{strength: "hard", key: 'h'},
// not i18'ing because it's git terminology
{strength: "soft", label: "Soft reset", key: 's'},
{strength: "mixed", label: "Mixed reset", key: 'm'},
{strength: "hard", label: "Hard reset", key: 'h'},
}
menuItems := slices.Map(strengths, func(row strengthWithKey) *types.MenuItem {
return &types.MenuItem{
LabelColumns: []string{
fmt.Sprintf("%s reset", row.strength),
row.label,
style.FgRed.Sprintf("reset --%s %s", row.strength, ref),
},
OnPress: func() error {
@ -144,7 +146,7 @@ func (self *RefsHelper) CreateGitResetMenu(ref string) error {
})
return self.c.Menu(types.CreateMenuOptions{
Title: fmt.Sprintf("%s %s", self.c.Tr.LcResetTo, ref),
Title: fmt.Sprintf("%s %s", self.c.Tr.ResetTo, ref),
Items: menuItems,
})
}

View File

@ -88,7 +88,7 @@ func (self *ReposHelper) getCurrentBranch(path string) string {
}
}
return self.c.Tr.LcBranchUnknown
return self.c.Tr.BranchUnknown
}
func (self *ReposHelper) CreateRecentReposMenu() error {

View File

@ -100,7 +100,7 @@ func (self *SuggestionsHelper) GetBranchNameSuggestionsFunc() func(string) []*ty
// Notably, unlike other suggestion functions we're not showing all the options
// if nothing has been typed because there'll be too much to display efficiently
func (self *SuggestionsHelper) GetFilePathSuggestionsFunc() func(string) []*types.Suggestion {
_ = self.c.WithWaitingStatus(self.c.Tr.LcLoadingFileSuggestions, func() error {
_ = self.c.WithWaitingStatus(self.c.Tr.LoadingFileSuggestions, func() error {
trie := patricia.NewTrie()
// load every non-gitignored file in the repo
ignore, err := gitignore.FromGit()

View File

@ -23,13 +23,13 @@ func (self *TagsHelper) CreateTagMenu(ref string, onCreate func()) error {
Title: self.c.Tr.TagMenuTitle,
Items: []*types.MenuItem{
{
Label: self.c.Tr.LcLightweightTag,
Label: self.c.Tr.LightweightTag,
OnPress: func() error {
return self.handleCreateLightweightTag(ref, onCreate)
},
},
{
Label: self.c.Tr.LcAnnotatedTag,
Label: self.c.Tr.AnnotatedTag,
OnPress: func() error {
return self.handleCreateAnnotatedTag(ref, onCreate)
},

View File

@ -2,7 +2,6 @@ package helpers
import (
"github.com/jesseduffield/lazycore/pkg/boxlayout"
"github.com/jesseduffield/lazygit/pkg/gui/constants"
"github.com/jesseduffield/lazygit/pkg/gui/context"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/utils"
@ -179,7 +178,7 @@ func (self *WindowArrangementHelper) infoSectionChildren(informationStr string,
return []*boxlayout.Box{
{
Window: "searchPrefix",
Size: runewidth.StringWidth(constants.SEARCH_PREFIX),
Size: runewidth.StringWidth(self.c.Tr.SearchPrefix),
},
{
Window: "search",

View File

@ -154,7 +154,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error {
prefixReplace := commitPrefixConfig.Replace
rgx, err := regexp.Compile(prefixPattern)
if err != nil {
return self.c.ErrorMsg(fmt.Sprintf("%s: %s", self.c.Tr.LcCommitPrefixPatternError, err.Error()))
return self.c.ErrorMsg(fmt.Sprintf("%s: %s", self.c.Tr.CommitPrefixPatternError, err.Error()))
}
prefix := rgx.ReplaceAllString(self.refHelper.GetCheckedOutRef().Name, prefixReplace)
message = prefix

View File

@ -145,20 +145,20 @@ func (self *ListController) GetKeybindings(opts types.KeybindingsOpts) []*types.
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.PrevItem), Handler: self.HandlePrevLine},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextItemAlt), Handler: self.HandleNextLine},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextItem), Handler: self.HandleNextLine},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.PrevPage), Handler: self.HandlePrevPage, Description: self.c.Tr.LcPrevPage},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextPage), Handler: self.HandleNextPage, Description: self.c.Tr.LcNextPage},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoTop), Handler: self.HandleGotoTop, Description: self.c.Tr.LcGotoTop},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.PrevPage), Handler: self.HandlePrevPage, Description: self.c.Tr.PrevPage},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.NextPage), Handler: self.HandleNextPage, Description: self.c.Tr.NextPage},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.GotoTop), Handler: self.HandleGotoTop, Description: self.c.Tr.GotoTop},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.ScrollLeft), Handler: self.HandleScrollLeft},
{Tag: "navigation", Key: opts.GetKey(opts.Config.Universal.ScrollRight), Handler: self.HandleScrollRight},
{
Key: opts.GetKey(opts.Config.Universal.StartSearch),
Handler: func() error { self.c.OpenSearch(); return nil },
Description: self.c.Tr.LcStartSearch,
Description: self.c.Tr.StartSearch,
Tag: "navigation",
},
{
Key: opts.GetKey(opts.Config.Universal.GotoBottom),
Description: self.c.Tr.LcGotoBottom,
Description: self.c.Tr.GotoBottom,
Handler: self.HandleGotoBottom,
Tag: "navigation",
},

View File

@ -45,75 +45,75 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
{
Key: opts.GetKey(opts.Config.Commits.SquashDown),
Handler: self.checkSelected(self.squashDown),
Description: self.c.Tr.LcSquashDown,
Description: self.c.Tr.SquashDown,
},
{
Key: opts.GetKey(opts.Config.Commits.MarkCommitAsFixup),
Handler: self.checkSelected(self.fixup),
Description: self.c.Tr.LcFixupCommit,
Description: self.c.Tr.FixupCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.RenameCommit),
Handler: self.checkSelected(self.reword),
Description: self.c.Tr.LcRewordCommit,
Description: self.c.Tr.RewordCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.RenameCommitWithEditor),
Handler: self.checkSelected(self.rewordEditor),
Description: self.c.Tr.LcRenameCommitEditor,
Description: self.c.Tr.RenameCommitEditor,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.drop),
Description: self.c.Tr.LcDeleteCommit,
Description: self.c.Tr.DeleteCommit,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.checkSelected(self.edit),
Description: self.c.Tr.LcEditCommit,
Description: self.c.Tr.EditCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.PickCommit),
Handler: self.checkSelected(self.pick),
Description: self.c.Tr.LcPickCommit,
Description: self.c.Tr.PickCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.CreateFixupCommit),
Handler: self.checkSelected(self.createFixupCommit),
Description: self.c.Tr.LcCreateFixupCommit,
Description: self.c.Tr.CreateFixupCommitDescription,
},
{
Key: opts.GetKey(opts.Config.Commits.SquashAboveCommits),
Handler: self.checkSelected(self.squashAllAboveFixupCommits),
Description: self.c.Tr.LcSquashAboveCommits,
Description: self.c.Tr.SquashAboveCommits,
},
{
Key: opts.GetKey(opts.Config.Commits.MoveDownCommit),
Handler: self.checkSelected(self.moveDown),
Description: self.c.Tr.LcMoveDownCommit,
Description: self.c.Tr.MoveDownCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.MoveUpCommit),
Handler: self.checkSelected(self.moveUp),
Description: self.c.Tr.LcMoveUpCommit,
Description: self.c.Tr.MoveUpCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.PasteCommits),
Handler: opts.Guards.OutsideFilterMode(self.paste),
Description: self.c.Tr.LcPasteCommits,
Description: self.c.Tr.PasteCommits,
},
// overriding these navigation keybindings because we might need to load
// more commits on demand
{
Key: opts.GetKey(opts.Config.Universal.StartSearch),
Handler: self.openSearch,
Description: self.c.Tr.LcStartSearch,
Description: self.c.Tr.StartSearch,
Tag: "navigation",
},
{
Key: opts.GetKey(opts.Config.Universal.GotoBottom),
Handler: self.gotoBottom,
Description: self.c.Tr.LcGotoBottom,
Description: self.c.Tr.GotoBottom,
Tag: "navigation",
},
}
@ -126,27 +126,28 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
{
Key: opts.GetKey(opts.Config.Commits.AmendToCommit),
Handler: self.checkSelected(self.amendTo),
Description: self.c.Tr.LcAmendToCommit,
Description: self.c.Tr.AmendToCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.ResetCommitAuthor),
Handler: self.checkSelected(self.amendAttribute),
Description: self.c.Tr.LcResetCommitAuthor,
Description: self.c.Tr.SetResetCommitAuthor,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Commits.RevertCommit),
Handler: self.checkSelected(self.revert),
Description: self.c.Tr.LcRevertCommit,
Description: self.c.Tr.RevertCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.CreateTag),
Handler: self.checkSelected(self.createTag),
Description: self.c.Tr.LcTagCommit,
Description: self.c.Tr.TagCommit,
},
{
Key: opts.GetKey(opts.Config.Commits.OpenLogMenu),
Handler: self.handleOpenLogMenu,
Description: self.c.Tr.LcOpenLogMenu,
Description: self.c.Tr.OpenLogMenu,
OpensMenu: true,
},
}...)
@ -401,11 +402,11 @@ func (self *LocalCommitsController) handleMidRebaseCommand(action todo.TodoComma
// our input or we set a lazygit client as the EDITOR env variable and have it
// request us to edit the commit message when prompted.
if action == todo.Reword {
return true, self.c.ErrorMsg(self.c.Tr.LcRewordNotSupported)
return true, self.c.ErrorMsg(self.c.Tr.RewordNotSupported)
}
if allowed := isChangeOfRebaseTodoAllowed(action); !allowed {
return true, self.c.ErrorMsg(self.c.Tr.LcChangingThisActionIsNotAllowed)
return true, self.c.ErrorMsg(self.c.Tr.ChangingThisActionIsNotAllowed)
}
self.c.LogAction("Update rebase TODO")
@ -537,13 +538,13 @@ func (self *LocalCommitsController) amendAttribute(commit *models.Commit) error
Title: "Amend commit attribute",
Items: []*types.MenuItem{
{
Label: "reset author",
Label: self.c.Tr.ResetAuthor,
OnPress: self.resetAuthor,
Key: 'a',
Tooltip: "Reset the commit's author to the currently configured user. This will also renew the author timestamp",
},
{
Label: "set author",
Label: self.c.Tr.SetAuthor,
OnPress: self.setAuthor,
Key: 'A',
Tooltip: "Set the author based on a prompt",
@ -720,7 +721,7 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
self.context().SetLimitCommits(false)
}
return self.c.WithWaitingStatus(self.c.Tr.LcLoadingCommits, func() error {
return self.c.WithWaitingStatus(self.c.Tr.LoadingCommits, func() error {
return self.c.Refresh(
types.RefreshOptions{Mode: types.SYNC, Scope: []types.RefreshableView{types.COMMITS}},
)
@ -763,7 +764,7 @@ func (self *LocalCommitsController) handleOpenLogMenu() error {
onPress := func(value string) func() error {
return func() error {
self.c.UserConfig.Git.Log.Order = value
return self.c.WithWaitingStatus(self.c.Tr.LcLoadingCommits, func() error {
return self.c.WithWaitingStatus(self.c.Tr.LoadingCommits, func() error {
return self.c.Refresh(
types.RefreshOptions{
Mode: types.SYNC,

View File

@ -32,13 +32,13 @@ func (self *MenuController) GetKeybindings(opts types.KeybindingsOpts) []*types.
{
Key: opts.GetKey(opts.Config.Universal.Confirm),
Handler: self.press,
Description: self.c.Tr.LcExecute,
Description: self.c.Tr.Execute,
Display: true,
},
{
Key: opts.GetKey(opts.Config.Universal.Return),
Handler: self.close,
Description: self.c.Tr.LcClose,
Description: self.c.Tr.Close,
Display: true,
},
}

View File

@ -30,12 +30,12 @@ func (self *MergeConflictsController) GetKeybindings(opts types.KeybindingsOpts)
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.HandleEditFile,
Description: self.c.Tr.LcEditFile,
Description: self.c.Tr.EditFile,
},
{
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.HandleOpenFile,
Description: self.c.Tr.LcOpenFile,
Description: self.c.Tr.OpenFile,
},
{
Key: opts.GetKey(opts.Config.Universal.PrevBlock),
@ -80,25 +80,25 @@ func (self *MergeConflictsController) GetKeybindings(opts types.KeybindingsOpts)
{
Key: opts.GetKey(opts.Config.Universal.ScrollLeft),
Handler: self.withRenderAndFocus(self.HandleScrollLeft),
Description: self.c.Tr.LcScrollLeft,
Description: self.c.Tr.ScrollLeft,
Tag: "navigation",
},
{
Key: opts.GetKey(opts.Config.Universal.ScrollRight),
Handler: self.withRenderAndFocus(self.HandleScrollRight),
Description: self.c.Tr.LcScrollRight,
Description: self.c.Tr.ScrollRight,
Tag: "navigation",
},
{
Key: opts.GetKey(opts.Config.Universal.Undo),
Handler: self.withRenderAndFocus(self.HandleUndo),
Description: self.c.Tr.LcUndo,
Description: self.c.Tr.Undo,
Display: true,
},
{
Key: opts.GetKey(opts.Config.Files.OpenMergeTool),
Handler: self.c.Helpers().WorkingTree.OpenMergeTool,
Description: self.c.Tr.LcOpenMergeTool,
Description: self.c.Tr.OpenMergeTool,
},
{
Key: opts.GetKey(opts.Config.Universal.Select),

View File

@ -37,7 +37,7 @@ func (self *OptionsMenuAction) Call() error {
})
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.MenuTitle,
Title: self.c.Tr.Keybindings,
Items: menuItems,
HideCancel: true,
})

View File

@ -27,12 +27,12 @@ func (self *PatchBuildingController) GetKeybindings(opts types.KeybindingsOpts)
{
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.OpenFile,
Description: self.c.Tr.LcOpenFile,
Description: self.c.Tr.OpenFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.EditFile,
Description: self.c.Tr.LcEditFile,
Description: self.c.Tr.EditFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Select),

View File

@ -93,24 +93,24 @@ func (self *PatchExplorerController) GetKeybindings(opts types.KeybindingsOpts)
Tag: "navigation",
Key: opts.GetKey(opts.Config.Universal.PrevPage),
Handler: self.withRenderAndFocus(self.HandlePrevPage),
Description: self.c.Tr.LcPrevPage,
Description: self.c.Tr.PrevPage,
},
{
Tag: "navigation",
Key: opts.GetKey(opts.Config.Universal.NextPage),
Handler: self.withRenderAndFocus(self.HandleNextPage),
Description: self.c.Tr.LcNextPage,
Description: self.c.Tr.NextPage,
},
{
Tag: "navigation",
Key: opts.GetKey(opts.Config.Universal.GotoTop),
Handler: self.withRenderAndFocus(self.HandleGotoTop),
Description: self.c.Tr.LcGotoTop,
Description: self.c.Tr.GotoTop,
},
{
Tag: "navigation",
Key: opts.GetKey(opts.Config.Universal.GotoBottom),
Description: self.c.Tr.LcGotoBottom,
Description: self.c.Tr.GotoBottom,
Handler: self.withRenderAndFocus(self.HandleGotoBottom),
},
{
@ -127,12 +127,12 @@ func (self *PatchExplorerController) GetKeybindings(opts types.KeybindingsOpts)
Tag: "navigation",
Key: opts.GetKey(opts.Config.Universal.StartSearch),
Handler: func() error { self.c.OpenSearch(); return nil },
Description: self.c.Tr.LcStartSearch,
Description: self.c.Tr.StartSearch,
},
{
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
Handler: self.withLock(self.CopySelectedToClipboard),
Description: self.c.Tr.LcCopySelectedTexToClipboard,
Description: self.c.Tr.CopySelectedTexToClipboard,
},
}
}

View File

@ -32,32 +32,32 @@ func (self *RemoteBranchesController) GetKeybindings(opts types.KeybindingsOpts)
Key: opts.GetKey(opts.Config.Universal.Select),
// gonna use the exact same handler as the 'n' keybinding because everybody wants this to happen when they checkout a remote branch
Handler: self.checkSelected(self.newLocalBranch),
Description: self.c.Tr.LcCheckout,
Description: self.c.Tr.Checkout,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.checkSelected(self.newLocalBranch),
Description: self.c.Tr.LcNewBranch,
Description: self.c.Tr.NewBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.MergeIntoCurrentBranch),
Handler: opts.Guards.OutsideFilterMode(self.checkSelected(self.merge)),
Description: self.c.Tr.LcMergeIntoCurrentBranch,
Description: self.c.Tr.MergeIntoCurrentBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.RebaseBranch),
Handler: opts.Guards.OutsideFilterMode(self.checkSelected(self.rebase)),
Description: self.c.Tr.LcRebaseBranch,
Description: self.c.Tr.RebaseBranch,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.delete),
Description: self.c.Tr.LcDeleteBranch,
Description: self.c.Tr.DeleteBranch,
},
{
Key: opts.GetKey(opts.Config.Branches.SetUpstream),
Handler: self.checkSelected(self.setAsUpstream),
Description: self.c.Tr.LcSetAsUpstream,
Description: self.c.Tr.SetAsUpstream,
},
{
Key: opts.GetKey(opts.Config.Universal.Return),
@ -67,7 +67,7 @@ func (self *RemoteBranchesController) GetKeybindings(opts types.KeybindingsOpts)
{
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.checkSelected(self.createResetMenu),
Description: self.c.Tr.LcViewResetOptions,
Description: self.c.Tr.ViewResetOptions,
OpensMenu: true,
},
}

View File

@ -40,22 +40,22 @@ func (self *RemotesController) GetKeybindings(opts types.KeybindingsOpts) []*typ
{
Key: opts.GetKey(opts.Config.Branches.FetchRemote),
Handler: self.checkSelected(self.fetch),
Description: self.c.Tr.LcFetchRemote,
Description: self.c.Tr.FetchRemote,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.add,
Description: self.c.Tr.LcAddNewRemote,
Description: self.c.Tr.AddNewRemote,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.remove),
Description: self.c.Tr.LcRemoveRemote,
Description: self.c.Tr.RemoveRemote,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.checkSelected(self.edit),
Description: self.c.Tr.LcEditRemote,
Description: self.c.Tr.EditRemote,
},
}
@ -116,10 +116,10 @@ func (self *RemotesController) enter(remote *models.Remote) error {
func (self *RemotesController) add() error {
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcNewRemoteName,
Title: self.c.Tr.NewRemoteName,
HandleConfirm: func(remoteName string) error {
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcNewRemoteUrl,
Title: self.c.Tr.NewRemoteUrl,
HandleConfirm: func(remoteUrl string) error {
self.c.LogAction(self.c.Tr.Actions.AddRemote)
if err := self.c.Git().Remote.AddRemote(remoteName, remoteUrl); err != nil {
@ -134,8 +134,8 @@ func (self *RemotesController) add() error {
func (self *RemotesController) remove(remote *models.Remote) error {
return self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.LcRemoveRemote,
Prompt: self.c.Tr.LcRemoveRemotePrompt + " '" + remote.Name + "'?",
Title: self.c.Tr.RemoveRemote,
Prompt: self.c.Tr.RemoveRemotePrompt + " '" + remote.Name + "'?",
HandleConfirm: func() error {
self.c.LogAction(self.c.Tr.Actions.RemoveRemote)
if err := self.c.Git().Remote.RemoveRemote(remote.Name); err != nil {
@ -149,7 +149,7 @@ func (self *RemotesController) remove(remote *models.Remote) error {
func (self *RemotesController) edit(remote *models.Remote) error {
editNameMessage := utils.ResolvePlaceholderString(
self.c.Tr.LcEditRemoteName,
self.c.Tr.EditRemoteName,
map[string]string{
"remoteName": remote.Name,
},
@ -167,7 +167,7 @@ func (self *RemotesController) edit(remote *models.Remote) error {
}
editUrlMessage := utils.ResolvePlaceholderString(
self.c.Tr.LcEditRemoteUrl,
self.c.Tr.EditRemoteUrl,
map[string]string{
"remoteName": updatedRemoteName,
},

View File

@ -42,12 +42,12 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ
{
Key: opts.GetKey(opts.Config.Universal.OpenFile),
Handler: self.OpenFile,
Description: self.c.Tr.LcOpenFile,
Description: self.c.Tr.OpenFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.EditFile,
Description: self.c.Tr.LcEditFile,
Description: self.c.Tr.EditFile,
},
{
Key: opts.GetKey(opts.Config.Universal.Return),
@ -82,7 +82,7 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ
{
Key: opts.GetKey(opts.Config.Files.CommitChangesWithoutHook),
Handler: self.c.Helpers().WorkingTree.HandleWIPCommitPress,
Description: self.c.Tr.LcCommitChangesWithoutHook,
Description: self.c.Tr.CommitChangesWithoutHook,
},
{
Key: opts.GetKey(opts.Config.Files.CommitChangesWithEditor),

View File

@ -28,27 +28,27 @@ func (self *StashController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Universal.Select),
Handler: self.checkSelected(self.handleStashApply),
Description: self.c.Tr.LcApply,
Description: self.c.Tr.Apply,
},
{
Key: opts.GetKey(opts.Config.Stash.PopStash),
Handler: self.checkSelected(self.handleStashPop),
Description: self.c.Tr.LcPop,
Description: self.c.Tr.Pop,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.handleStashDrop),
Description: self.c.Tr.LcDrop,
Description: self.c.Tr.Drop,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.checkSelected(self.handleNewBranchOffStashEntry),
Description: self.c.Tr.LcNewBranch,
Description: self.c.Tr.NewBranch,
},
{
Key: opts.GetKey(opts.Config.Stash.RenameStash),
Handler: self.checkSelected(self.handleRenameStashEntry),
Description: self.c.Tr.LcRenameStash,
Description: self.c.Tr.RenameStash,
},
}

View File

@ -45,7 +45,7 @@ func (self *StatusController) GetKeybindings(opts types.KeybindingsOpts) []*type
{
Key: opts.GetKey(opts.Config.Status.CheckForUpdate),
Handler: self.handleCheckForUpdate,
Description: self.c.Tr.LcCheckForUpdate,
Description: self.c.Tr.CheckForUpdate,
},
{
Key: opts.GetKey(opts.Config.Status.RecentRepos),
@ -55,7 +55,7 @@ func (self *StatusController) GetKeybindings(opts types.KeybindingsOpts) []*type
{
Key: opts.GetKey(opts.Config.Status.AllBranchesLogGraph),
Handler: self.showAllBranchLogs,
Description: self.c.Tr.LcAllBranchesLogGraph,
Description: self.c.Tr.AllBranchesLogGraph,
},
}
@ -112,7 +112,7 @@ func (self *StatusController) onClick() error {
workingTreeState := self.c.Git().Status.WorkingTreeState()
switch workingTreeState {
case enums.REBASE_MODE_REBASING, enums.REBASE_MODE_MERGING:
workingTreeStatus := fmt.Sprintf("(%s)", presentation.FormatWorkingTreeState(workingTreeState))
workingTreeStatus := fmt.Sprintf("(%s)", presentation.FormatWorkingTreeStateLower(self.c.Tr, workingTreeState))
if cursorInSubstring(cx, upstreamStatus+" ", workingTreeStatus) {
return self.c.Helpers().MergeAndRebase.CreateRebaseOptionsMenu()
}

View File

@ -32,37 +32,37 @@ func (self *SubmodulesController) GetKeybindings(opts types.KeybindingsOpts) []*
{
Key: opts.GetKey(opts.Config.Universal.GoInto),
Handler: self.checkSelected(self.enter),
Description: self.c.Tr.LcEnterSubmodule,
Description: self.c.Tr.EnterSubmodule,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.checkSelected(self.remove),
Description: self.c.Tr.LcRemoveSubmodule,
Description: self.c.Tr.RemoveSubmodule,
},
{
Key: opts.GetKey(opts.Config.Submodules.Update),
Handler: self.checkSelected(self.update),
Description: self.c.Tr.LcSubmoduleUpdate,
Description: self.c.Tr.SubmoduleUpdate,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.add,
Description: self.c.Tr.LcAddSubmodule,
Description: self.c.Tr.AddSubmodule,
},
{
Key: opts.GetKey(opts.Config.Universal.Edit),
Handler: self.checkSelected(self.editURL),
Description: self.c.Tr.LcEditSubmoduleUrl,
Description: self.c.Tr.EditSubmoduleUrl,
},
{
Key: opts.GetKey(opts.Config.Submodules.Init),
Handler: self.checkSelected(self.init),
Description: self.c.Tr.LcInitSubmodule,
Description: self.c.Tr.InitSubmodule,
},
{
Key: opts.GetKey(opts.Config.Submodules.BulkMenu),
Handler: self.openBulkActionsMenu,
Description: self.c.Tr.LcViewBulkSubmoduleOptions,
Description: self.c.Tr.ViewBulkSubmoduleOptions,
OpensMenu: true,
},
{
@ -118,19 +118,19 @@ func (self *SubmodulesController) enter(submodule *models.SubmoduleConfig) error
func (self *SubmodulesController) add() error {
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcNewSubmoduleUrl,
Title: self.c.Tr.NewSubmoduleUrl,
HandleConfirm: func(submoduleUrl string) error {
nameSuggestion := filepath.Base(strings.TrimSuffix(submoduleUrl, filepath.Ext(submoduleUrl)))
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcNewSubmoduleName,
Title: self.c.Tr.NewSubmoduleName,
InitialContent: nameSuggestion,
HandleConfirm: func(submoduleName string) error {
return self.c.Prompt(types.PromptOpts{
Title: self.c.Tr.LcNewSubmodulePath,
Title: self.c.Tr.NewSubmodulePath,
InitialContent: submoduleName,
HandleConfirm: func(submodulePath string) error {
return self.c.WithWaitingStatus(self.c.Tr.LcAddingSubmoduleStatus, func() error {
return self.c.WithWaitingStatus(self.c.Tr.AddingSubmoduleStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.AddSubmodule)
err := self.c.Git().Submodule.Add(submoduleName, submodulePath, submoduleUrl)
if err != nil {
@ -149,10 +149,10 @@ func (self *SubmodulesController) add() error {
func (self *SubmodulesController) editURL(submodule *models.SubmoduleConfig) error {
return self.c.Prompt(types.PromptOpts{
Title: fmt.Sprintf(self.c.Tr.LcUpdateSubmoduleUrl, submodule.Name),
Title: fmt.Sprintf(self.c.Tr.UpdateSubmoduleUrl, submodule.Name),
InitialContent: submodule.Url,
HandleConfirm: func(newUrl string) error {
return self.c.WithWaitingStatus(self.c.Tr.LcUpdatingSubmoduleUrlStatus, func() error {
return self.c.WithWaitingStatus(self.c.Tr.UpdatingSubmoduleUrlStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.UpdateSubmoduleUrl)
err := self.c.Git().Submodule.UpdateUrl(submodule.Name, submodule.Path, newUrl)
if err != nil {
@ -166,7 +166,7 @@ func (self *SubmodulesController) editURL(submodule *models.SubmoduleConfig) err
}
func (self *SubmodulesController) init(submodule *models.SubmoduleConfig) error {
return self.c.WithWaitingStatus(self.c.Tr.LcInitializingSubmoduleStatus, func() error {
return self.c.WithWaitingStatus(self.c.Tr.InitializingSubmoduleStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.InitialiseSubmodule)
err := self.c.Git().Submodule.Init(submodule.Path)
if err != nil {
@ -179,12 +179,12 @@ func (self *SubmodulesController) init(submodule *models.SubmoduleConfig) error
func (self *SubmodulesController) openBulkActionsMenu() error {
return self.c.Menu(types.CreateMenuOptions{
Title: self.c.Tr.LcBulkSubmoduleOptions,
Title: self.c.Tr.BulkSubmoduleOptions,
Items: []*types.MenuItem{
{
LabelColumns: []string{self.c.Tr.LcBulkInitSubmodules, style.FgGreen.Sprint(self.c.Git().Submodule.BulkInitCmdObj().ToString())},
LabelColumns: []string{self.c.Tr.BulkInitSubmodules, style.FgGreen.Sprint(self.c.Git().Submodule.BulkInitCmdObj().ToString())},
OnPress: func() error {
return self.c.WithWaitingStatus(self.c.Tr.LcRunningCommand, func() error {
return self.c.WithWaitingStatus(self.c.Tr.RunningCommand, func() error {
self.c.LogAction(self.c.Tr.Actions.BulkInitialiseSubmodules)
err := self.c.Git().Submodule.BulkInitCmdObj().Run()
if err != nil {
@ -197,9 +197,9 @@ func (self *SubmodulesController) openBulkActionsMenu() error {
Key: 'i',
},
{
LabelColumns: []string{self.c.Tr.LcBulkUpdateSubmodules, style.FgYellow.Sprint(self.c.Git().Submodule.BulkUpdateCmdObj().ToString())},
LabelColumns: []string{self.c.Tr.BulkUpdateSubmodules, style.FgYellow.Sprint(self.c.Git().Submodule.BulkUpdateCmdObj().ToString())},
OnPress: func() error {
return self.c.WithWaitingStatus(self.c.Tr.LcRunningCommand, func() error {
return self.c.WithWaitingStatus(self.c.Tr.RunningCommand, func() error {
self.c.LogAction(self.c.Tr.Actions.BulkUpdateSubmodules)
if err := self.c.Git().Submodule.BulkUpdateCmdObj().Run(); err != nil {
return self.c.Error(err)
@ -211,9 +211,9 @@ func (self *SubmodulesController) openBulkActionsMenu() error {
Key: 'u',
},
{
LabelColumns: []string{self.c.Tr.LcBulkDeinitSubmodules, style.FgRed.Sprint(self.c.Git().Submodule.BulkDeinitCmdObj().ToString())},
LabelColumns: []string{self.c.Tr.BulkDeinitSubmodules, style.FgRed.Sprint(self.c.Git().Submodule.BulkDeinitCmdObj().ToString())},
OnPress: func() error {
return self.c.WithWaitingStatus(self.c.Tr.LcRunningCommand, func() error {
return self.c.WithWaitingStatus(self.c.Tr.RunningCommand, func() error {
self.c.LogAction(self.c.Tr.Actions.BulkDeinitialiseSubmodules)
if err := self.c.Git().Submodule.BulkDeinitCmdObj().Run(); err != nil {
return self.c.Error(err)
@ -229,7 +229,7 @@ func (self *SubmodulesController) openBulkActionsMenu() error {
}
func (self *SubmodulesController) update(submodule *models.SubmoduleConfig) error {
return self.c.WithWaitingStatus(self.c.Tr.LcUpdatingSubmoduleStatus, func() error {
return self.c.WithWaitingStatus(self.c.Tr.UpdatingSubmoduleStatus, func() error {
self.c.LogAction(self.c.Tr.Actions.UpdateSubmodule)
err := self.c.Git().Submodule.Update(submodule.Path)
if err != nil {

View File

@ -40,7 +40,7 @@ func (self *SwitchToDiffFilesController) GetKeybindings(opts types.KeybindingsOp
{
Key: opts.GetKey(opts.Config.Universal.GoInto),
Handler: self.checkSelected(self.enter),
Description: self.c.Tr.LcViewItemFiles,
Description: self.c.Tr.ViewItemFiles,
},
}

View File

@ -39,7 +39,7 @@ func (self *SwitchToSubCommitsController) GetKeybindings(opts types.KeybindingsO
{
Handler: self.viewCommits,
Key: opts.GetKey(opts.Config.Universal.GoInto),
Description: self.c.Tr.LcViewCommits,
Description: self.c.Tr.ViewCommits,
},
}

View File

@ -30,12 +30,12 @@ func (self *SyncController) GetKeybindings(opts types.KeybindingsOpts) []*types.
{
Key: opts.GetKey(opts.Config.Universal.Push),
Handler: opts.Guards.NoPopupPanel(self.HandlePush),
Description: self.c.Tr.LcPush,
Description: self.c.Tr.Push,
},
{
Key: opts.GetKey(opts.Config.Universal.Pull),
Handler: opts.Guards.NoPopupPanel(self.HandlePull),
Description: self.c.Tr.LcPull,
Description: self.c.Tr.Pull,
},
}

View File

@ -28,27 +28,27 @@ func (self *TagsController) GetKeybindings(opts types.KeybindingsOpts) []*types.
{
Key: opts.GetKey(opts.Config.Universal.Select),
Handler: self.withSelectedTag(self.checkout),
Description: self.c.Tr.LcCheckout,
Description: self.c.Tr.Checkout,
},
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.withSelectedTag(self.delete),
Description: self.c.Tr.LcDeleteTag,
Description: self.c.Tr.DeleteTag,
},
{
Key: opts.GetKey(opts.Config.Branches.PushTag),
Handler: self.withSelectedTag(self.push),
Description: self.c.Tr.LcPushTag,
Description: self.c.Tr.PushTag,
},
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.create,
Description: self.c.Tr.LcCreateTag,
Description: self.c.Tr.CreateTag,
},
{
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
Handler: self.withSelectedTag(self.createResetMenu),
Description: self.c.Tr.LcViewResetOptions,
Description: self.c.Tr.ViewResetOptions,
OpensMenu: true,
},
}

View File

@ -54,13 +54,13 @@ func (self *UndoController) GetKeybindings(opts types.KeybindingsOpts) []*types.
{
Key: opts.GetKey(opts.Config.Universal.Undo),
Handler: self.reflogUndo,
Description: self.c.Tr.LcUndoReflog,
Description: self.c.Tr.UndoReflog,
Tooltip: self.c.Tr.UndoTooltip,
},
{
Key: opts.GetKey(opts.Config.Universal.Redo),
Handler: self.reflogRedo,
Description: self.c.Tr.LcRedoReflog,
Description: self.c.Tr.RedoReflog,
Tooltip: self.c.Tr.RedoTooltip,
},
}
@ -77,7 +77,7 @@ func (self *UndoController) reflogUndo() error {
undoingStatus := self.c.Tr.UndoingStatus
if self.c.Git().Status.WorkingTreeState() == enums.REBASE_MODE_REBASING {
return self.c.ErrorMsg(self.c.Tr.LcCantUndoWhileRebasing)
return self.c.ErrorMsg(self.c.Tr.CantUndoWhileRebasing)
}
return self.parseReflogForActions(func(counter int, action reflogAction) (bool, error) {
@ -125,7 +125,7 @@ func (self *UndoController) reflogRedo() error {
redoingStatus := self.c.Tr.RedoingStatus
if self.c.Git().Status.WorkingTreeState() == enums.REBASE_MODE_REBASING {
return self.c.ErrorMsg(self.c.Tr.LcCantRedoWhileRebasing)
return self.c.ErrorMsg(self.c.Tr.CantRedoWhileRebasing)
}
return self.parseReflogForActions(func(counter int, action reflogAction) (bool, error) {

View File

@ -14,13 +14,13 @@ func (self *FilesController) createResetMenu() error {
nukeStr := "git reset --hard HEAD && git clean -fd"
if len(self.c.Model().Submodules) > 0 {
nukeStr = fmt.Sprintf("%s (%s)", nukeStr, self.c.Tr.LcAndResetSubmodules)
nukeStr = fmt.Sprintf("%s (%s)", nukeStr, self.c.Tr.AndResetSubmodules)
}
menuItems := []*types.MenuItem{
{
LabelColumns: []string{
self.c.Tr.LcDiscardAllChangesToAllFiles,
self.c.Tr.DiscardAllChangesToAllFiles,
red.Sprint(nukeStr),
},
OnPress: func() error {
@ -36,7 +36,7 @@ func (self *FilesController) createResetMenu() error {
},
{
LabelColumns: []string{
self.c.Tr.LcDiscardAnyUnstagedChanges,
self.c.Tr.DiscardAnyUnstagedChanges,
red.Sprint("git checkout -- ."),
},
OnPress: func() error {
@ -51,7 +51,7 @@ func (self *FilesController) createResetMenu() error {
},
{
LabelColumns: []string{
self.c.Tr.LcDiscardUntrackedFiles,
self.c.Tr.DiscardUntrackedFiles,
red.Sprint("git clean -fd"),
},
OnPress: func() error {
@ -66,7 +66,7 @@ func (self *FilesController) createResetMenu() error {
},
{
LabelColumns: []string{
self.c.Tr.LcDiscardStagedChanges,
self.c.Tr.DiscardStagedChanges,
red.Sprint("stash staged and drop stash"),
},
Tooltip: self.c.Tr.DiscardStagedChangesDescription,
@ -88,7 +88,7 @@ func (self *FilesController) createResetMenu() error {
},
{
LabelColumns: []string{
self.c.Tr.LcSoftReset,
self.c.Tr.SoftReset,
red.Sprint("git reset --soft HEAD"),
},
OnPress: func() error {
@ -118,7 +118,7 @@ func (self *FilesController) createResetMenu() error {
},
{
LabelColumns: []string{
self.c.Tr.LcHardReset,
self.c.Tr.HardReset,
red.Sprint("git reset --hard HEAD"),
},
OnPress: func() error {