fix conflict

This commit is contained in:
Yuki Osaki 2021-10-29 20:29:41 +09:00
parent 3df068b1fc
commit ada3b528d3
3 changed files with 21 additions and 6 deletions

View file

@ -2,6 +2,7 @@ package presentation
import (
"fmt"
"strconv"
"strings"
"github.com/jesseduffield/lazygit/pkg/commands/models"
@ -42,6 +43,21 @@ func getBranchDisplayStrings(b *models.Branch, fullDescription bool, diffed, sho
}
res := []string{recencyColor.Sprint(b.Recency), coloredName}
if showGithub {
if b.PR != nil {
colour := style.FgMagenta // = state MERGED
switch b.PR.State {
case "OPEN":
colour = style.FgGreen
case "CLOSED":
colour = style.FgRed
}
res = append(res, colour.Sprint("#"+strconv.Itoa(b.PR.Number)))
} else {
res = append(res, "")
}
}
if fullDescription {
return append(res, style.FgYellow.Sprint(b.UpstreamName))
}

View file

@ -163,7 +163,7 @@ func chineseTranslationSet() TranslationSet {
SwitchRepo: `切换到最近的仓库`,
LcAllBranchesLogGraph: `显示所有分支的日志`,
UnsupportedGitService: `不支持的 git 服务`,
LcCreatePullRequest: `创建抓取请求`,
LcCreateOrOpenPullRequestOptions: `创建抓取请求`,
LcCopyPullRequestURL: `将抓取请求 URL 复制到剪贴板`,
NoBranchOnRemote: `该分支在远程上不存在. 您需要先将其推送到远程.`,
LcFetch: `抓取`,
@ -436,9 +436,8 @@ func chineseTranslationSet() TranslationSet {
ToggleWhitespaceInDiffView: "切换是否在差异视图中显示空白更改",
IgnoringWhitespaceInDiffView: "差异视图中的空格将被忽略",
ShowingWhitespaceInDiffView: "空白将显示在差异视图中",
CreatePullRequest: "创建抓取请求",
CreatePullRequestOptions: "创建抓取请求选项",
LcCreatePullRequestOptions: "创建抓取请求选项",
LcCreateOrShowPullRequest: "创建抓取请求",
CreateOrOpenPullRequestOptions: "创建抓取请求选项",
LcDefaultBranch: "默认分支",
LcSelectBranch: "选择分支",
CreatingPullRequestAtUrl: "在 URL 创建抓取请求: %s",

View file

@ -107,7 +107,7 @@ func polishTranslationSet() TranslationSet {
ConfirmQuit: "Na pewno chcesz wyjść z programu?",
LcAllBranchesLogGraph: "pokaż wszystkie logi gałęzi",
UnsupportedGitService: "Nieobsługiwana usługa git",
LcCreatePullRequest: "utwórz żądanie pobrania",
LcCreateOrShowPullRequest: `maak of laat een pull-request zien`,
LcCopyPullRequestURL: "skopiuj adres URL żądania pobrania do schowka",
NoBranchOnRemote: "Ta gałąź nie istnieje w zdalnym repo. Najpierw musisz ją wysłać.",
LcFetch: "pobierz",
@ -231,6 +231,6 @@ func polishTranslationSet() TranslationSet {
CommitMessageCopiedToClipboard: "Komunikat commita skopiowany do schowka",
LcCopiedToClipboard: "skopiowany do schowka",
CreateOrOpenPullRequestOptions: "Utwórz opcje żądania ściągnięcia",
LcCreateOrOpenPullRequestOptions: "utwórz opcje żądania ściągnięcia",
LcCreateOrOpenPullRequestOptions: "utwórz opcje żądania",
}
}