Localize user-facing UI, agent output, and backend messages to Simplified Chinese
ci / go (push) Waiting to run
ci / go-db (agent) (push) Waiting to run
ci / go-db (config) (push) Waiting to run
ci / go-db (db) (push) Waiting to run
ci / go-db (evidence) (push) Waiting to run
ci / go-db (llmrec) (push) Waiting to run
ci / go-db (server) (push) Waiting to run
detections / detections (push) Waiting to run
docs / links (push) Waiting to run
web / web (push) Waiting to run
ci / go (push) Waiting to run
ci / go-db (agent) (push) Waiting to run
ci / go-db (config) (push) Waiting to run
ci / go-db (db) (push) Waiting to run
ci / go-db (evidence) (push) Waiting to run
ci / go-db (llmrec) (push) Waiting to run
ci / go-db (server) (push) Waiting to run
detections / detections (push) Waiting to run
docs / links (push) Waiting to run
web / web (push) Waiting to run
This commit is contained in:
+11
-11
@@ -72,10 +72,10 @@ func markdownText(s string, maxRunes int) string {
|
||||
// 出现了 `\(1\)` 这种可见的反斜杠。
|
||||
func markdownTitle(m Message) string {
|
||||
if m.Batch {
|
||||
return fmt.Sprintf("취약점 요약 · 총 %d건", len(m.Items))
|
||||
return fmt.Sprintf("漏洞汇总 · 共 %d 条", len(m.Items))
|
||||
}
|
||||
if len(m.Items) == 0 {
|
||||
return "취약점 알림"
|
||||
return "漏洞通知"
|
||||
}
|
||||
it := m.Items[0]
|
||||
return fmt.Sprintf("[%s] %s", SeverityLabel(it.Severity), OneLine(it.Title(), 0))
|
||||
@@ -103,7 +103,7 @@ func markdownBody(m Message, maxBytes int) (string, int) {
|
||||
|
||||
footer := ""
|
||||
if m.HomeURL != "" {
|
||||
footer = fmt.Sprintf("\n[플랫폼에서 전체 보기](%s)\n", m.HomeURL)
|
||||
footer = fmt.Sprintf("\n[在平台查看全部](%s)\n", m.HomeURL)
|
||||
}
|
||||
kept := packItemCount(m.Items, maxBytes, markdownReservedBytes, footer, byteSize, func(it Item, idx int) string {
|
||||
var b strings.Builder
|
||||
@@ -130,12 +130,12 @@ func markdownBody(m Message, maxBytes int) (string, int) {
|
||||
func markdownBatchIntro(m Message, items []Item, total int) string {
|
||||
var b strings.Builder
|
||||
if m.WindowMinutes > 0 {
|
||||
fmt.Fprintf(&b, "**최근 %d분간 신규 취약점 %d건**", m.WindowMinutes, total)
|
||||
fmt.Fprintf(&b, "**最近 %d 分钟新增漏洞 %d 条**", m.WindowMinutes, total)
|
||||
} else {
|
||||
fmt.Fprintf(&b, "**신규 취약점 %d건**", total)
|
||||
fmt.Fprintf(&b, "**新增漏洞 %d 条**", total)
|
||||
}
|
||||
if extra := total - len(items); extra > 0 {
|
||||
fmt.Fprintf(&b, "(이 메시지에는 앞 %d건만 표시하며, 나머지 %d건은 다음 메시지에서 이어서 보냅니다)", len(items), extra)
|
||||
fmt.Fprintf(&b, "(本条仅显示前 %d 条,其余 %d 条将在下一条消息中继续发送)", len(items), extra)
|
||||
}
|
||||
// 按级别给出分布,让读者一眼看到有没有严重项。只统计**本条实际包含**的
|
||||
// 条目,保证「严重 3」和下面能数出来的条目一致。
|
||||
@@ -183,21 +183,21 @@ func writeItem(b *strings.Builder, it Item, prefix string, single bool) {
|
||||
}
|
||||
b.WriteString(line + "\n")
|
||||
if it.IsStatusChange() {
|
||||
fmt.Fprintf(b, "**상태 변경**: %s → %s\n",
|
||||
fmt.Fprintf(b, "**状态变更**:%s → %s\n",
|
||||
markdownText(StatusLabel(it.FromStatus), 0), markdownText(StatusLabel(it.ToStatus), 0))
|
||||
}
|
||||
if it.VulnClass != "" && it.VulnClass != it.Title() {
|
||||
fmt.Fprintf(b, "**유형**: %s\n", markdownText(it.VulnClass, 0))
|
||||
fmt.Fprintf(b, "**类型**:%s\n", markdownText(it.VulnClass, 0))
|
||||
}
|
||||
if a := assetLine(it.Assets, maxAssetsShown); a != "" {
|
||||
fmt.Fprintf(b, "**자산**: %s\n", markdownText(a, 0))
|
||||
fmt.Fprintf(b, "**资产**:%s\n", markdownText(a, 0))
|
||||
}
|
||||
if it.Summary != "" {
|
||||
if s := markdownText(it.Summary, maxSummaryRunes); s != "" {
|
||||
fmt.Fprintf(b, "**개요**: %s\n", s)
|
||||
fmt.Fprintf(b, "**概要**:%s\n", s)
|
||||
}
|
||||
}
|
||||
if it.DetailURL != "" {
|
||||
fmt.Fprintf(b, "[상세 보기](%s)\n", it.DetailURL)
|
||||
fmt.Fprintf(b, "[查看详情](%s)\n", it.DetailURL)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user