Skip to content

Commit

Permalink
Rename "Delete change" menu entry to "Discard change" in staging panel
Browse files Browse the repository at this point in the history
For consistency with the previous commit.

Note that this menu entry is used both for unstaged and for staged changes, and
for staged changes it is not quite accurate, as we are not discarding changes in
that case (just unstaging them). Not sure it's worth fixing this; it's still
better than "Delete", anyway.
  • Loading branch information
stefanhaller committed Jun 5, 2023
1 parent a86da6d commit 9cf7505
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
<kbd>&lt;esc&gt;</kbd>: Return to files panel
<kbd>&lt;tab&gt;</kbd>: Switch to other panel (staged/unstaged changes)
<kbd>&lt;space&gt;</kbd>: Toggle line staged / unstaged
<kbd>d</kbd>: Delete change (git reset)
<kbd>d</kbd>: Discard change (git reset)
<kbd>E</kbd>: Edit hunk
<kbd>c</kbd>: Commit changes
<kbd>w</kbd>: Commit changes without pre-commit hook
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
<kbd>&lt;esc&gt;</kbd>: Wróć do panelu plików
<kbd>&lt;tab&gt;</kbd>: Switch to other panel (staged/unstaged changes)
<kbd>&lt;space&gt;</kbd>: Toggle line staged / unstaged
<kbd>d</kbd>: Delete change (git reset)
<kbd>d</kbd>: Discard change (git reset)
<kbd>E</kbd>: Edit hunk
<kbd>c</kbd>: Zatwierdź zmiany
<kbd>w</kbd>: Zatwierdź zmiany bez skryptu pre-commit
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/controllers/staging_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ
{
Key: opts.GetKey(opts.Config.Universal.Remove),
Handler: self.ResetSelection,
Description: self.c.Tr.ResetSelection,
Description: self.c.Tr.DiscardSelection,
},
{
Key: opts.GetKey(opts.Config.Main.EditSelectHunk),
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/chinese.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func chineseTranslationSet() TranslationSet {
FileEnter: `暂存单个 块/行 用于文件, 或 折叠/展开 目录`,
FileStagingRequirements: `只能暂存跟踪文件的单独行`,
StageSelection: `切换行暂存状态`,
ResetSelection: `取消变更 (git reset)`,
DiscardSelection: `取消变更 (git reset)`,
ToggleDragSelect: `切换拖动选择`,
ToggleSelectHunk: `切换选择区块`,
ToggleSelectionForPatch: `添加/移除 行到补丁`,
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/dutch.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func dutchTranslationSet() TranslationSet {
FileEnter: `Stage individuele hunks/lijnen`,
FileStagingRequirements: `Kan alleen individuele lijnen stagen van getrackte bestanden met onstaged veranderingen`,
StageSelection: `Toggle lijnen staged / unstaged`,
ResetSelection: `Verwijdert change (git reset)`,
DiscardSelection: `Verwijdert change (git reset)`,
ToggleDragSelect: `Toggle drag selecteer`,
ToggleSelectHunk: `Toggle selecteer hunk`,
ToggleSelectionForPatch: `Voeg toe/verwijder lijn(en) in patch`,
Expand Down
4 changes: 2 additions & 2 deletions pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ type TranslationSet struct {
FileEnter string
FileStagingRequirements string
StageSelection string
ResetSelection string
DiscardSelection string
ToggleDragSelect string
ToggleSelectHunk string
ToggleSelectionForPatch string
Expand Down Expand Up @@ -859,7 +859,7 @@ func EnglishTranslationSet() TranslationSet {
FileEnter: `Stage individual hunks/lines for file, or collapse/expand for directory`,
FileStagingRequirements: `Can only stage individual lines for tracked files`,
StageSelection: `Toggle line staged / unstaged`,
ResetSelection: `Delete change (git reset)`,
DiscardSelection: `Discard change (git reset)`,
ToggleDragSelect: `Toggle drag select`,
ToggleSelectHunk: `Toggle select hunk`,
ToggleSelectionForPatch: `Add/Remove line(s) to patch`,
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/japanese.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func japaneseTranslationSet() TranslationSet {
// FileEnter: `stage individual hunks/lines for file, or collapse/expand for directory`,
// FileStagingRequirements: `Can only stage individual lines for tracked files`,
StageSelection: `選択行をステージ/アンステージ`,
ResetSelection: `変更を削除 (git reset)`,
DiscardSelection: `変更を削除 (git reset)`,
ToggleDragSelect: `範囲選択を切り替え`,
ToggleSelectHunk: `Hunk選択を切り替え`,
ToggleSelectionForPatch: `行をパッチに追加/削除`,
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/korean.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func koreanTranslationSet() TranslationSet {
FileEnter: `Stage individual hunks/lines for file, or collapse/expand for directory`,
FileStagingRequirements: `추적된 파일에 대해 개별 라인만 stage할 수 있습니다.`,
StageSelection: `선택한 행을 staged / unstaged`,
ResetSelection: `변경을 삭제 (git reset)`,
DiscardSelection: `변경을 삭제 (git reset)`,
ToggleDragSelect: `드래그 선택 전환`,
ToggleSelectHunk: `Toggle select hunk`,
ToggleSelectionForPatch: `Line(s)을 패치에 추가/삭제`,
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/traditional_chinese.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func traditionalChineseTranslationSet() TranslationSet {
FileEnter: `選擇檔案中的單個程式碼塊/行,或展開/折疊目錄`,
FileStagingRequirements: `只能選擇跟踪檔案中的單個行`,
StageSelection: `切換現有行的狀態 (已預存/未預存)`,
ResetSelection: `刪除變更 (git reset)`,
DiscardSelection: `刪除變更 (git reset)`,
ToggleDragSelect: `切換拖曳選擇`,
ToggleSelectHunk: `切換選擇程式碼塊`,
ToggleSelectionForPatch: `向 (或從) 補丁中添加/刪除行`,
Expand Down

0 comments on commit 9cf7505

Please sign in to comment.