Skip to content

Seed the French edition: 26 lectures translated with Opus 4.8#1

Merged
mmcky merged 1 commit into
mainfrom
seed/french-edition
Jul 15, 2026
Merged

Seed the French edition: 26 lectures translated with Opus 4.8#1
mmcky merged 1 commit into
mainfrom
seed/french-edition

Conversation

@mmcky

@mmcky mmcky commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Seeds the French edition with all 26 lectures, bulk-translated from lecture-python-programming using action-translation's translate init.

This is a draft for review, not a finished edition. A GitHub diff isn't a useful review surface here — there's nothing to compare against, so every file reads as "all new". The real review happens on the rendered site and in the follow-ups below.

What was run

Model claude-opus-4-8
Lectures 26/26 translated
Tokens 687,236
Wall clock 34 minutes (4-way parallel)
Glossary 364 terms

Why Opus for the seed

Sonnet 5 is the default for ongoing sync and stays that way. Opus is used once, for the seed, on evidence rather than preference: across a 5-lecture trial it showed zero cross-lecture terminology drift where Sonnet 5 drifted on 5 terms, and it was correct where Sonnet drifted — rendering mutable as mutable, not muable, which isn't the Python sense. Output lengths were near-identical, so the 1.66× is purely the price ratio (~$6.3 → ~$10.4 for the full corpus). That's cheap for a one-time corpus a native speaker will then review. Recorded in action-translation as .dev/decisions/D-2026-07-14-opus-for-bulk-seed.md.

Caveat worth stating: that trial was n=5 lectures in one language.

French typography

The translation prompt has always instructed the model to place a non-breaking space before ; : ! ?. It doesn't — a measured translation came back with zero of them. That's now applied deterministically in code instead (QuantEcon/action-translation#79); 331 non-breaking spaces were inserted here.

The 21 remaining plain spaces before high punctuation are all inside code — numpy slices (z[0, :]), docstring parameters (observations : array_like), type annotations, and French prose inside # comments. Those are deliberately left alone; touching code to fix typography is the wrong trade.

Known limitations — please read before reviewing terminology

  1. The glossary is provisional. 7 programming-domain terms are still under native review in glossary(fr): add programming-domain terms for lecture-python-programming (review needed) action-translation#78. If any change, the affected renderings here change with them. The one I'd most like Emile's eye on is Standard normalLoi normale centrée réduite: neither model produced it, so it's a correctness call, not a consistency one.
  2. A review-and-update pass is planned, once the glossary questions are settled. Terminology feedback is best filed against #78 rather than here, so it lands in the glossary and benefits every future lecture rather than being patched file-by-file.
  3. Ongoing sync isn't live on Sonnet 5 yet. The workflows here pin action-translation@v0.15.0, which still defaults to claude-sonnet-4-6. Getting sync onto Sonnet 5 needs a v0.16.0 release and a pin bump — tracked separately, and it doesn't affect this seeded content.

What's included

The 26 translated lectures, 88 copied non-markdown assets, .translate/state/ and TRANSLATION-REPORT.md — matching the conventions of the existing .zh-cn edition.

🤖 Generated with Claude Code

Bulk translation of lecture-python-programming into French, seeded with
QuantEcon/action-translation's `translate init`.

- Model: claude-opus-4-8. Opus is used for one-time seeds because it showed zero
  cross-lecture terminology drift over a 5-lecture trial where Sonnet 5 drifted
  on 5 terms, and was correct where Sonnet was not (`mutable`, not `muable`).
  It costs 1.66x, which is worth it once for a corpus a native speaker then
  reviews. Ongoing sync stays on Sonnet 5.
  See QuantEcon/action-translation `.dev/decisions/D-2026-07-14-opus-for-bulk-seed.md`.
- Glossary: 364 terms, including 7 programming-domain terms proposed in
  QuantEcon/action-translation#78 and still under native review.
- French typography (non-breaking space before ; : ! ?) applied deterministically
  rather than via the prompt, which the model ignores. 331 inserted.
  See QuantEcon/action-translation#79.
- 26/26 translated, 687k tokens, 34 minutes.

This is a draft for review, not a finished edition.
Copilot AI review requested due to automatic review settings July 14, 2026 23:58

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.

Pull request overview

This PR seeds the French edition of lecture-python-programming by adding the full translated lecture set, supporting book config/TOC, translation state metadata, and copied lecture assets needed to render/build the site.

Changes:

  • Adds the French-translated lecture sources (MyST Markdown) and associated book configuration (_config.yml, _toc.yml).
  • Adds translation provenance/state tracking under .translate/state/ plus a TRANSLATION-REPORT.md.
  • Adds/cop ies various lecture-specific static assets used by the book (data files, helper scripts, includes).

Reviewed changes

Copilot reviewed 65 out of 135 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
TRANSLATION-REPORT.md Translation run summary + provenance metadata and next steps
lectures/writing_good_code.md French lecture content (MyST) for “Writing Good Code”
lectures/workspace.md French lecture content (MyST) for “Workspace / longer programs”
lectures/troubleshooting.md French troubleshooting page
lectures/sympy.md French lecture content (MyST) for SymPy
lectures/status.md Execution stats page template (nb-exec table + environment info)
lectures/sine_wave.py Small Python helper/example file referenced by workspace content
lectures/scipy.md French lecture content (MyST) for SciPy
lectures/python_oop.md French lecture content (MyST) for Python OOP
lectures/python_essentials.md French lecture content (MyST) for Python essentials
lectures/python_by_example.md French lecture content (MyST) for “Python by example”
lectures/python_advanced_features.md French lecture content (MyST) for advanced features
lectures/pandas.md French lecture content (MyST) for Pandas basics
lectures/pandas_panel.md French lecture content (MyST) for panel data with Pandas
lectures/oop_intro.md French lecture content (MyST) introducing OOP concepts
lectures/numpy.md French lecture content (MyST) for NumPy
lectures/numpy_vs_numba_vs_jax.md French lecture comparing NumPy/Numba/JAX
lectures/numba.md French lecture content (MyST) for Numba
lectures/need_for_speed.md French lecture on scientific computing/performance motivation
lectures/names.md French lecture on names/namespaces
lectures/matplotlib.md French lecture content (MyST) for Matplotlib
lectures/jax_intro.md French lecture content (MyST) for JAX intro
lectures/intro.md Book root/landing page in French edition
lectures/getting_started.md French “getting started” lecture + embedded CSS snippet
lectures/functions.md French lecture on functions
lectures/debugging.md French lecture on debugging/error handling
lectures/autodiff.md French lecture on automatic differentiation
lectures/about_py.md French “about this course/Python” lecture
lectures/_toc.yml Jupyter Book table of contents for the French edition
lectures/_static/lecture_specific/python_foundations/us_cities.txt Lecture-specific data file
lectures/_static/lecture_specific/python_foundations/test_table.csv Lecture-specific data file
lectures/_static/lecture_specific/python_advanced_features/test_table.csv Lecture-specific data file
lectures/_static/lecture_specific/python_advanced_features/numbers.txt Lecture-specific data file
lectures/_static/lecture_specific/pandas/wb_download.py Helper script used by Pandas lecture assets/examples
lectures/_static/lecture_specific/pandas/data/ticker_data.csv Lecture-specific dataset
lectures/_static/lecture_specific/pandas/data/test_pwt.csv Lecture-specific dataset
lectures/_static/lecture_specific/pandas_panel/realwage.csv Lecture-specific dataset
lectures/_static/lecture_specific/pandas_panel/employ.csv Lecture-specific dataset
lectures/_static/lecture_specific/pandas_panel/countries.csv Lecture-specific dataset
lectures/_static/lecture_specific/about_py/qs.py Helper script used for a figure in about_py
lectures/_static/includes/lecture_howto_py.raw Shared raw HTML include used by the book
lectures/_static/includes/header.raw Shared raw HTML header include
lectures/_config.yml Jupyter Book configuration for the French edition
.translate/state/writing_good_code.md.yml Translation state metadata for writing_good_code
.translate/state/workspace.md.yml Translation state metadata for workspace
.translate/state/troubleshooting.md.yml Translation state metadata for troubleshooting
.translate/state/sympy.md.yml Translation state metadata for sympy
.translate/state/status.md.yml Translation state metadata for status
.translate/state/scipy.md.yml Translation state metadata for scipy
.translate/state/python_oop.md.yml Translation state metadata for python_oop
.translate/state/python_essentials.md.yml Translation state metadata for python_essentials
.translate/state/python_by_example.md.yml Translation state metadata for python_by_example
.translate/state/python_advanced_features.md.yml Translation state metadata for python_advanced_features
.translate/state/pandas.md.yml Translation state metadata for pandas
.translate/state/pandas_panel.md.yml Translation state metadata for pandas_panel
.translate/state/oop_intro.md.yml Translation state metadata for oop_intro
.translate/state/numpy.md.yml Translation state metadata for numpy
.translate/state/numpy_vs_numba_vs_jax.md.yml Translation state metadata for numpy_vs_numba_vs_jax
.translate/state/numba.md.yml Translation state metadata for numba
.translate/state/need_for_speed.md.yml Translation state metadata for need_for_speed
.translate/state/names.md.yml Translation state metadata for names
.translate/state/matplotlib.md.yml Translation state metadata for matplotlib
.translate/state/jax_intro.md.yml Translation state metadata for jax_intro
.translate/state/intro.md.yml Translation state metadata for intro
.translate/state/getting_started.md.yml Translation state metadata for getting_started
.translate/state/functions.md.yml Translation state metadata for functions
.translate/state/debugging.md.yml Translation state metadata for debugging
.translate/state/autodiff.md.yml Translation state metadata for autodiff
.translate/state/about_py.md.yml Translation state metadata for about_py

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TRANSLATION-REPORT.md
Comment on lines +16 to +17
- **Source**: /Users/mmcky/work/quantecon/lecture-python-programming
- **Target**: /Users/mmcky/work/quantecon/lecture-python-programming.fr
Comment thread TRANSLATION-REPORT.md

## Next Steps

1. Review translated lectures in `/Users/mmcky/work/quantecon/lecture-python-programming.fr`
Comment thread TRANSLATION-REPORT.md
- `.github/workflows/` — CI/CD and `action-translation` sync workflow
- `environment.yml` or `requirements.txt` — Python dependencies
- `LICENSE`
3. Build to verify: `jupyter-book build /Users/mmcky/work/quantecon/lecture-python-programming.fr`
Comment on lines +52 to +61
<style>
.auto {
width : 70% ;
height : auto ;
}
.terminal{
width : 80% ;
height : auto ;
}
</style>
Comment thread lectures/oop_intro.md
Comment on lines +407 to +414
attributes = dir(__builtins__.bool)
callablels = []

for attribute in attributes:
# Utilise eval() pour évaluer une chaîne comme une expression
if callable(eval(f'True.{attribute}')):
callablels.append(attribute)
print(callablels)
Comment thread lectures/_config.yml
Comment on lines +46 to +47
repository_url: https://github.com/QuantEcon/lecture-python-programming
nb_repository_url: https://github.com/QuantEcon/lecture-python-programming.notebooks
Comment thread lectures/status.md
Comment on lines +23 to +25
Ces cours sont compilés sur des instances `linux` via `github actions`.

Ces cours utilisent la version de python suivante
@mmcky

mmcky commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Ignoring copilot feedback for this initial bulk translation seeding round.

@mmcky mmcky merged commit 697b904 into main Jul 15, 2026
2 checks passed
@mmcky mmcky deleted the seed/french-edition branch July 15, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants