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:
@@ -15,11 +15,11 @@ import (
|
||||
// leftover Chinese Han characters. The format constant is checked after
|
||||
// formatting so the %s/%d verbs resolve to a concrete message.
|
||||
func TestTaskTemplateErrorConstantsLocalized(t *testing.T) {
|
||||
assertKoreanError(t, "request-too-large", errTaskTemplateRequestTooLarge)
|
||||
assertKoreanError(t, "name-conflict", errTaskTemplateNameConflict)
|
||||
assertKoreanError(t, "rule-invalid", errTaskTemplateRuleInvalid)
|
||||
assertKoreanError(t, "no-fields", errTaskTemplateNoFields)
|
||||
assertKoreanError(t, "field-too-long",
|
||||
assertChineseError(t, "request-too-large", errTaskTemplateRequestTooLarge)
|
||||
assertChineseError(t, "name-conflict", errTaskTemplateNameConflict)
|
||||
assertChineseError(t, "rule-invalid", errTaskTemplateRuleInvalid)
|
||||
assertChineseError(t, "no-fields", errTaskTemplateNoFields)
|
||||
assertChineseError(t, "field-too-long",
|
||||
fmt.Sprintf(errTaskTemplateFieldTooLongFmt, "name", db.MaxTaskTemplateNameRunes))
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestTaskTemplateResponsesLocalized(t *testing.T) {
|
||||
if rec.Code != http.StatusRequestEntityTooLarge {
|
||||
t.Fatalf("too-large status=%d, want 413", rec.Code)
|
||||
}
|
||||
assertKoreanError(t, "too-large", decodeErrorField(t, rec.Body.Bytes()))
|
||||
assertChineseError(t, "too-large", decodeErrorField(t, rec.Body.Bytes()))
|
||||
|
||||
// validateTaskTemplateRequest — a name past the rune limit returns the
|
||||
// Korean field-too-long error (surfaced via writeErr in the handlers).
|
||||
@@ -49,7 +49,7 @@ func TestTaskTemplateResponsesLocalized(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("name-too-long: 검증이 통과해서는 안 됩니다")
|
||||
}
|
||||
assertKoreanError(t, "name-too-long", err.Error())
|
||||
assertChineseError(t, "name-too-long", err.Error())
|
||||
|
||||
// writeTaskTemplateErr — the name-conflict sentinel maps to the Korean 409.
|
||||
rec = httptest.NewRecorder()
|
||||
@@ -57,5 +57,5 @@ func TestTaskTemplateResponsesLocalized(t *testing.T) {
|
||||
if rec.Code != http.StatusConflict {
|
||||
t.Fatalf("name-conflict status=%d, want 409", rec.Code)
|
||||
}
|
||||
assertKoreanError(t, "name-conflict-response", decodeErrorField(t, rec.Body.Bytes()))
|
||||
assertChineseError(t, "name-conflict-response", decodeErrorField(t, rec.Body.Bytes()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user