Skip to content

🌐 [translation-sync] BUG: Fix Samuelson quadratic formula - #282

Open
mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-09-26T00-24-21-pr-1066
Open

mmcky wants to merge 2 commits into
mainfrom
translation-sync-2026-09-26T00-24-21-pr-1066

Conversation

@mmcky

@mmcky mmcky commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python.myst.

Source PR

#1066 - BUG: Fix Samuelson quadratic formula

Files Updated

  • ✏️ lectures/samuelson.md
  • ✏️ .translate/state/samuelson.md.yml

Details

  • Source Language: en
  • Target Language: zh-cn
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI lite review requested due to automatic review settings September 26, 2026 00:24
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Sep 26, 2026
@netlify

netlify Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 13c0006
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6ab710bb4b46000008e78e1c
😎 Deploy Preview https://deploy-preview-282--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-09-26
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 8/10
Overall 8.9/10

Summary: 本次PR涉及的"手动或人工求根计算"和"将所有内容封装到类中"两部分翻译整体质量很高,术语准确、格式完整、无语法错误。主要问题是代码注释中出现了源文中不存在的补充说明,以及个别措辞略显口语化,但均为轻微问题,不影响整体理解和技术准确性。 变更部分的专业术语(如特征多项式、根、反向推导、脉冲响应函数等)翻译准确且与术语表保持一致 代码块、数学公式和MyST语法结构完整保留,未出现语法错误 长句的拆分和调整使译文在中文语境下阅读流畅自然

Suggestions:

  • [minor · accuracy] lectures/samuelson.md — ### 手动或"人工"求根计算 - code comments: 在"Manual or by hand root calculations"部分的代码翻译中,多处添加了源文本中没有的中文注释(如 # 生成两个复根、# 隐含的 ρ1, ρ2、# 反向推导验证这些的 α 和 β、# 时间单位中的周期长度),这些是译者新增的内容,源代码中并不存在这些注释。虽然有助于理解,但这属于对原文的增添,不完全符合"无遗漏或添加信息"的准确性要求。 → 移除这些额外添加的行内注释,保持代码与原文一致,或在评审中确认这类补充注释是否被允许。
  • [minor · fluency] lectures/samuelson.md — ## 将所有内容封装到类中: "现在让我们撸起袖子"翻译较为口语化,与学术讲义的语域略有不符,虽然对应原文"we'll roll up our sleeves"这一习语,但可以考虑更正式的学术表达。 → 可译为"现在让我们着手编写"或保留原意但略微正式化,如"接下来我们将动手实现"。
  • [nit · terminology] lectures/samuelson.md — ### 手动或"人工"求根计算: 标题翻译“手动或”人工“求根计算”中引号使用为英文直引号(""),根据中文排版规范应使用中文全角引号「」或“”(全角),当前使用的是ASCII双引号,与其他部分保持全角引号的规范略有出入。 → 改为:手动或“人工”求根计算(确保使用全角中文引号“”)

🔍 Diff Quality

Check Status
Scope Correct ✅
Position Correct ✅
Structure Preserved ✅
Heading-map Correct ✅
Overall 10/10

Summary: The translation sync correctly applied the sign-flip fix in the root-calculation function and the docstring/LaTeX formula update in the Samuelson class at the same relative positions, with no structural or heading-map issues.


This review was generated automatically by action-translation review mode.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A float-equality check (discriminant == 0) in the edited root-calculation block is numerically unsafe and can produce incorrect branching near zero without a tolerance.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

This PR syncs the zh-cn translation for the Samuelson lecture to incorporate an upstream bug fix, updating both the “manual roots” computation and the model-class documentation equation to match the corrected characteristic polynomial / dynamics.

Changes:

  • Corrects the quadratic-formula sign used when computing characteristic roots in the “manual” root calculation section.
  • Updates the Samuelson class docstring to a raw string and refreshes the documented difference equation.
  • Updates translation-sync state metadata (source SHA, sync date, tool version).
File Description
lectures/​samuelson.md Fixes the displayed/manual root formula and updates the documented model equation in the class docstring.
.translate/​state/​samuelson.md.yml Updates translation sync metadata to the latest upstream source commit/date/tool version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lectures/samuelson.md
@@ -657,17 +657,17 @@ def y_nonstochastic(y_0=100, y_1=80, α=0.92, β=0.5, γ=10, n=80):
discriminant = ρ1**2 + 4 * ρ2

if discriminant == 0:
@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request September 26, 2026 00:30 Inactive

This branch was previously deployed

1 inactive deployment
pull request — 13c00065 Deployed Sep 26, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants