Skip to content

🌐 [translation-sync] [sir_model] update code and text - #302

Merged
mmcky merged 5 commits into
mainfrom
translation-sync-2026-10-22T00-36-30-pr-1050
Oct 22, 2026
Merged

mmcky merged 5 commits into
mainfrom
translation-sync-2026-10-22T00-36-30-pr-1050

Conversation

@mmcky

@mmcky mmcky commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#1050 - [sir_model] update code and text

Files Updated

  • ✏️ lectures/sir_model.md
  • ✏️ .translate/state/sir_model.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/sir_model.md: SIR模型

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 22, 2026 00:36
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation enhancement New feature or request labels Oct 22, 2026
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 9452d24
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6ad95c928ed5109f74e68ed3
😎 Deploy Preview https://deploy-preview-302--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 22, 2026 •

Copy link
Copy Markdown

✅ Translation Quality Review

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


📝 Translation Quality

Criterion Score
Accuracy 8/10
Fluency 8/10
Terminology 9/10
Formatting 7/10
Overall 8.1/10

Summary: The translation of the changed sections is accurate, technically sound, and terminologically consistent with the SEIR model content. Minor issues include a slightly garbled sentence in the Overview, a few missing spaces between Chinese text and inline code per style guidelines, and an inconsistency in whether plot label strings are translated within code cells. No blocking syntax or structural errors were found. Technical terminology for the SEIR model (易感、暴露、感染、移除) is accurate and consistent with epidemiological conventions Mathematical notation and LaTeX equations are preserved correctly without alteration Code blocks and MyST directive syntax are preserved intact across all changed sections The restructuring from SIR to SEIR model content reads coherently and faithfully follows the source's logical flow

Suggestions:

  • [minor · accuracy] lectures/sir_model.md — ## Overview: The English says 'The purpose of his notes is to introduce economists to quantitative modeling of infectious disease dynamics' but the translation '他的这些笔记主要是介绍了定量建模传染病动态研究' slightly garbles the meaning, losing the focus on economists as the audience. → 他撰写这些笔记的目的是向经济学家介绍传染病动态的定量建模方法。
  • [minor · formatting] lectures/sir_model.md — ## Implementation (code cell with FONTPATH): The translation inserts additional font-configuration code (mpl.font_manager, FONTPATH, plt.rcParams) not present in the English source. While this may be a common pattern for CJK rendering in translated notebooks, it constitutes added content relative to the source and should be verified as an intentional, approved addition rather than an inconsistency.
  • [minor · fluency] lectures/sir_model.md — ### Experiment 1: constant R0 case: Missing space between Chinese text and inline code/math per style convention, e.g. '从 R0为常数的情况开始' and '在不同 R0值的假设下' lack a space after the inline code closing backtick before '为常数' and '值'. → 从 R0 为常数的情况开始;在不同 R0 值的假设下计算感染人数的时间路径
  • [minor · fluency] lectures/sir_model.md — ### Experiment 2: changing mitigation: Similar missing space issue: '以下是一个关于 R0随时间变化的函数规范' lacks a space after the inline code before '随时间变化'. → 以下是一个关于 R0 随时间变化的函数规范。
  • [minor · formatting] lectures/sir_model.md — plot_paths calls under Experiments and Ending lockdown sections: Inconsistent translation of the ylabel string literal passed to plot_paths: in Experiment 1 and 2 sections the English string 'fraction of the population' is left untranslated in code (acceptable since it's a plot label argument), but in the Ending lockdown section the same literal argument is translated to '人口比例' inside the code cell. This inconsistency across code cells could confuse readers co… → Keep the ylabel string argument consistently either translated or untranslated across all code cells for uniformity.

🔍 Diff Quality

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

Summary: The translation sync correctly updated the single target file with matching structure, section positions, and an accurately revised heading map reflecting the renamed SEIR headings.

Issues:

  • Target added an extra code line (plt.rcParams['figure.figsize']) not present in the English source, and conversely did not remove it when source dropped figsize config - minor scope creep in code cell
  • Inconsistent ylabel translation: one plot uses Chinese '人口比例' while parallel plots use English 'fraction of the population', suggesting inconsistent translation convention though not a structural defect

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.

🔵 Needs a closer look

Validating the fidelity and fluency of a document-wide human-language translation rewrite requires human judgment beyond what automated review can confirm.

2 open issues
What changed in this PR

This is an automated translation-sync PR that updates the Chinese edition of the sir_model.md lecture to match upstream source PR QuantEcon/lecture-python.myst#1050. The upstream change reframes the lecture from "the SIR model" to "the SEIR model," adds explanatory prose, improves plot labeling, and corrects the cumulative-deaths computation. The translated .md and its .translate/state metadata are updated in lockstep, consistent with the repo's translation workflow.

Changes:

  • Renames the model section from SIR to SEIR (headings map, body headings, overview prose) and refreshes the surrounding Chinese translation to match the updated source.
  • Syncs code cells with the source: normalizes σ/γ to \sigma/\gamma in display math, adds a required ylabel param to plot_paths with lw/axis labels, uses $R_0$ legend labels, and fixes cumulative deaths to (c_path - i_path) * ν * pop_size.
  • Updates .translate/state/sir_model.md.yml (source-sha, synced-at, mode RESYNC→UPDATE, tool-version).
File Description
lectures/​sir_model.md SIR→SEIR retitling plus synced prose, math, and code-cell updates mirroring the upstream source.
.translate/​state/​sir_model.md.yml Updates sync metadata (source-sha, date, mode, tool-version) to record this sync.

Review effort: Balanced

Comment thread lectures/sir_model.md
他的这些笔记主要是介绍了定量建模传染病动态研究。

疾病传播使用标准SIR(易感者-感染者-移出者)模型进行建模。
疾病传播使用标准SEIR(易感者-暴露者-感染者-移出者)模型进行建模。
Comment thread lectures/sir_model.md

```{code-cell} ipython3
plot_paths(i_paths, labels)
plot_paths(i_paths, labels, ylabel='fraction of the population')
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request October 22, 2026 00:43 Inactive
mmcky and others added 3 commits October 22, 2026 11:44
The 2026-08-20 quality audit's one major finding on this lecture: the
Chinese said to delay the infection peak until *before* a vaccine is
found, where the source's point is the reverse, that pushing the peak
further into the future may reduce cumulative deaths if a vaccine is
found. QuantEcon/lecture-python.myst#1050 only touched this sentence's
wording ("the peak of the curve"), so the resync kept the existing
translation. Retranslated to follow the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plt.rcParams["figure.figsize"] = (11, 5) sat in the imports cell with
no counterpart in the English, one of eight such lines the 2026-08-20
audit found riding along with the font configuration. Removed, so the
cell's code matches the source apart from the i18n font block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The zh-cn rule (QuantEcon/project-translation#70): a space before an
inline role or link. Three lines in passages this resync did not
change still ran them into the preceding character.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pull request October 22, 2026 00:50 Inactive
@mmcky
mmcky merged commit 75f6847 into main Oct 22, 2026
7 checks passed
@mmcky
mmcky deleted the translation-sync-2026-10-22T00-36-30-pr-1050 branch October 22, 2026 01:27
mmcky added a commit that referenced this pull request Oct 22, 2026
#302, the sync of QuantEcon/lecture-python.myst#1050, carried every
English change, but it also rewrote passages whose English did not
change. This puts the reviewed text back there (the 2025 review by yuki
and Humphrey Yang, and the March 2025 text they kept) and keeps every
change the English made. Text and plot labels only: structural parity
holds, the 25 code cells match the source with strings masked, and both
math blocks are identical.

- 时间路径: nine reviewed lines, among them 主要关注的是 and its two
  bullets (yuki's), and the partition sentence, whose R is math again.
- 参数: its four reviewed lines, so 阿特克森 is Atkeson again, as in
  the rest of the lecture.
- The state list reads 易感者…移出者 again, as the intro does, with the
  English's new $S$, $E$, $I$, $R$.
- Plot labels are Chinese throughout: 人口比例 on the four y-axes that
  were English (解除封锁 already used it) and 天数 on both x-axes.

Lines that the July forward resync (#151) wrote and #302 reworded keep
#302's text. Both zh-cn rules hold on every prose line
(QuantEcon/project-translation#70).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
pull request — 9452d24a Deployed Oct 22, 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 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants