fix(i18n): use English runtime text and localize system UI

This commit is contained in:
Arthur Koba
2026-10-25 19:44:15 +03:00
parent ada0550571
commit 65a96670d5
289 changed files with 8092 additions and 3426 deletions
+6 -6
View File
@@ -23,29 +23,29 @@ const (
func ParseStatusCodeTag(tag string) (lo, hi int, err error) {
tag = strings.TrimSpace(tag)
if tag == "" {
return 0, 0, errors.New("状态码标签不能为空")
return 0, 0, errors.New("status code tag must not be empty")
}
if before, after, ok := strings.Cut(tag, "-"); ok {
lo, err = strconv.Atoi(before)
if err != nil {
return 0, 0, fmt.Errorf("无效状态码区间: %s", tag)
return 0, 0, fmt.Errorf("invalid status code range: %s", tag)
}
hi, err = strconv.Atoi(after)
if err != nil {
return 0, 0, fmt.Errorf("无效状态码区间: %s", tag)
return 0, 0, fmt.Errorf("invalid status code range: %s", tag)
}
} else {
lo, err = strconv.Atoi(tag)
if err != nil {
return 0, 0, fmt.Errorf("无效状态码: %s", tag)
return 0, 0, fmt.Errorf("invalid status code: %s", tag)
}
hi = lo
}
if lo > hi {
return 0, 0, fmt.Errorf("状态码区间左右端点反序: %s", tag)
return 0, 0, fmt.Errorf("status code range endpoints are reversed: %s", tag)
}
if lo < StatusCodeMin || hi > StatusCodeMax {
return 0, 0, fmt.Errorf("状态码须在 %d–%d: %s", StatusCodeMin, StatusCodeMax, tag)
return 0, 0, fmt.Errorf("status code must be between %d and %d: %s", StatusCodeMin, StatusCodeMax, tag)
}
return lo, hi, nil
}