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
@@ -34,10 +34,10 @@ func (feishuChannel) DestinationKeys() []string { return []string{"webhook"} }
|
||||
func (feishuChannel) Validate(cfg map[string]any) error {
|
||||
hook := cfgString(cfg, "webhook")
|
||||
if hook == "" {
|
||||
return errors.New("Webhook 주소가 없습니다")
|
||||
return errors.New("缺少 Webhook 地址")
|
||||
}
|
||||
if err := validateHTTPURL(hook); err != nil {
|
||||
return fmt.Errorf("Webhook 주소가 올바르지 않습니다: %w", err)
|
||||
return fmt.Errorf("Webhook 地址无效:%w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -69,13 +69,13 @@ func (c feishuChannel) Send(ctx context.Context, cfg map[string]any, m Message)
|
||||
StatusMessage string `json:"StatusMessage"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &res); err != nil {
|
||||
return 0, fmt.Errorf("Feishu 응답을 해석하지 못했습니다: %w (%s)", err, snippet(raw))
|
||||
return 0, fmt.Errorf("无法解析 Feishu 响应:%w (%s)", err, snippet(raw))
|
||||
}
|
||||
if res.Code != 0 {
|
||||
return 0, Permanent(fmt.Errorf("Feishu에서 오류가 발생했습니다 (%d): %s", res.Code, res.Msg))
|
||||
return 0, Permanent(fmt.Errorf("Feishu 发生错误 (%d):%s", res.Code, res.Msg))
|
||||
}
|
||||
if res.StatusCode != 0 {
|
||||
return 0, Permanent(fmt.Errorf("Feishu에서 오류가 발생했습니다 (%d): %s", res.StatusCode, res.StatusMessage))
|
||||
return 0, Permanent(fmt.Errorf("Feishu 发生错误 (%d):%s", res.StatusCode, res.StatusMessage))
|
||||
}
|
||||
return kept, nil
|
||||
}
|
||||
@@ -133,14 +133,14 @@ func feishuCard(m Message) (map[string]any, int) {
|
||||
elements = append(elements, feishuMarkdownDiv(feishuBatchLine(it, i+1)))
|
||||
}
|
||||
if m.HomeURL != "" {
|
||||
elements = append(elements, feishuButton("플랫폼에서 전체 보기", m.HomeURL))
|
||||
elements = append(elements, feishuButton("在平台查看全部", m.HomeURL))
|
||||
}
|
||||
} else if len(m.Items) > 0 {
|
||||
kept = 1
|
||||
it := m.Items[0]
|
||||
elements = append(elements, feishuMarkdownDiv(feishuItemLines(it)))
|
||||
if it.DetailURL != "" {
|
||||
elements = append(elements, feishuButton("상세 보기", it.DetailURL))
|
||||
elements = append(elements, feishuButton("查看详情", it.DetailURL))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,18 +179,18 @@ func feishuButton(label, url string) map[string]any {
|
||||
func feishuItemLines(it Item) string {
|
||||
out := fmt.Sprintf("**%s · %s**", SeverityLabel(it.Severity), markdownText(it.Title(), 0))
|
||||
if it.IsStatusChange() {
|
||||
out += fmt.Sprintf("\n**상태 변경**: %s → %s",
|
||||
out += fmt.Sprintf("\n**状态变更**:%s → %s",
|
||||
markdownText(StatusLabel(it.FromStatus), 0), markdownText(StatusLabel(it.ToStatus), 0))
|
||||
}
|
||||
if it.VulnClass != "" && it.VulnClass != it.Title() {
|
||||
out += fmt.Sprintf("\n**유형**: %s", markdownText(it.VulnClass, 0))
|
||||
out += fmt.Sprintf("\n**类型**:%s", markdownText(it.VulnClass, 0))
|
||||
}
|
||||
if a := assetLine(it.Assets, maxAssetsShown); a != "" {
|
||||
out += fmt.Sprintf("\n**자산**: %s", markdownText(a, 0))
|
||||
out += fmt.Sprintf("\n**资产**:%s", markdownText(a, 0))
|
||||
}
|
||||
if it.Summary != "" {
|
||||
if s := markdownText(it.Summary, maxSummaryRunes); s != "" {
|
||||
out += fmt.Sprintf("\n**개요**: %s", s)
|
||||
out += fmt.Sprintf("\n**概要**:%s", s)
|
||||
}
|
||||
}
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user