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:
@ -1223,7 +1223,7 @@ func (self *FilesController) canRemove(selectedNodes []*filetree.FileNode) *type
|
||||
return nil
|
||||
})
|
||||
if uniqueSelectedSubmodules.Len() > 0 && (hasFiles || uniqueSelectedSubmodules.Len() > 1) {
|
||||
return &types.DisabledReason{Text: self.c.Tr.RangeSelectNotSupportedForSubmodules}
|
||||
return &types.DisabledReason{Text: self.c.Tr.MultiSelectNotSupportedForSubmodules}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,7 @@ type TranslationSet struct {
|
||||
NoItemSelected string
|
||||
SelectedItemIsNotABranch string
|
||||
SelectedItemDoesNotHaveFiles string
|
||||
RangeSelectNotSupportedForSubmodules string
|
||||
MultiSelectNotSupportedForSubmodules string
|
||||
OldCherryPickKeyWarning string
|
||||
CommandDoesNotSupportOpeningInEditor string
|
||||
CustomCommands string
|
||||
@ -1889,7 +1889,7 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
NoItemSelected: "No item selected",
|
||||
SelectedItemIsNotABranch: "Selected item is not a branch",
|
||||
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'",
|
||||
CommandDoesNotSupportOpeningInEditor: "This command doesn't support switching to the editor",
|
||||
CustomCommands: "Custom commands",
|
||||
|
@ -75,7 +75,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Equals(" M my_submodule_path (submodule)"),
|
||||
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).
|
||||
SelectPreviousItem().
|
||||
Lines(
|
||||
@ -85,7 +85,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Universal.Remove).
|
||||
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).
|
||||
Lines(
|
||||
|
@ -33,7 +33,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
// Verify we cannot reset the entire folder (has nested file and submodule changes).
|
||||
Press(keys.Universal.Remove).
|
||||
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.
|
||||
SelectNextItem().
|
||||
@ -47,7 +47,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Universal.Remove).
|
||||
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).
|
||||
@ -60,7 +60,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Universal.Remove).
|
||||
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.
|
||||
Press(keys.Universal.ToggleRangeSelect).
|
||||
@ -81,7 +81,7 @@ var ResetFolder = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
// Verify we still cannot reset the entire folder (has two submodule changes).
|
||||
Press(keys.Universal.Remove).
|
||||
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.
|
||||
SelectNextItem().
|
||||
|
Reference in New Issue
Block a user