Skip to content

fix(i18n): correct Chinese translation for TS2561#63300

Closed
hnshah wants to merge 1 commit intomicrosoft:mainfrom
hnshah:fix/zh-cn-ts2561-translation
Closed

fix(i18n): correct Chinese translation for TS2561#63300
hnshah wants to merge 1 commit intomicrosoft:mainfrom
hnshah:fix/zh-cn-ts2561-translation

Conversation

@hnshah
Copy link

@hnshah hnshah commented Mar 25, 2026

Summary

Fixes #63274

The current Simplified Chinese translation for error TS2561 has reversed logic that confuses developers.

The Problem

Current (incorrect):

对象字面量只能指定已知的属性,但"{0}"中不存在类型"{1}"。

This literally means: "but type '{1}' does not exist in '{0}'" — backwards!

English original:

Object literal may only specify known properties, but '{0}' does not exist in type '{1}'.

The Fix

Corrected translation:

对象字面量只能指定已知属性,但"{0}"在类型"{1}"中不存在。

Now correctly means: "but '{0}' does not exist in type '{1}'"

Additional Improvements

  • Removed unnecessary possessive particle "的" for cleaner phrasing
  • Changed "是否要写入" to more natural "您是否想写" (Did you want to write)
  • Added quotes around the third parameter for consistency with English

Testing

Verified the corrected translation is grammatically correct and accurately conveys the original English meaning.

Impact

Improves developer experience for Chinese-speaking TypeScript users by providing accurate, understandable error messages.

The current Chinese translation for error TS2561 has reversed logic:
- Current (wrong): "但'{0}'中不存在类型'{1}'"
  (literally: "but type '{1}' does not exist in '{0}'")
- Fixed (correct): "但'{0}'在类型'{1}'中不存在"
  (correctly: "but '{0}' does not exist in type '{1}'")

The word order was backwards, making the error message confusing and
grammatically incorrect for Chinese developers.

Also improved phrasing:
- Removed unnecessary "的" (possessive particle)
- Changed "是否要写入" to more natural "您是否想写"
- Added quotes around {2} for consistency with English

Fixes microsoft#63274
@hnshah
Copy link
Author

hnshah commented Mar 25, 2026

@microsoft-github-policy-service agree

@RyanCavanaugh
Copy link
Member

Localizations are sourced from our loc team, so these will get overwritten on their next merge. Unfortunately we don't have a way to directly upstream user-provided translation improvements.

@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Mar 25, 2026
@hnshah hnshah deleted the fix/zh-cn-ts2561-translation branch March 25, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Localization] Misleading Chinese translation for TS2561 error message

2 participants