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:
@@ -8,22 +8,22 @@ import (
|
||||
// assertRetestReasonKorean 은 재검증 사유 상수가 한글을 포함하고 중국어 한자가 없음을
|
||||
// 단언한다(F9). FinishFindingRetest·RecoverFindingRetests 의 SQL 리터럴 자리에 상수로
|
||||
// 이어 붙이므로, 상수를 핀 고정하면 패널에 노출되는 사용자 문구도 함께 보호된다.
|
||||
func assertRetestReasonKorean(t *testing.T, name, s string) {
|
||||
func assertRetestReasonChinese(t *testing.T, name, s string) {
|
||||
t.Helper()
|
||||
if s == "" {
|
||||
t.Fatalf("%s: 빈 문자열", name)
|
||||
t.Fatalf("%s: 空字符串", name)
|
||||
}
|
||||
hasHangul := false
|
||||
hasHan := false
|
||||
for _, r := range s {
|
||||
if unicode.Is(unicode.Han, r) {
|
||||
t.Fatalf("%s: 중국어 한자가 남아 있습니다: %q", name, s)
|
||||
}
|
||||
if unicode.Is(unicode.Hangul, r) {
|
||||
hasHangul = true
|
||||
t.Fatalf("%s: 仍残留韩文: %q", name, s)
|
||||
}
|
||||
if unicode.Is(unicode.Han, r) {
|
||||
hasHan = true
|
||||
}
|
||||
}
|
||||
if !hasHangul {
|
||||
t.Fatalf("%s: 한글이 없습니다: %q", name, s)
|
||||
if !hasHan {
|
||||
t.Fatalf("%s: 缺少汉字: %q", name, s)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,6 @@ func assertRetestReasonKorean(t *testing.T, name, s string) {
|
||||
// server/conversations.go 의 형제 사유(convRetest*)와 같은 컬럼·패널이라, 둘 중 하나만
|
||||
// 한국어면 같은 패널에서 언어가 섞인다.
|
||||
func TestFindingRetestReasonsLocalized(t *testing.T) {
|
||||
assertRetestReasonKorean(t, "retestNoConclusionReason", retestNoConclusionReason)
|
||||
assertRetestReasonKorean(t, "retestServiceRestartReason", retestServiceRestartReason)
|
||||
assertRetestReasonChinese(t, "retestNoConclusionReason", retestNoConclusionReason)
|
||||
assertRetestReasonChinese(t, "retestServiceRestartReason", retestServiceRestartReason)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user