From c65f3aa22fb71aa7684fd9e0474a7d4efffca932 Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Sat, 14 Sep 2024 14:45:25 +1000 Subject: [PATCH] Fix typos --- docs/dev/Busy.md | 2 +- docs/keybindings/Keybindings_en.md | 2 +- docs/keybindings/Keybindings_ja.md | 2 +- docs/keybindings/Keybindings_ko.md | 2 +- docs/keybindings/Keybindings_nl.md | 2 +- docs/keybindings/Keybindings_ru.md | 2 +- docs/keybindings/Keybindings_zh-TW.md | 2 +- pkg/commands/oscommands/os_test.go | 2 +- pkg/gui/context/list_context_trait.go | 2 +- pkg/gui/controllers/files_controller.go | 2 +- pkg/gui/controllers/helpers/refs_helper.go | 6 +++--- .../controllers/helpers/window_arrangement_helper_test.go | 2 +- pkg/gui/controllers/helpers/working_tree_helper.go | 6 +++--- pkg/gui/controllers/local_commits_controller.go | 8 ++++---- pkg/gui/patch_exploring/state.go | 2 +- pkg/i18n/english.go | 2 +- pkg/integration/clients/go_test.go | 2 +- pkg/integration/components/env.go | 2 +- pkg/integration/tests/demo/shared.go | 2 +- pkg/integration/tests/sync/fetch_prune.go | 2 +- pkg/integration/tests/test_list_generator.go | 2 +- pkg/integration/tests/ui/accordion.go | 2 +- .../tests/worktree/bare_repo_worktree_config.go | 2 +- 23 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/dev/Busy.md b/docs/dev/Busy.md index 17c5dc80b23..6aa3b7bb59b 100644 --- a/docs/dev/Busy.md +++ b/docs/dev/Busy.md @@ -2,7 +2,7 @@ ## The use-case -This topic deserves its own doc because there there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process: +This topic deserves its own doc because there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process: 1) press a key 2) wait until Lazygit is idle 3) run assertion / press another key diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 214b7359a6d..2e95d6dfdf9 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | Checkout | Checkout the selected tag tag as a detached HEAD. | +| `` `` | Checkout | Checkout the selected tag as a detached HEAD. | | `` n `` | New tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | Delete | View delete options for local/remote tag. | | `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index a433e97b6dc..198b9da50e4 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -180,7 +180,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | チェックアウト | Checkout the selected tag tag as a detached HEAD. | +| `` `` | チェックアウト | Checkout the selected tag as a detached HEAD. | | `` n `` | タグを作成 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | Delete | View delete options for local/remote tag. | | `` P `` | タグをpush | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index cbafa9476e1..40e072b242b 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -321,7 +321,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | 체크아웃 | Checkout the selected tag tag as a detached HEAD. | +| `` `` | 체크아웃 | Checkout the selected tag as a detached HEAD. | | `` n `` | 태그를 생성 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | Delete | View delete options for local/remote tag. | | `` P `` | 태그를 push | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index f63dc02600e..224df04afd4 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | Uitchecken | Checkout the selected tag tag as a detached HEAD. | +| `` `` | Uitchecken | Checkout the selected tag as a detached HEAD. | | `` n `` | Creëer tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | Delete | View delete options for local/remote tag. | | `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md index 2fa0a5d2279..5166123e3af 100644 --- a/docs/keybindings/Keybindings_ru.md +++ b/docs/keybindings/Keybindings_ru.md @@ -286,7 +286,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | Переключить | Checkout the selected tag tag as a detached HEAD. | +| `` `` | Переключить | Checkout the selected tag as a detached HEAD. | | `` n `` | Создать тег | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | Delete | View delete options for local/remote tag. | | `` P `` | Отправить тег | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md index 9ffc983d7b0..40b122d00f5 100644 --- a/docs/keybindings/Keybindings_zh-TW.md +++ b/docs/keybindings/Keybindings_zh-TW.md @@ -282,7 +282,7 @@ If you would instead like to start an interactive rebase from the selected commi | Key | Action | Info | |-----|--------|-------------| -| `` `` | 檢出 | Checkout the selected tag tag as a detached HEAD. | +| `` `` | 檢出 | Checkout the selected tag as a detached HEAD. | | `` n `` | 建立標籤 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` d `` | 刪除 | View delete options for local/remote tag. | | `` P `` | 推送標籤 | Push the selected tag to a remote. You'll be prompted to select a remote. | diff --git a/pkg/commands/oscommands/os_test.go b/pkg/commands/oscommands/os_test.go index fbae7685e5a..ecae92b18a2 100644 --- a/pkg/commands/oscommands/os_test.go +++ b/pkg/commands/oscommands/os_test.go @@ -122,7 +122,7 @@ func TestOSCommandFileType(t *testing.T) { }, }, { - "nonExistant", + "nonExistent", func() {}, func(output string) { assert.EqualValues(t, "other", output) diff --git a/pkg/gui/context/list_context_trait.go b/pkg/gui/context/list_context_trait.go index 874e4648ff5..1c059fb4ff8 100644 --- a/pkg/gui/context/list_context_trait.go +++ b/pkg/gui/context/list_context_trait.go @@ -131,7 +131,7 @@ func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool { return false } -// By default, list contexts supporta range select +// By default, list contexts supports range select func (self *ListContextTrait) RangeSelectEnabled() bool { return true } diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index 5380c890975..f3985dba95d 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -664,7 +664,7 @@ func (self *FilesController) handleAmendCommitPress() error { Title: self.c.Tr.AmendLastCommitTitle, Prompt: self.c.Tr.SureToAmend, HandleConfirm: func() error { - return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { + return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error { if len(self.c.Model().Commits) == 0 { return errors.New(self.c.Tr.NoCommitToAmend) } diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go index 8332174dcb9..0374e355cf4 100644 --- a/pkg/gui/controllers/helpers/refs_helper.go +++ b/pkg/gui/controllers/helpers/refs_helper.go @@ -74,7 +74,7 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions return options.OnRefNotFound(ref) } - if IsSwitchBranchUncommitedChangesError(err) { + if IsSwitchBranchUncommittedChangesError(err) { // offer to autostash changes self.c.OnUIThread(func() error { // (Before showing the prompt, render again to remove the inline status) @@ -305,7 +305,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest newBranchFunc = self.c.Git().Branch.NewWithoutTracking } if err := newBranchFunc(newBranchName, from); err != nil { - if IsSwitchBranchUncommitedChangesError(err) { + if IsSwitchBranchUncommittedChangesError(err) { // offer to autostash changes self.c.Confirm(types.ConfirmOpts{ Title: self.c.Tr.AutoStashTitle, @@ -365,6 +365,6 @@ func (self *RefsHelper) ParseRemoteBranchName(fullBranchName string) (string, st return remoteName, branchName, true } -func IsSwitchBranchUncommitedChangesError(err error) bool { +func IsSwitchBranchUncommittedChangesError(err error) bool { return strings.Contains(err.Error(), "Please commit your changes or stash them before you switch branch") } diff --git a/pkg/gui/controllers/helpers/window_arrangement_helper_test.go b/pkg/gui/controllers/helpers/window_arrangement_helper_test.go index b429e00ae42..e69a4bf3a1f 100644 --- a/pkg/gui/controllers/helpers/window_arrangement_helper_test.go +++ b/pkg/gui/controllers/helpers/window_arrangement_helper_test.go @@ -422,7 +422,7 @@ func renderLayout(windows map[string]boxlayout.Dimensions) string { return dimensionsA.X0 < dimensionsB.X0 }) - // Uniquefy windows by dimensions (so perfectly overlapping windows are de-duped). This prevents getting 'fileshes' as a label where the files and branches windows overlap. + // Uniquify windows by dimensions (so perfectly overlapping windows are de-duped). This prevents getting 'fileshes' as a label where the files and branches windows overlap. // branches windows overlap. windowNames = lo.UniqBy(windowNames, func(windowName string) boxlayout.Dimensions { return windows[windowName] diff --git a/pkg/gui/controllers/helpers/working_tree_helper.go b/pkg/gui/controllers/helpers/working_tree_helper.go index a6033083a44..f010205f550 100644 --- a/pkg/gui/controllers/helpers/working_tree_helper.go +++ b/pkg/gui/controllers/helpers/working_tree_helper.go @@ -87,7 +87,7 @@ func (self *WorkingTreeHelper) OpenMergeTool() error { } func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error { - return self.WithEnsureCommitableFiles(func() error { + return self.WithEnsureCommittableFiles(func() error { self.commitsHelper.OpenCommitMessagePanel( &OpenCommitMessagePanelOpts{ CommitIndex: context.NoCommitIndex, @@ -131,7 +131,7 @@ func (self *WorkingTreeHelper) switchFromCommitMessagePanelToEditor(filepath str // HandleCommitEditorPress - handle when the user wants to commit changes via // their editor rather than via the popup panel func (self *WorkingTreeHelper) HandleCommitEditorPress() error { - return self.WithEnsureCommitableFiles(func() error { + return self.WithEnsureCommittableFiles(func() error { self.c.LogAction(self.c.Tr.Actions.Commit) return self.c.RunSubprocessAndRefresh( self.c.Git().Commit.CommitEditorCmdObj(), @@ -172,7 +172,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error { return self.HandleCommitPressWithMessage(message) } -func (self *WorkingTreeHelper) WithEnsureCommitableFiles(handler func() error) error { +func (self *WorkingTreeHelper) WithEnsureCommittableFiles(handler func() error) error { if err := self.prepareFilesForCommit(); err != nil { return err } diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 8d2d31700bc..4d20e3d3a5c 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -696,7 +696,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error { Title: self.c.Tr.AmendCommitTitle, Prompt: self.c.Tr.AmendCommitPrompt, HandleConfirm: func() error { - return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { + return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error { if err := self.c.Helpers().AmendHelper.AmendHead(); err != nil { return err } @@ -712,7 +712,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error { Title: self.c.Tr.AmendCommitTitle, Prompt: self.c.Tr.AmendCommitPrompt, HandleConfirm: func() error { - return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { + return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error { return self.c.WithWaitingStatus(self.c.Tr.AmendingStatus, func(gocui.Task) error { self.c.LogAction(self.c.Tr.Actions.AmendCommit) err := self.c.Git().Rebase.AmendTo(self.c.Model().Commits, self.context().GetView().SelectedLineIdx()) @@ -888,7 +888,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err Label: self.c.Tr.FixupMenu_Fixup, Key: 'f', OnPress: func() error { - return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { + return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error { self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit) return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error { if err := self.c.Git().Commit.CreateFixupCommit(commit.Hash); err != nil { @@ -911,7 +911,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err Label: self.c.Tr.FixupMenu_AmendWithChanges, Key: 'a', OnPress: func() error { - return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { + return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error { return self.createAmendCommit(commit, true) }) }, diff --git a/pkg/gui/patch_exploring/state.go b/pkg/gui/patch_exploring/state.go index 4c20b7a51b4..b3da4813951 100644 --- a/pkg/gui/patch_exploring/state.go +++ b/pkg/gui/patch_exploring/state.go @@ -32,7 +32,7 @@ const ( func NewState(diff string, selectedLineIdx int, oldState *State, log *logrus.Entry) *State { if oldState != nil && diff == oldState.diff && selectedLineIdx == -1 { // if we're here then we can return the old state. If selectedLineIdx was not -1 - // then that would mean we were trying to click and potentiall drag a range, which + // then that would mean we were trying to click and potentially drag a range, which // is why in that case we continue below return oldState } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index e141a614ccb..66acc2a5320 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -1058,7 +1058,7 @@ func EnglishTranslationSet() *TranslationSet { Checkout: "Checkout", CheckoutTooltip: "Checkout selected item.", CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch", - TagCheckoutTooltip: "Checkout the selected tag tag as a detached HEAD.", + TagCheckoutTooltip: "Checkout the selected tag as a detached HEAD.", RemoteBranchCheckoutTooltip: "Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.", CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled", FileFilter: "Filter files by status", diff --git a/pkg/integration/clients/go_test.go b/pkg/integration/clients/go_test.go index af4bbf5f88e..26f092a81cd 100644 --- a/pkg/integration/clients/go_test.go +++ b/pkg/integration/clients/go_test.go @@ -4,7 +4,7 @@ package clients // This file allows you to use `go test` to run integration tests. -// See See pkg/integration/README.md for more info. +// See pkg/integration/README.md for more info. import ( "bytes" diff --git a/pkg/integration/components/env.go b/pkg/integration/components/env.go index d3cdf467f60..e7a8a694196 100644 --- a/pkg/integration/components/env.go +++ b/pkg/integration/components/env.go @@ -19,7 +19,7 @@ const ( // which is good to test for. PWD = "PWD" - // We set $HOME and $GIT_CONFIG_NOGLOBAL during integrationt tests so + // We set $HOME and $GIT_CONFIG_NOGLOBAL during integration tests so // that older versions of git that don't respect $GIT_CONFIG_GLOBAL // will find the correct global config file for testing HOME = "HOME" diff --git a/pkg/integration/tests/demo/shared.go b/pkg/integration/tests/demo/shared.go index 88fbd348fa4..f7253128946 100644 --- a/pkg/integration/tests/demo/shared.go +++ b/pkg/integration/tests/demo/shared.go @@ -14,6 +14,6 @@ func setGeneratedAuthorColours(config *config.AppConfig) { } func setDefaultDemoConfig(config *config.AppConfig) { - // demos look much nicers with icons shown + // demos look much nicer with icons shown config.GetUserConfig().Gui.NerdFontsVersion = "3" } diff --git a/pkg/integration/tests/sync/fetch_prune.go b/pkg/integration/tests/sync/fetch_prune.go index ae34306a308..7c3625ec989 100644 --- a/pkg/integration/tests/sync/fetch_prune.go +++ b/pkg/integration/tests/sync/fetch_prune.go @@ -23,7 +23,7 @@ var FetchPrune = NewIntegrationTest(NewIntegrationTestArgs{ shell.SetBranchUpstream("master", "origin/master") shell.SetBranchUpstream("branch_to_remove", "origin/branch_to_remove") - // # unbenownst to our test repo we're removing the branch on the remote, so upon + // # unbeknownst to our test repo we're removing the branch on the remote, so upon // # fetching with prune: true we expect git to realise the remote branch is gone shell.RemoveRemoteBranch("origin", "branch_to_remove") }, diff --git a/pkg/integration/tests/test_list_generator.go b/pkg/integration/tests/test_list_generator.go index 6951dad57f6..3d5407bf691 100644 --- a/pkg/integration/tests/test_list_generator.go +++ b/pkg/integration/tests/test_list_generator.go @@ -33,7 +33,7 @@ func main() { } func generateCode() []byte { - // traverse parent directory to get all subling directories + // traverse parent directory to get all sibling directories directories, err := os.ReadDir("../tests") if err != nil { panic(err) diff --git a/pkg/integration/tests/ui/accordion.go b/pkg/integration/tests/ui/accordion.go index abfe27dbba1..ef1fbaea327 100644 --- a/pkg/integration/tests/ui/accordion.go +++ b/pkg/integration/tests/ui/accordion.go @@ -5,7 +5,7 @@ import ( . "github.com/jesseduffield/lazygit/pkg/integration/components" ) -// When in acccordion mode, Lazygit looks like this: +// When in accordion mode, Lazygit looks like this: // // ╶─Status─────────────────────────╴┌─Patch──────────────────────────────────────────────────────────┐ // ╶─Files - Submodules──────0 of 0─╴│commit 6e56dd04b70e548976f7f2928c4d9c359574e2bc ▲ diff --git a/pkg/integration/tests/worktree/bare_repo_worktree_config.go b/pkg/integration/tests/worktree/bare_repo_worktree_config.go index 364134cc2c9..c66aa507610 100644 --- a/pkg/integration/tests/worktree/bare_repo_worktree_config.go +++ b/pkg/integration/tests/worktree/bare_repo_worktree_config.go @@ -8,7 +8,7 @@ import ( // This case is identical to dotfile_bare_repo.go, except // that it invokes lazygit with $GIT_DIR set but not // $GIT_WORK_TREE. Instead, the repo uses the core.worktree -// config to identify the main worktre. +// config to identify the main worktree. var BareRepoWorktreeConfig = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Open lazygit in the worktree of a vcsh-style bare repo and add a file and commit",