You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Write the sync state files, and switch prune_toc.py to them in the same PR #56
Step 2 of QuantEcon/project-translation#65. It runs after #26 (round 5) and #55 have merged, and needs no engine release.
A lecture is in this edition, for sync and for the site's navigation, when its state file .translate/state/<file>.md.yml is on main. The edition has none yet. This PR writes them and switches the navigation to them at the same time. Switching scripts/prune_toc.py on its own would empty the site's navigation, because the site publishes on every push to main.
Steps
Check each merged lecture against the English. Diff the English since the commit the lecture's round drafted from. Each round PR's Provenance line records that commit, and #65 lists them: git -C repos/lecture-python-programming diff SHA..origin/main -- lectures/NAME.md
Carry anything the Malayalam lacks forward first, as in Bring python_by_example up to date with the English (lecture-python-programming#604 and #595) #55. Don't rely on --write-state's own guard: it compares dates only.
Write the state files with the tool, never by hand: translate status -s repos/lecture-python-programming -t repos/lecture-python-programming.ml -l ml --write-state --exclude intro.md
-l ml is required. -l defaults to zh-cn, and --write-state writes the language into .translate/config.yml.
--exclude intro.md keeps the English landing page out until its round (Review: intro.md #32) merges with its own state file. status reads only top-level files, so _admonition/gpu.md gets no state file either.
Change scripts/prune_toc.py to keep the entries whose lecture has a state file, and always the root page. Update its docstring: sync mirrors the verbatim English _toc.yml, and the build prunes it to the lectures with a state file.
Checks
translate status … -l ml reports each merged lecture ALIGNED.
translate doctor -t repos/lecture-python-programming.ml -s repos/lecture-python-programming lists only intro.md without a state file. That is a warning, and it lasts until the intro round merges.
The PR preview's navigation shows the same lectures as the live site.
Done when
The state files and the prune change are on main in one merged PR, and the live site's navigation is unchanged.
Activity