Skip to content

Commit

Permalink
Merge pull request jesseduffield#2110 from mark2185/fix-ignore-or-exc…
Browse files Browse the repository at this point in the history
…lude-file-menu
  • Loading branch information
jesseduffield authored Aug 14, 2022
2 parents f999c90 + 0ff5b74 commit 39e9266
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<kbd>C</kbd>: commit changes using git editor
<kbd>e</kbd>: edit file
<kbd>o</kbd>: open file
<kbd>i</kbd>: Ignore or Exclude file
<kbd>i</kbd>: ignore or exclude file
<kbd>r</kbd>: refresh files
<kbd>s</kbd>: stash all changes
<kbd>S</kbd>: view stash options
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<kbd>C</kbd>: Git 편집기를 사용하여 변경 내용을 커밋합니다.
<kbd>e</kbd>: 파일 편집
<kbd>o</kbd>: 파일 닫기
<kbd>i</kbd>: Ignore file
<kbd>i</kbd>: ignore file
<kbd>r</kbd>: 파일 새로고침
<kbd>s</kbd>: 변경사항을 Stash
<kbd>S</kbd>: Stash 옵션 보기
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_nl.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<kbd>C</kbd>: commit veranderingen met de git editor
<kbd>e</kbd>: verander bestand
<kbd>o</kbd>: open bestand
<kbd>i</kbd>: Ignore or Exclude file
<kbd>i</kbd>: ignore or exclude file
<kbd>r</kbd>: refresh bestanden
<kbd>s</kbd>: stash-bestanden
<kbd>S</kbd>: bekijk stash opties
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 @@ -125,7 +125,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
<kbd>C</kbd>: Zatwierdź zmiany używając edytora
<kbd>e</kbd>: edytuj plik
<kbd>o</kbd>: otwórz plik
<kbd>i</kbd>: Ignore or Exclude file
<kbd>i</kbd>: ignore or exclude file
<kbd>r</kbd>: odśwież pliki
<kbd>s</kbd>: przechowaj zmiany
<kbd>S</kbd>: wyświetl opcje schowka
Expand Down
7 changes: 4 additions & 3 deletions pkg/gui/controllers/files_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types
{
Key: opts.GetKey(opts.Config.Files.IgnoreOrExcludeFile),
Handler: self.checkSelectedFileNode(self.ignoreOrExcludeMenu),
Description: self.c.Tr.Actions.IgnoreExcludeFile,
Description: self.c.Tr.Actions.LcIgnoreExcludeFile,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Files.RefreshFiles),
Expand Down Expand Up @@ -501,7 +502,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.IgnoreExcludeFile, self.git.WorkingTree.Ignore)
err := self.ignoreOrExcludeFile(node, self.c.Tr.IgnoreTracked, self.c.Tr.IgnoreTrackedPrompt, self.c.Tr.Actions.LcIgnoreExcludeFile, self.git.WorkingTree.Ignore)
if err != nil {
return err
}
Expand All @@ -527,7 +528,7 @@ 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.IgnoreExcludeFile,
Title: self.c.Tr.Actions.LcIgnoreExcludeFile,
Items: []*types.MenuItem{
{
LabelColumns: []string{self.c.Tr.LcIgnoreFile},
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/chinese.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func chineseTranslationSet() TranslationSet {
UnstageFile: "取消暂存文件",
UnstageAllFiles: "取消暂存所有文件",
StageAllFiles: "暂存所有文件",
IgnoreExcludeFile: "忽略文件",
LcIgnoreExcludeFile: "忽略文件",
Commit: "提交 (Commit)",
EditFile: "编辑文件",
Push: "推送 (Push)",
Expand Down
6 changes: 2 additions & 4 deletions pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@ type Actions struct {
UnstageFile string
UnstageAllFiles string
StageAllFiles string
IgnoreExcludeFile string
IgnoreFile string
LcIgnoreExcludeFile string
IgnoreFileErr string
ExcludeFile string
ExcludeFileErr string
Expand Down Expand Up @@ -1190,8 +1189,7 @@ func EnglishTranslationSet() TranslationSet {
UnstageFile: "Unstage file",
UnstageAllFiles: "Unstage all files",
StageAllFiles: "Stage all files",
IgnoreExcludeFile: "Ignore or Exclude file",
IgnoreFile: "Ignore or Exclude file",
LcIgnoreExcludeFile: "ignore or exclude file",
IgnoreFileErr: "Cannot ignore .gitignore",
ExcludeFile: "Exclude file",
ExcludeFileErr: "Cannot exclude .git/info/exclude",
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/japanese.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ func japaneseTranslationSet() TranslationSet {
UnstageFile: "ファイルをアンステージ",
UnstageAllFiles: "すべてのファイルをアンステージ",
StageAllFiles: "すべてのファイルをステージ",
IgnoreExcludeFile: "ファイルをignore",
LcIgnoreExcludeFile: "ファイルをignore",
Commit: "コミット",
EditFile: "ファイルを編集",
Push: "Push",
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/korean.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func koreanTranslationSet() TranslationSet {
UnstageFile: "Unstage file",
UnstageAllFiles: "Unstage all files",
StageAllFiles: "Stage all files",
IgnoreExcludeFile: "Ignore file",
LcIgnoreExcludeFile: "ignore file",
Commit: "커밋",
EditFile: "파일 수정",
Push: "푸시",
Expand Down

0 comments on commit 39e9266

Please sign in to comment.