Repository navigation
Translate the GPU admonition (_admonition/gpu.md) - #181
Merged
Merged
Conversation
The edition held an English copy of this include fragment. Translated with translate init -f at action-translation e95b69d (claude-sonnet-5). See QuantEcon/action-translation#449. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for majestic-griffin-10b166 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
mmcky
added a commit
to QuantEcon/action-translation
that referenced
this pull request
Nov 16, 2026
#370, #449 P4) (#460) The fourth of #449's PRs, building condition 3 of D-2026-10-19-sync-scope-existing-reads-state-files on the lecture set (ruling 7 of D-2026-11-16-the-lecture-set-is-the-toc-and-its-includes), from the P4 design (draft 2, after its Fable review). - `translate doctor -t <edition> --require-state` turns the .translate/state/ check into the four-item check on the edition's lecture set: (a) a lecture with no state file that is not declared, (b) a declared exception with a state file, (c) a file under .translate/state/ with no lecture, a non-<path>.md.yml file among them, and (d) an unreadable state file. Every item is reported at once; an orphaned unreadable file counts as orphaned. An UNLISTED lecture's state file and a stale exception warn. Without a _toc.yml the check fails beside Lecture set. Without the flag nothing changes. - Every item comes from one listing of the state folder (listStateFiles, translate-state.ts), compared with the set as strings, so Intro.md.yml for intro.md is missing plus orphaned on every filesystem, as on the Linux runner and for sync. - Exceptions are a mapping under state-exceptions in .translate/config.yml, read with CORE_SCHEMA (readStateExceptions checks the shape); doctor puts each key in the lecture set's spelling with normalizeDocsPath, now exported from lecture-set.ts (renamed from normalize, unchanged), and names each unusable key. A repo-relative key is named as such. This takes the place of the --exclude #370 proposed. TranslateConfig gains the optional key. - --json: top-level requireState: true; the check's data holds missing, declaredWithState, orphaned, corrupt, unlisted, staleExceptions and exceptionErrors, sorted. summary keeps its shape. - checkConfig names a config that does not load, a repeated key with its line among them, where it said "missing required fields". dist-action changes only by the rename and the source map: the action bundles lecture-set.ts and translate-state.ts but none of the new code, and translate-state.ts does not import the lecture-set reader, so the bundle's module order is unchanged. Decision record D-2026-11-16-require-state-check holds the readings for @mmcky to confirm and corrects ruling 7: ml's _admonition/gpu.md is outside ml's lecture set today, and fa's needs no declaration since QuantEcon/lecture-python-programming.fa#181 translated it; the 2026-11-16 record gets a note pointing there. Tests: doctor (#370's four cases, (b), (c) nested and non-state files, orphan over corrupt, case mismatch, unlisted and its corrupt case, stale exceptions with the ml case, each malformed key, ./ and lectures/ keys, a bare date, a partial ToC, a fragment, no state folder, no ToC, the cap, a --json fixture with all six lists), translate-state (listStateFiles, readStateExceptions, the writeConfig round trip), status (state-exceptions survives --write-state) and cli-smoke (exit 1, then 0 once declared). Docs: CLI reference (the flag, the items, the key, a CI job at a pinned tag, #371), action reference, both tutorials, FAQ; changelog fragment 370-require-state; STATE.md's count: 2,759 tests across 88 suites. * doctor: review fixes for --require-state (JSON on every path, wording, keys) From the Fable review of the first commit, which found no must-fix and ran the check on all six editions, matching the record: - --json's `data` holds all seven lists on every path, an edition with no lecture set too, as the CLI reference and the record say. - The record says seven lists (exceptionErrors is the seventh), and its readings are put to Matt in the PR body; the record merges only on his yes. - A state file whose .md is in a folder the book never builds from (_build, a dot-folder) is "no lecture at its path", not "no such .md"; a stale exception the edition lacks reads the same way. - An empty key and a bare `.md` key are refused by name; a docs-folder-prefixed key is named as repo-relative for a file outside the set too. - The docs name `.gitkeep` among the files under state/ that fail (c), and the CI example pins actions/checkout@v7, as setup.ts's scaffolded workflow and the docs do. 2,762 tests across 88 suites, on d73f874 (v0.32.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMaeFJpEpdYGkPF9V3h
This branch was previously deployed
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.
This edition held an English copy of the GPU admonition,
lectures/_admonition/gpu.md, a fragment that lectures pull in with{include}. This PR replaces it with a Farsi translation and adds its state file,.translate/state/_admonition/gpu.md.yml. Included files are part of each edition's lecture set; see QuantEcon/action-translation#449.The translation was made with
translate init -s <lecture-python-programming> -t <lecture-python-programming.fa> --target-language fa -f _admonition/gpu.md, at action-translatione95b69d(main, which includes73bd6a8from QuantEcon/action-translation#456), modelclaude-sonnet-5, one call of 735 tokens.translate forwardcould not do this, since it skips a file identical to the source.The admonition structure is unchanged: one
{admonition} GPUblock with:class: warning, the same fences, and the Colab link's URL as in the English.initalso copied one non-Markdown file the edition lacks,lectures/_static/lecture_specific/python_advanced_features/test_table.csv; it is left out of this PR.Matt reviews the Farsi before this merges.
🤖 Generated with Claude Code