[Localization] Misleading Chinese translation for TS2561 error message
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
まず、提供されている TypeScript の例を tsc --locale zh-CN で実行し、ローカライズされた TS2561 診断を確認します。プロパティが PageState 型に存在しないことを示すように中国語の文言を更新し、その後再現手順をもう一度実行して、修正後のメッセージが英語の意味を保持していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 126
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
Possible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TypeScript#64094 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#63959 · コメント 5 件 ·
-
Domain: lib.d.ts Help Wanted
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
microsoft/TypeScript#63722 · コメント 4 件 · リアクション 1 件 ·
microsoft/TypeScript の issue をすべて見る
似ている issue
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
kind/bug status/0-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
🤔 refinement needed
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
equinor/radix-operator#1979 ·