From 9ceaf5b9a9df52bb65632510f6403177a1c94e7e Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 30 Aug 2018 14:09:08 +0200 Subject: [PATCH] move descriptions to i18n --- pkg/gui/keybindings.go | 10 +++++----- pkg/i18n/english.go | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index e8ddb68d5..c4a77e6c4 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -27,11 +27,11 @@ func (gui *Gui) getKeybindings() []Binding { {ViewName: "", Key: 'p', Modifier: gocui.ModNone, Handler: gui.pullFiles}, {ViewName: "", Key: 'R', Modifier: gocui.ModNone, Handler: gui.handleRefresh}, {ViewName: "", Key: '?', Modifier: gocui.ModNone, Handler: gui.handleHelp}, - {ViewName: "status", Key: 'e', Modifier: gocui.ModNone, Handler: gui.handleEditConfig, KeyReadable: "e", Description: "edit config"}, - {ViewName: "status", Key: 'o', Modifier: gocui.ModNone, Handler: gui.handleOpenConfig, KeyReadable: "o", Description: "open config"}, - {ViewName: "status", Key: 'u', Modifier: gocui.ModNone, Handler: gui.handleCheckForUpdate, KeyReadable: "u", Description: "check for update"}, - {ViewName: "files", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleCommitPress}, - {ViewName: "files", Key: 'C', Modifier: gocui.ModNone, Handler: gui.handleCommitEditorPress}, + {ViewName: "status", Key: 'e', Modifier: gocui.ModNone, Handler: gui.handleEditConfig, KeyReadable: "e", Description: gui.Tr.SLocalize("EditConfig")}, + {ViewName: "status", Key: 'o', Modifier: gocui.ModNone, Handler: gui.handleOpenConfig, KeyReadable: "o", Description: gui.Tr.SLocalize("OpenConfig")}, + {ViewName: "status", Key: 'u', Modifier: gocui.ModNone, Handler: gui.handleCheckForUpdate, KeyReadable: "u", Description: gui.Tr.SLocalize("CheckForUpdate")}, + {ViewName: "files", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleCommitPress, KeyReadable: "c", Description: gui.Tr.SLocalize("CommitChanges")}, + {ViewName: "files", Key: 'C', Modifier: gocui.ModNone, Handler: gui.handleCommitEditorPress, KeyReadable: "C", Description: gui.Tr.SLocalize("CommitChangesWithEditor")}, {ViewName: "files", Key: gocui.KeySpace, Modifier: gocui.ModNone, Handler: gui.handleFilePress}, {ViewName: "files", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleFileRemove}, {ViewName: "files", Key: 'm', Modifier: gocui.ModNone, Handler: gui.handleSwitchToMerge}, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index c29138e42..83931ac73 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -42,6 +42,9 @@ func addEnglish(i18nObject *i18n.Bundle) error { }, &i18n.Message{ ID: "CommitChanges", Other: "commit changes", + }, &i18n.Message{ + ID: "CommitChangesWithEditor", + Other: "commit changes using git editor", }, &i18n.Message{ ID: "StatusTitle", Other: "Status",