Skip to content

🌐 [translation-sync] [ak2, ak_aiyagari, two_computation] Correct math and economics, add exercises - #290

Merged
mmcky merged 6 commits into
mainfrom
translation-sync-2026-10-09T01-21-22-pr-1078
Oct 18, 2026
Merged

mmcky merged 6 commits into
mainfrom
translation-sync-2026-10-09T01-21-22-pr-1078

Conversation

@mmcky

@mmcky mmcky commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#1078 - [ak2, ak_aiyagari, two_computation] Correct math and economics, add exercises

Files Updated

  • ✏️ lectures/ak2.md
  • ✏️ .translate/state/ak2.md.yml
  • ✏️ lectures/ak_aiyagari.md
  • ✏️ .translate/state/ak_aiyagari.md.yml
  • ✏️ lectures/two_computation.md
  • ✏️ .translate/state/two_computation.md.yml

⚠️ Target-Only Sections Removed

The following sections exist in the current translation but have no counterpart in the source document, so this sync removes them (the translation mirrors the source's structure). If the source deleted these sections, this removal is correct — merge as usual. If they are human-authored additions you want to keep, move them into a target-only file before merging (see adding content to a translated edition).

  • lectures/ak2.md: 引言, 均衡
  • lectures/ak_aiyagari.md: 实验1:即时减税, 实验2:预先宣布的减税

Details

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

This PR was created automatically by the translation action.

Copilot AI balanced review requested due to automatic review settings October 9, 2026 01:21
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Oct 9, 2026
@netlify

netlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit e7b1b92
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6ac8419ca7a2130007a3bd07
😎 Deploy Preview https://deploy-preview-290--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

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-10-09
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 8/10
Terminology 9/10
Formatting 9/10
Overall 8.8/10

Summary: 三篇讲义的翻译整体质量很高,专业术语与经济学概念翻译准确,格式和代码、公式保留完好,未发现语法错误。个别地方存在半角标点残留和部分直译导致的轻微生硬感,建议统一标点符号并润色个别长句,使行文更符合中文学术写作习惯。 专业术语翻译准确,且与术语表高度一致,如“世代交叠模型”“稳态”“打靶法”“风险敏感性”等关键概念保持统一 数学公式、代码块及MyST/Jupyter指令格式完整保留,未出现编号或语法错误 长难句的逻辑结构处理得当,保持了原文的严谨性和学术语气,尤其是对蒙特卡洛模拟与倒推法等算法描述的翻译清晰准确

Suggestions:

  • [minor · fluency] lectures/ak2.md — 设定: 句子“在时点 $t$,一个代表性老年人与一个代表性年轻人共存,这个年轻人将在时点 $t+1$ 成为老年人。”中使用了英文半角逗号,且该句紧接前一句造成轻微重复表述。 → 在时点 $t$,一个代表性老年人与一个代表性年轻人共存,这个年轻人将在时点 $t+1$ 成为老年人。
  • [minor · formatting] lectures/ak2.md — 设定: 多处使用了半角逗号而非全角逗号,例如“老年人进行消费和储蓄,但不工作。”前的句子中及其他段落中偶有半角标点残留(如“政府永远存在,即在各期...”)。 → 将所有半角逗号替换为全角逗号,如“政府永远存在,即在各期 $t=0, 1, 2, \ldots$ 都存在。”
  • [minor · fluency] lectures/two_computation.md — Model::Environment: 部分句子直译痕迹较重,如“个人消费者和政府可以按一个共同的无风险总回报率进行投资。”读起来略显生硬,可更自然地表达为“个人消费者和政府都可以按照相同的无风险总回报率进行投资。” → 个人消费者和政府都可以按照相同的无风险总回报率进行投资。
  • [minor · terminology] lectures/ak_aiyagari.md — Households' problems: “precautionary savings motive”在不同位置分别译为“预防性储蓄动机”和“预防性储蓄”,基本一致,但在“Key features”部分用词可以更统一地与“Equilibrium”部分保持一致的表达顺序和措辞。 → 统一使用“预防性储蓄动机”指代该概念,确保全文一致。

🔍 Diff Quality

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

Summary: The translation sync correctly mirrors the English source changes across all three files, with matching section positions, preserved structure, and properly updated heading-map entries reflecting renamed headings.


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

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request October 9, 2026 01:28 Inactive

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.

🔵 Needs a closer look

It is a large translation sync with substantial new math, economics, and executable exercise code that cannot be run/verified here, so it warrants human review despite only minor consistency issues being found.

4 open findings
What changed in this PR

This is an automated translation-sync PR that updates the Chinese (zh-cn) editions of three QuantEcon lectures — ak2.md, ak_aiyagari.md, and two_computation.md — to mirror upstream source PR lecture-python.myst#1078. The changes port corrected math/economics, refactored code, and newly added "练习" (Exercises) and "结束语" (Concluding remarks) sections into the translated editions, and bump the corresponding .translate/state/*.yml sync metadata.

Changes:

  • Translates new Exercises/Concluding-remarks sections and corrects economic exposition (e.g., MPK fix r_t = αK^{α-1}L^{1-α} in ak2.md, debt timing D_{t+1}, per-capita resource constraint and notation table in two_computation.md).
  • Refactors embedded code: adds max_iter guards and an iteration-count return to find_ss/path_iteration in ak_aiyagari.md (callers verified unaffected), simplifies _compute_compensation in two_computation.md (removed variables confirmed unused).
  • Adds figure captions/names and adjusts Matplotlib labels; updates sync state metadata.
File Description
lectures/​ak2.md Translates Overview + 3 new exercises; math corrections; introduces a C_{ot+1} notation typo in the Lagrangian
lectures/​ak_aiyagari.md Translates text + 3 new exercises; safe find_ss/path_iteration refactor; inconsistent "实验一/实验2" heading numbering and two untranslated figure captions
lectures/​two_computation.md Adds notation table, exercises, concluding remarks; clean code refactor; several plot axis labels reverted from Chinese to English
.translate/​state/​ak2.md.yml Sync metadata bump (source-sha, mode UPDATE, tool-version)
.translate/​state/​ak_aiyagari.md.yml Sync metadata bump
.translate/​state/​two_computation.md.yml Sync metadata bump (model, section-count, tool-version)

🧠 Review effort: Balanced


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

Comment thread lectures/ak2.md
$$
\begin{aligned}
{\mathcal L} & = C_{yt}^\beta C_{o,t+1}^{1-\beta} \\ & + \lambda \Bigl[ C_{yt} + \frac{C_{o,t+1}}{1 + r_{t+1}(1 - \tau_{t+1})} - W_t (1 - \tau_t) + \delta_{yt} + \frac{\delta_{ot}}{1 + r_{t+1}(1 - \tau_{t+1})}\Bigr],
{\mathcal L} & = C_{yt}^\beta C_{o,t+1}^{1-\beta} \\ & + \lambda \Bigl[ W_t (1 - \tau_t) - \delta_{yt} - \frac{\delta_{o,t+1}}{1 + r_{t+1}(1 - \tau_{t+1})} - C_{yt} - \frac{C_{ot+1}}{1 + r_{t+1}(1 - \tau_{t+1})} \Bigr],
Comment thread lectures/ak_aiyagari.md
Transition dynamics: 转换动态
'Experiment 1: Immediate tax cut': 实验1:即时减税
'Experiment 2: Preannounced tax cut': 实验2:预先宣布的减税
'Experiment 1: an immediate tax cut': 实验一:立即减税
Comment thread lectures/ak_aiyagari.md
---
mystnb:
figure:
caption: Change in mean consumption by age
Comment on lines +385 to +386
ax.set_ylabel("date born")
ax.set_xlabel("time")
@mmcky
mmcky merged commit 2a09c41 into main Oct 18, 2026
9 of 10 checks passed
@mmcky
mmcky deleted the translation-sync-2026-10-09T01-21-22-pr-1078 branch October 18, 2026 06:57
mmcky added a commit that referenced this pull request Oct 18, 2026
…gari's household rename, add the programming intersphinx key (#297)

* ak_aiyagari: finish the hh → household rename in the six cells the 2026-08-05 sync never delivered

myst#706 renamed the household parameter from hh to household on
2026-08-05. Its sync run failed before it could file anything (the
anthropic-api-key input was missing that night), so the rename never
reached this edition. Today's #290 then synced myst#1078's cells, which
use the new name, on top of the old one, and the lecture stopped
executing. This brings the nine remaining code lines into line with the
English; the lecture's code now has the same 56 hh and the same call
sites as the source.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* _config: map the programming intersphinx key to the zh-cn programming edition

linear_algebra (#280, synced from myst#1054) now carries four
{doc}/{ref} targets under the programming: key the English config
defines. This edition only had pyprog:, so the build reported four
unknown-document warnings, which -W turns into a failure. The zh-cn
programming site carries the three labels (numpy_array, numpy_shape_dim,
creating_arrays), so the key points there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* environment: install jax 0.11.0, since two lectures skip their own install cell

Every other JAX lecture in this edition installs JAX at run time through a
!pip install cell that executes. ak_aiyagari and two_computation carry
that cell tagged skip-execution, as the English does, because the English
runner preinstalls jax[cuda13]. This CI preinstalled nothing, so both
lectures failed on import jax. Pinned at 0.11.0 for the lax.fori_loop
regression in 0.11.1 (QuantEcon/workspace-lectures#49); the unpinned
install cells then leave it in place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
pull request — e7b1b92e Deployed Oct 9, 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