[Localization] Misleading Chinese translation for TS2561 error message

Đang mở Phù hợp với người mới
#63,274 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
compilers, localization

Hướng nghiên cứu

Bắt đầu bằng cách chạy ví dụ TypeScript được cung cấp với tsc --locale zh-CN và kiểm tra chẩn đoán TS2561 đã được bản địa hóa. Cập nhật cách diễn đạt bằng tiếng Trung để mô tả thuộc tính là không tồn tại trong kiểu PageState, sau đó chạy lại bản tái hiện và xác nhận rằng thông báo đã sửa vẫn giữ nguyên ý nghĩa tiếng Anh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug Domain: Error Messages i18n
Acknowledgement
  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment

Hello TypeScript team,

I encountered a confusing and potentially misleading translation in the Chinese (zh-CN) diagnostic message for error TS2561.

Current Chinese message:

对象字面量只能指定已知的属性,但“comprehensiveFilterTab”中不存在类型“PageState”。是否要写入 comprehensiveFilterList?

Original English message:

Object literal may only specify known properties, but 'comprehensiveFilterTab' does not exist in type 'PageState'. Did you mean to write 'comprehensiveFilterList'?

Issue:
The Chinese translation says:

“但‘comprehensiveFilterTab’中不存在类型‘PageState’”
which literally means “but type ‘PageState’ does not exist in ‘comprehensiveFilterTab’”.

This reverses the logical relationship and is grammatically incorrect, leading developers to misunderstand the error. It should convey that the property 'comprehensiveFilterTab' does not exist in the type 'PageState', not the other way around.

Suggested correction (Chinese):

对象字面量只能指定已知属性,但“comprehensiveFilterTab”在类型“PageState”中不存在。您是否想写“comprehensiveFilterList”?

This version preserves the original meaning and uses natural, unambiguous Chinese.

How to reproduce:
Run tsc --locale zh-CN on code that triggers TS2561, e.g.:

type PageState = { comprehensiveFilterList: string[] };
const state: PageState = { comprehensiveFilterTab: [] }; // TS2561

Thank you for your attention! Accurate error messages are crucial for non-English developers.

Ngôn ngữ chính
Go
Star
111k
Fork
14.4k
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
117

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/TypeScript

Tất cả issue của microsoft/TypeScript

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.