Seed the 37 missing lectures — full source-TOC coverage (Opus 4.8)#196
Merged
Conversation
Completes the Phase 2 gap-fill in one pass: every lecture in the source _toc.yml now has a Chinese edition (121/121). Translated with claude-opus-4-8 via translate init (action-translation, parity guard on), with heading maps and .translate/state entries so sync discovery covers the full corpus. Also: 37 _toc.yml entries inserted in source order; quant-econ.bib synced from source plus three entries the source bib itself lacks (GilboaSchmeidler:1989, Whittle_1981, Whittle_1990 — dangling upstream, recovered from lecture-python-advanced.myst); CJK font blocks injected into five lectures the localisation rule missed; font paths normalised to this repo's fonts/ convention. Part of QuantEcon/project-translation#14; supersedes the closed #194. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mmcky
marked this pull request as ready for review
July 22, 2026 03:43
This was referenced Jul 22, 2026
mmcky
added a commit
that referenced
this pull request
Jul 24, 2026
) * Restore the CJK font block in three lectures (#205) These three lectures set Chinese text on their figures but never register a CJK font, so matplotlib falls back to DejaVu Sans — which has no CJK coverage — and every Chinese axis label, title and legend entry renders as blank boxes ("tofu"). Nothing errors and a valid PNG is written, so the build stays green and the defect only shows up in the published output. Affected labels include 密度 / KL散度 / JS散度 / 切尔诺夫熵 in divergence_measures.md, 收益率 / 日期 / 时间 / 对数秩 / 对数规模 in kesten_processes.md, and the subplot titles 价值函数 / $s$策略 / $\phi$策略 in jv.md. Adds this edition's standard block to the first code cell that imports matplotlib in each file, immediately after `import matplotlib.pyplot as plt` so it runs before any figure is drawn: import matplotlib as mpl FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf" mpl.font_manager.fontManager.addfont(FONTPATH) plt.rcParams['font.family'] = ['Source Han Serif SC'] Matches the convention already used by the other 112 lectures here (see aiyagari.md); the path resolves against lectures/, where fonts/SourceHanSerifSC-SemiBold.otf is checked in. Same class of gap as the five lectures fixed in #196 — nothing else in these files is touched. See #205 * Add a DejaVu fallback to font.family, and register the font in two more lectures Setting font.family to a single entry removes matplotlib's fallback, so any character the CJK font lacks renders as a blank box. Source Han Serif SC follows Adobe-GB1, which omits subscript digits (U+2080-2083), the vertical ellipsis (U+22EE), and the lunate/symbol Greek forms (U+03F5 epsilon, U+03D5 phi) — all of which these lectures use in figure labels. Measured on matplotlib 3.11.1 with this repo's own font, rendering a label containing 密钥拆分树, key₀, ⋮, ϵ and ϕ: font.family = ['Source Han Serif SC'] -> 4 missing-glyph warnings font.family = ['Source Han Serif SC', 'DejaVu Sans'] -> 0 Two lectures already carried the block and were silently losing characters to it: career.md sets ylabel='ϵ' (and label='ϵ'), affine_risk_prices.md builds label=f"... (r₁ = ...)". Both are fixed by the fallback alone. This deviates from the single-entry dialect used elsewhere in the edition. That is deliberate: the dialect is missing a fallback, and adding one is strictly an improvement everywhere it appears.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The complete Phase 2 gap-fill as a single PR, per Matt's call (supersedes the closed #194 — its five lectures are included here unchanged). With this merged, every lecture in the source
_toc.ymlhas a Chinese edition: 121/121 coverage, and every file carries a heading map and.translate/stateentry so sync discovery spans the whole corpus from day one.Translation:
translate initon claude-opus-4-8 (the seed-model guidance), v0.20.0+ engine with the structural parity guard. 12 lectures ran sequentially, the remaining 20 at-j 4parallel; ~66K tokens/lecture. Machine draft pending native review, per the fr/fa precedent.Beyond the 37 lectures, the diff contains:
_toc.yml— 37 entries inserted at their source-order positions (validated: parses, 120 entries + root = source structure).quant-econ.bib— synced from source, plus three entries the source bib itself lacks:GilboaSchmeidler:1989,Whittle_1981,Whittle_1990are cited byrobust_permanent_income/theil_2upstream but missing from the source bib (dangling upstream — being reported to lecture-python.myst); entries recovered verbatim from lecture-python-advanced.myst. Verified: all 144 citation keys across the 37 resolve, zero duplicate keys, and no key cited anywhere in the repo is removed.i18n-font-configrule missed five lectures (aiyagari_egm,ifp_discrete,ifp_opi,inventory_q,morris_learn— all heavy matplotlib users); the standard CJK block was injected by hand, and all 37 use this repo'sfonts/path convention._staticassets for the two Hansen-Singleton lectures (referenced by their content).Checks run: code-cell and fence counts identical to source on all 37; heading maps present in every file; no
text.usetex(zh convention); TOC parses; bib coverage complete. Noenvironment.ymlchanges — the build env covers all imports (the JAX users follow the same pattern as the merged resyncs).Known review notes: the AI review workflow has no path for seed PRs (QuantEcon/action-translation#131), so this PR's gates are the preview build plus native review. Document-local phrase consistency across 37 fresh translations is the main thing machine review can't yet check (QuantEcon/action-translation#133).
🤖 Generated with Claude Code