1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Update disabled message

This commit is contained in:
Brandon
2025-04-04 23:08:25 -07:00
committed by Stefan Haller
parent 2db0a024bc
commit f75c0af6e0
4 changed files with 9 additions and 9 deletions

View File

@ -1223,7 +1223,7 @@ func (self *FilesController) canRemove(selectedNodes []*filetree.FileNode) *type
return nil return nil
}) })
if uniqueSelectedSubmodules.Len() > 0 && (hasFiles || uniqueSelectedSubmodules.Len() > 1) { if uniqueSelectedSubmodules.Len() > 0 && (hasFiles || uniqueSelectedSubmodules.Len() > 1) {
return &types.DisabledReason{Text: self.c.Tr.RangeSelectNotSupportedForSubmodules} return &types.DisabledReason{Text: self.c.Tr.MultiSelectNotSupportedForSubmodules}
} }
} }

View File

@ -845,7 +845,7 @@ type TranslationSet struct {
NoItemSelected string NoItemSelected string
SelectedItemIsNotABranch string SelectedItemIsNotABranch string
SelectedItemDoesNotHaveFiles string SelectedItemDoesNotHaveFiles string
RangeSelectNotSupportedForSubmodules string MultiSelectNotSupportedForSubmodules string
OldCherryPickKeyWarning string OldCherryPickKeyWarning string
CommandDoesNotSupportOpeningInEditor string CommandDoesNotSupportOpeningInEditor string
CustomCommands string CustomCommands string
@ -1889,7 +1889,7 @@ func EnglishTranslationSet() *TranslationSet {
NoItemSelected: "No item selected", NoItemSelected: "No item selected",
SelectedItemIsNotABranch: "Selected item is not a branch", SelectedItemIsNotABranch: "Selected item is not a branch",
SelectedItemDoesNotHaveFiles: "Selected item does not have files to view", SelectedItemDoesNotHaveFiles: "Selected item does not have files to view",
RangeSelectNotSupportedForSubmodules: "Range select not supported for submodules", MultiSelectNotSupportedForSubmodules: "Multiselection not supported for submodules",
OldCherryPickKeyWarning: "The 'c' key is no longer the default key for copying commits to cherry pick. Please use `{{.copy}}` instead (and `{{.paste}}` to paste). The reason for this change is that the 'v' key for selecting a range of lines when staging is now also used for selecting a range of lines in any list view, meaning that we needed to find a new key for pasting commits, and if we're going to now use `{{.paste}}` for pasting commits, we may as well use `{{.copy}}` for copying them. If you want to configure the keybindings to get the old behaviour, set the following in your config:\n\nkeybinding:\n universal:\n toggleRangeSelect: <something other than v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'", OldCherryPickKeyWarning: "The 'c' key is no longer the default key for copying commits to cherry pick. Please use `{{.copy}}` instead (and `{{.paste}}` to paste). The reason for this change is that the 'v' key for selecting a range of lines when staging is now also used for selecting a range of lines in any list view, meaning that we needed to find a new key for pasting commits, and if we're going to now use `{{.paste}}` for pasting commits, we may as well use `{{.copy}}` for copying them. If you want to configure the keybindings to get the old behaviour, set the following in your config:\n\nkeybinding:\n universal:\n toggleRangeSelect: <something other than v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'",
CommandDoesNotSupportOpeningInEditor: "This command doesn't support switching to the editor", CommandDoesNotSupportOpeningInEditor: "This command doesn't support switching to the editor",
CustomCommands: "Custom commands", CustomCommands: "Custom commands",

View File

@ -75,7 +75,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
Equals(" M my_submodule_path (submodule)"), Equals(" M my_submodule_path (submodule)"),
Equals(" ?? other_file").IsSelected(), Equals(" ?? other_file").IsSelected(),
). ).
// Verify we can't use range select on submodules // Verify we can't reset a submodule and file change at the same time.
Press(keys.Universal.ToggleRangeSelect). Press(keys.Universal.ToggleRangeSelect).
SelectPreviousItem(). SelectPreviousItem().
Lines( Lines(
@ -85,7 +85,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
). ).
Press(keys.Universal.Remove). Press(keys.Universal.Remove).
Tap(func() { Tap(func() {
t.ExpectToast(Contains("Disabled: Range select not supported for submodules")) t.ExpectToast(Contains("Disabled: Multiselection not supported for submodules"))
}). }).
Press(keys.Universal.ToggleRangeSelect). Press(keys.Universal.ToggleRangeSelect).
Lines( Lines(

View File

@ -33,7 +33,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
// Verify we cannot reset the entire folder (has nested file and submodule changes). // Verify we cannot reset the entire folder (has nested file and submodule changes).
Press(keys.Universal.Remove). Press(keys.Universal.Remove).
Tap(func() { Tap(func() {
t.ExpectToast(Contains("Disabled: Range select not supported for submodules")) t.ExpectToast(Contains("Disabled: Multiselection not supported for submodules"))
}). }).
// Verify we cannot reset submodule + file or submodule + submodule via range select. // Verify we cannot reset submodule + file or submodule + submodule via range select.
SelectNextItem(). SelectNextItem().
@ -47,7 +47,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
). ).
Press(keys.Universal.Remove). Press(keys.Universal.Remove).
Tap(func() { Tap(func() {
t.ExpectToast(Contains("Disabled: Range select not supported for submodules")) t.ExpectToast(Contains("Disabled: Multiselection not supported for submodules"))
}). }).
Press(keys.Universal.ToggleRangeSelect). Press(keys.Universal.ToggleRangeSelect).
Press(keys.Universal.ToggleRangeSelect). Press(keys.Universal.ToggleRangeSelect).
@ -60,7 +60,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
). ).
Press(keys.Universal.Remove). Press(keys.Universal.Remove).
Tap(func() { Tap(func() {
t.ExpectToast(Contains("Disabled: Range select not supported for submodules")) t.ExpectToast(Contains("Disabled: Multiselection not supported for submodules"))
}). }).
// Reset the file change. // Reset the file change.
Press(keys.Universal.ToggleRangeSelect). Press(keys.Universal.ToggleRangeSelect).
@ -81,7 +81,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
// Verify we still cannot reset the entire folder (has two submodule changes). // Verify we still cannot reset the entire folder (has two submodule changes).
Press(keys.Universal.Remove). Press(keys.Universal.Remove).
Tap(func() { Tap(func() {
t.ExpectToast(Contains("Disabled: Range select not supported for submodules")) t.ExpectToast(Contains("Disabled: Multiselection not supported for submodules"))
}). }).
// Reset one of the submodule changes. // Reset one of the submodule changes.
SelectNextItem(). SelectNextItem().