diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index e094f4910..f9887d7e3 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -41,28 +41,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct [: previous tab -## Branches - -
- ctrl+o: copy branch name to clipboard - i: show git-flow options - space: checkout - n: new branch - o: create pull request - O: create pull request options - ctrl+y: copy pull request URL to clipboard - c: checkout by name - F: force checkout - d: delete branch - r: rebase checked-out branch onto this branch - M: merge into currently checked out branch - f: fast-forward this branch from its upstream - g: view reset options - R: rename branch - u: set/unset upstream - enter: view commits -- ## Commit Files
@@ -137,6 +115,28 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct f: fetch+## Local Branches + +
+ ctrl+o: copy branch name to clipboard + i: show git-flow options + space: checkout + n: new branch + o: create pull request + O: create pull request options + ctrl+y: copy pull request URL to clipboard + c: checkout by name + F: force checkout + d: delete branch + r: rebase checked-out branch onto this branch + M: merge into currently checked out branch + f: fast-forward this branch from its upstream + g: view reset options + R: rename branch + u: set/unset upstream + enter: view commits ++ ## Main Panel (Merging)
diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index 761d745d7..b3f11b93f 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -194,10 +194,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct R: ブランチ名を変更 u: set/unset upstream enter: コミットを閲覧 - f: リモートをfetch - n: リモートを新規追加 - d: リモートを削除 - e: リモートを編集## メインパネル (Merging) @@ -259,6 +255,15 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct E: edit hunk +## リモート + +
+ f: リモートをfetch + n: リモートを新規追加 + d: リモートを削除 + e: リモートを編集 ++ ## リモートブランチ
diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index b18d18730..99c97e594 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -41,28 +41,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct [: previous tab-## Branches - -
- ctrl+o: copy branch name to clipboard - i: show git-flow options - space: przełącz - n: nowa gałąź - o: utwórz żądanie pobrania - O: utwórz opcje żądania ściągnięcia - ctrl+y: skopiuj adres URL żądania pobrania do schowka - c: przełącz używając nazwy - F: wymuś przełączenie - d: usuń gałąź - r: zmiana bazy gałęzi - M: scal do obecnej gałęzi - f: fast-forward this branch from its upstream - g: wyświetl opcje resetu - R: rename branch - u: set/unset upstream - enter: view commits -- ## Commity
@@ -96,6 +74,28 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct enter: przeglądaj pliki commita+## Local Branches + +
+ ctrl+o: copy branch name to clipboard + i: show git-flow options + space: przełącz + n: nowa gałąź + o: utwórz żądanie pobrania + O: utwórz opcje żądania ściągnięcia + ctrl+y: skopiuj adres URL żądania pobrania do schowka + c: przełącz używając nazwy + F: wymuś przełączenie + d: usuń gałąź + r: zmiana bazy gałęzi + M: scal do obecnej gałęzi + f: fast-forward this branch from its upstream + g: wyświetl opcje resetu + R: rename branch + u: set/unset upstream + enter: view commits ++ ## Main Panel (Patch Building)
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go
index 86580fb2e..a8593e9f3 100644
--- a/pkg/gui/branches_panel.go
+++ b/pkg/gui/branches_panel.go
@@ -13,7 +13,7 @@ func (gui *Gui) branchesRenderToMain() error {
return gui.refreshMainViews(refreshMainOpts{
main: &viewUpdateOpts{
- title: "Log",
+ title: gui.c.Tr.LogTitle,
task: task,
},
})
diff --git a/pkg/gui/context/context.go b/pkg/gui/context/context.go
index 00d472db2..c2001b215 100644
--- a/pkg/gui/context/context.go
+++ b/pkg/gui/context/context.go
@@ -143,42 +143,3 @@ type TabContext struct {
Tab string
Context types.Context
}
-
-func (tree ContextTree) InitialViewTabContextMap() map[string][]TabContext {
- return map[string][]TabContext{
- "branches": {
- {
- Tab: "Local Branches",
- Context: tree.Branches,
- },
- {
- Tab: "Remotes",
- Context: tree.Remotes,
- },
- {
- Tab: "Tags",
- Context: tree.Tags,
- },
- },
- "commits": {
- {
- Tab: "Commits",
- Context: tree.LocalCommits,
- },
- {
- Tab: "Reflog",
- Context: tree.ReflogCommits,
- },
- },
- "files": {
- {
- Tab: "Files",
- Context: tree.Files,
- },
- {
- Tab: "Submodules",
- Context: tree.Submodules,
- },
- },
- }
-}
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index a75ef897c..3f07fb986 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -343,7 +343,7 @@ func (gui *Gui) resetState(filterPath string, reuseState bool) {
Diffing: diffing.New(),
},
ViewContextMap: viewContextMap,
- ViewTabContextMap: contextTree.InitialViewTabContextMap(),
+ ViewTabContextMap: gui.initialViewTabContextMap(contextTree),
ScreenMode: screenMode,
// TODO: put contexts in the context manager
ContextManager: NewContextManager(initialContext),
@@ -466,6 +466,45 @@ func (gui *Gui) initGocui() (*gocui.Gui, error) {
return g, nil
}
+func (gui *Gui) initialViewTabContextMap(contextTree *context.ContextTree) map[string][]context.TabContext {
+ return map[string][]context.TabContext{
+ "branches": {
+ {
+ Tab: gui.c.Tr.LocalBranchesTitle,
+ Context: contextTree.Branches,
+ },
+ {
+ Tab: gui.c.Tr.RemotesTitle,
+ Context: contextTree.Remotes,
+ },
+ {
+ Tab: gui.c.Tr.TagsTitle,
+ Context: contextTree.Tags,
+ },
+ },
+ "commits": {
+ {
+ Tab: gui.c.Tr.CommitsTitle,
+ Context: contextTree.LocalCommits,
+ },
+ {
+ Tab: gui.c.Tr.ReflogCommitsTitle,
+ Context: contextTree.ReflogCommits,
+ },
+ },
+ "files": {
+ {
+ Tab: gui.c.Tr.FilesTitle,
+ Context: contextTree.Files,
+ },
+ {
+ Tab: gui.c.Tr.SubmodulesTitle,
+ Context: contextTree.Submodules,
+ },
+ },
+ }
+}
+
// Run: setup the gui with keybindings and start the mainloop
func (gui *Gui) Run(filterPath string) error {
g, err := gui.initGocui()
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 20d2c37f2..d7910d18b 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -868,7 +868,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
}
}
- for viewName := range self.State.Contexts.InitialViewTabContextMap() {
+ for viewName := range self.initialViewTabContextMap(self.State.Contexts) {
bindings = append(bindings, []*types.Binding{
{
ViewName: viewName,
@@ -914,7 +914,7 @@ func (gui *Gui) resetKeybindings() error {
}
}
- for viewName := range gui.State.Contexts.InitialViewTabContextMap() {
+ for viewName := range gui.initialViewTabContextMap(gui.State.Contexts) {
viewName := viewName
tabClickCallback := func(tabIndex int) error { return gui.onViewTabClick(viewName, tabIndex) }
diff --git a/pkg/gui/recent_repos_panel.go b/pkg/gui/recent_repos_panel.go
index 86f1bd6ab..dc2f9f17f 100644
--- a/pkg/gui/recent_repos_panel.go
+++ b/pkg/gui/recent_repos_panel.go
@@ -39,7 +39,7 @@ func (gui *Gui) handleShowAllBranchLogs() error {
return gui.refreshMainViews(refreshMainOpts{
main: &viewUpdateOpts{
- title: "Log",
+ title: gui.c.Tr.LogTitle,
task: task,
},
})
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index 570eeeab3..3eea542c6 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -24,6 +24,7 @@ type TranslationSet struct {
MergingTitle string
MergeConfirmTitle string
NormalTitle string
+ LogTitle string
CommitMessage string
CredentialsUsername string
CredentialsPassword string
@@ -647,6 +648,7 @@ func EnglishTranslationSet() TranslationSet {
StagingTitle: "Main Panel (Staging)",
MergingTitle: "Main Panel (Merging)",
NormalTitle: "Main Panel (Normal)",
+ LogTitle: "Log",
CommitMessage: "Commit message",
CredentialsUsername: "Username",
CredentialsPassword: "Password",
@@ -809,7 +811,7 @@ func EnglishTranslationSet() TranslationSet {
MergeOptionsTitle: "Merge Options",
RebaseOptionsTitle: "Rebase Options",
CommitMessageTitle: "Commit Message",
- LocalBranchesTitle: "Branches",
+ LocalBranchesTitle: "Local Branches",
SearchTitle: "Search",
TagsTitle: "Tags",
MenuTitle: "Menu",
diff --git a/pkg/i18n/japanese.go b/pkg/i18n/japanese.go
index 8bc366627..64cf5adc1 100644
--- a/pkg/i18n/japanese.go
+++ b/pkg/i18n/japanese.go
@@ -33,6 +33,7 @@ func japaneseTranslationSet() TranslationSet {
StagingTitle: "メインパネル (Staging)",
MergingTitle: "メインパネル (Merging)",
NormalTitle: "メインパネル (Normal)",
+ LogTitle: "ログ",
CommitMessage: "コミットメッセージ",
CredentialsUsername: "ユーザ名",
CredentialsPassword: "パスワード",
@@ -193,7 +194,7 @@ func japaneseTranslationSet() TranslationSet {
SearchTitle: "検索",
TagsTitle: "タグ",
MenuTitle: "メニュー",
- RemotesTitle: "ブランチ",
+ RemotesTitle: "リモート",
RemoteBranchesTitle: "リモートブランチ",
PatchBuildingTitle: "メインパネル (Patch Building)",
InformationTitle: "Information",
@@ -248,9 +249,9 @@ func japaneseTranslationSet() TranslationSet {
// CheckingOutStatus: "checking out",
// CommittingStatus: "committing",
CommitFiles: "Commit files",
- SubCommitsDynamicTitle: "Commits (%s)",
+ SubCommitsDynamicTitle: "コミット (%s)",
CommitFilesDynamicTitle: "Diff files (%s)",
- RemoteBranchesDynamicTitle: "Remote branches (%s)",
+ RemoteBranchesDynamicTitle: "リモートブランチ (%s)",
// LcViewItemFiles: "view selected item's files",
CommitFilesTitle: "コミットファイル",
// LcCheckoutCommitFile: "checkout file",
@@ -461,7 +462,7 @@ func japaneseTranslationSet() TranslationSet {
ShowingWhitespaceInDiffView: "空白文字の変更は差分画面に表示されます",
// IncreaseContextInDiffView: "Increase the size of the context shown around changes in the diff view",
// DecreaseContextInDiffView: "Decrease the size of the context shown around changes in the diff view",
- CreatePullRequest: "pull requestを作成s",
+ CreatePullRequest: "pull requestを作成",
// CreatePullRequestOptions: "Create pull request options",
// LcCreatePullRequestOptions: "create pull request options",
LcDefaultBranch: "デフォルトブランチ",