There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Chinese (zh) LLM translation prompt to produce more natural, developer-oriented Simplified Chinese by adding detailed style guidance and expanding the glossary.
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| | 将其复制到...文件中 | 复制到...里 | "将其" is literary, not spoken | | ||
| | 该行显示了...的URL地址 | 这行告诉你...的地址 | "该" as a pronoun is stiff; "地址" already implies URL | | ||
| | 你将会看到 | 你会看到 | "将会" is news-anchor tone | | ||
| | 它并非...而只是... | 不是...就是... | "并非...而只是" is essay-style | |
| | ❌ Don't write | ✅ Write instead | Why | | ||
| |---|---|---| | ||
| | 将其复制到...文件中 | 复制到...里 | "将其" is literary, not spoken | | ||
| | 该行显示了...的URL地址 | 这行告诉你...的地址 | "该" as a pronoun is stiff; "地址" already implies URL | | ||
| | 你将会看到 | 你会看到 | "将会" is news-anchor tone | |
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: 25f140371c
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
| | 将其复制到...文件中 | 复制到...里 | "将其" is literary, not spoken | | ||
| | 该行显示了...的URL地址 | 这行告诉你...的地址 | "该" as a pronoun is stiff; "地址" already implies URL | | ||
| | 你将会看到 | 你会看到 | "将会" is news-anchor tone | | ||
| | 它并非...而只是... | 不是...就是... | "并非...而只是" is essay-style | |
There was a problem hiding this comment.
Preserve negation in the replacement pattern
When the source means “not X, but only Y” (the exact case represented by 它并非...而只是...), the suggested replacement 不是...就是... changes the meaning to an either/or construction in Chinese. Because this prompt is used to generate future zh translations, that pattern can make the LLM drop the original negation and produce semantically incorrect docs instead of just less formal wording.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
📝 Docs previewLast commit 9df073a at: https://fcbf70b2.fastapitiangolo.pages.dev |
Sorry, something went wrong.
|
Thanks for testing! The translations look much more natural now. A few highlights:
LGTM. Ready for native speaker review. |
Sorry, something went wrong.
|
👋 Friendly bump on this PR — it's been 3 weeks since the last activity. @YuriiMotov has tested the updated prompt and confirmed the translation quality improved significantly (see #15717 for the comparison diff). The PR now only needs a native Chinese speaker to sign off on the final prompt wording. I'm a native Chinese speaker and have self-reviewed, but it'd be great to have another pair of eyes. @waketzheng would you mind taking a quick look? Or anyone familiar with the Chinese docs — a 10-minute review of the final diff would be much appreciated. Thanks! |
Sorry, something went wrong.
What
Improve docs/zh/llm-prompt.md — the prompt that drives LLM-generated Chinese translations — to eliminate common AI-style writing patterns.
Problem
The current Chinese translations are grammatically correct but read like AI output: overly formal, verbose, with English-influenced sentence structure. Examples from the live docs:
The root cause: the translation prompt has glossary and formatting rules, but zero guidance on writing style.
Changes
Added a "Writing style" section to docs/zh/llm-prompt.md:
Also refined "Grammar and tone" to explicitly state "用'你'不用'您'" and add guidance on dropping unnecessary subjects.
Total: 1 file changed, +73/-4 lines.
Why this approach
FastAPI's contributing guide says the best way to improve zh translations is to improve the LLM prompt — this changes the source, not the symptoms.