Skip to content

🌐 [translation-sync] FIX: lecture cleanup batch from the 2026-08 tracker audit - #30

Closed
mmcky wants to merge 12 commits into
mainfrom
translation-sync-2026-08-12T01-01-43-pr-595
Closed

🌐 [translation-sync] FIX: lecture cleanup batch from the 2026-08 tracker audit#30
mmcky wants to merge 12 commits into
mainfrom
translation-sync-2026-08-12T01-01-43-pr-595

Conversation

@mmcky

@mmcky mmcky commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

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

Source PR

#595 - FIX: lecture cleanup batch from the 2026-08 tracker audit

Files Updated

  • ✏️ lectures/about_py.md
  • ✏️ .translate/state/about_py.md.yml
  • ✏️ lectures/autodiff.md
  • ✏️ .translate/state/autodiff.md.yml
  • ✏️ lectures/pandas.md
  • ✏️ .translate/state/pandas.md.yml
  • ✏️ lectures/pandas_panel.md
  • ✏️ .translate/state/pandas_panel.md.yml
  • ✏️ lectures/polars.md
  • ✏️ .translate/state/polars.md.yml
  • ✏️ lectures/python_by_example.md
  • ✏️ .translate/state/python_by_example.md.yml

Details

  • Source Language: en
  • Target Language: fr
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

@mmcky
mmcky requested a lite review from Copilot August 12, 2026 01:01
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 12, 2026
@github-actions

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-12
Routing: editor — 1 major finding(s); 2 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other); accuracy 8 below floor 9
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 9/10
Overall 8.4/10

Summary: The translation is technically strong, fluent, and terminologically consistent, correctly following the glossary and French typographic conventions. However, one code-behavior discrepancy in pandas.md (df.where(...) argument) constitutes a real accuracy issue that changes program output versus the source, and unexplained future_stack=True additions in pandas_panel.md deviate from the source code without corresponding explanation in the English text. Aside from these, the changed sections read naturally and preserve meaning and formatting well. Consistent and accurate use of established French terminology (e.g., 'différentiation automatique', 'descente de gradient', 'Loi normale centrée réduite') throughout the changed sections. French typography rules (guillemets, non-breaking spaces before high punctuation) are correctly and consistently applied in headings, epigraphs, and dialogue. Mathematical notation, code blocks, and MyST directives are preserved intact with no structural or LaTeX corruption across all six files. Idiomatic rewording rather than calques, e.g. 'Objectif : simuler et représenter un processus de bruit blanc' for 'The Task: Plotting a White Noise Process', matching the required style guide.

Suggestions:

  • [major · accuracy] lectures/pandas.md — ### Make Changes in DataFrames, item 1 (df.where()): The English source is df.where(df.POP >= 20000), which replaces non-matching rows with NaN by default. The French translation changes this to df.where(df.POP >= 20000, False), which replaces non-matching rows with False instead of NaN. This alters the code's behavior and contradicts the surrounding prose, which says the remaining rows are replaced with NaN. → df.where(df.POP >= 20000)
  • [minor · accuracy] lectures/pandas_panel.md — ## Slicing and Reshaping Data, .stack() calls: Several .stack() calls in the French version have been changed to .stack(future_stack=True) (with an added inline comment explaining this is required for pandas>3.0), while the English source uses plain .stack(). This is a substantive code/behavior change not present in the source, going beyond translation. → If this is an intentional technical correction it should be flagged separately from the translation review; otherwise revert to .stack() to match the source exactly.
  • [minor · terminology] lectures/about_py.md — ### Relative Popularity: The English source ends the sentence "especially those connected to AI" without a period, and the French translation adds a period, which is a minor but acceptable fluency improvement, not an issue. No action needed — included only for completeness, not a real finding.

🔍 Diff Quality

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

Summary: The translation sync correctly applied all source changes (code fixes, wording tweaks like Pytorch->PyTorch, pandas API updates, blank line removals) to the same files, same positions, and same structural sections while preserving and correctly maintaining the translation heading-map metadata.

Issues:

  • In about_py.md, some blank lines between subsection headings (e.g., before '### Ne puis-je pas simplement utiliser des LLM ?') were removed compared to the source's spacing pattern, but this is a minor formatting difference that doesn't affect structure
  • In pandas.md, df.where(df.POP >= 20000) changed to df.where(df.POP >= 20000, False) - this is a source-driven behavioral fix present in the English 'After' version, correctly mirrored

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.

Pull request overview

This PR syncs the French lecture content with the upstream English source PR (#595), applying a cleanup batch from the 2026-08 tracker audit and updating the translation state metadata accordingly.

Changes:

  • Updates random-number generation examples to use NumPy’s default_rng() / Generator API (and adjusts accompanying explanations).
  • Fixes/modernizes a few code examples (e.g., JAX key splitting) and updates data source URLs to raw.githubusercontent.com.
  • Cleans up Markdown formatting artifacts (stray indented blank lines), and refreshes translation-sync state YAMLs (source SHA, model, tool version, sync date).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lectures/about_py.md Removes formatting artifacts and fixes capitalization (e.g., “PyTorch”).
lectures/autodiff.md Updates JAX random key handling to split once into dedicated subkeys; cleans formatting.
lectures/pandas.md Switches examples to np.random.default_rng(); fixes footnote formatting.
lectures/pandas_panel.md Updates dataset URLs to raw.githubusercontent.com.
lectures/polars.md Switches examples to default_rng() / Generator methods; improves a percent-change expression to ignore null endpoints; fixes solution block formatting.
lectures/python_by_example.md Updates white-noise example to use default_rng() and updates the explanatory text; cleans formatting artifacts.
.translate/state/about_py.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).
.translate/state/autodiff.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).
.translate/state/pandas.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).
.translate/state/pandas_panel.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).
.translate/state/polars.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).
.translate/state/python_by_example.md.yml Updates translation sync metadata (source SHA, date, model, tool version, mode).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-30--verdant-toffee-3261a8.netlify.app

Commit: 8ecf1c4

📚 Changed Lectures


Build Info

@mmcky

mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Automatic rebase failed after #27 was merged.

Error: translation produced 1 error(s); branch left untouched: Error processing lectures/numpy.md: Error: structural parity check failed for lectures/numpy.md:

  • directive count differs: source has 145, output has 144 — a wholesale mismatch usually means the document was re-fenced or truncated
  • directive #64 name changed: source line 437 has {index}, output line 457 has {code-cell}
  • directive #66 name changed: source line 451 has {code-cell}, output line 477 has {index}
  • directive #67 name changed: source line 462 has {index}, output line 482 has {note}
  • directive #68 name changed: source line 467 has {note}, output line 503 has {code-cell}
  • directive #84 name changed: source line 914 has {code-cell}, output line 938 has {index}
  • directive #85 name changed: source line 930 has {index}, output line 943 has {code-cell}
  • directive #93 name changed: source line 986 has {code-cell}, output line 1005 has {index}
  • directive #94 name changed: source line 998 has {index}, output line 1010 has {code-cell}
  • directive #105 name changed: source line 1070 has {code-cell}, output line 1081 has {index}
  • directive #107 name changed: source line 1077 has {index}, output line 1106 has {code-cell}
  • directive #108 name changed: source line 1100 has {code-cell}, output line 1117 has {figure}
  • directive #109 name changed: source line 1111 has {figure}, output line 1129 has {exercise-start}
  • directive #110 name changed: source line 1127 has {exercise-start}, output line 1135 has {math}
  • directive #111 name changed: source line 1133 has {math}, output line 1147 has {hint}
  • directive #112 name changed: source line 1145 has {hint}, output line 1151 has {exercise-end}
  • directive #113 name changed: source line 1149 has {exercise-end}, output line 1154 has {solution-start}
  • directive #114 name changed: source line 1152 has {solution-start}, output line 1160 has {code-cell}
  • directive #116 name changed: source line 1168 has {code-cell}, output line 1180 has {solution-end}
  • directive #117 name changed: source line 1178 has {solution-end}, output line 1184 has {exercise-start}
  • directive #118 name changed: source line 1182 has {exercise-start}, output line 1205 has {code-cell}
  • directive #119 name changed: source line 1203 has {code-cell}, output line 1222 has {hint}
  • directive #120 name changed: source line 1220 has {hint}, output line 1236 has {exercise-end}
  • directive #121 name changed: source line 1234 has {exercise-end}, output line 1239 has {solution-start}
  • directive #122 name changed: source line 1237 has {solution-start}, output line 1245 has {code-cell}
  • directive #124 name changed: source line 1281 has {code-cell}, output line 1296 has {solution-end}
  • directive #125 name changed: source line 1302 has {solution-end}, output line 1300 has {exercise}
  • directive #126 name changed: source line 1306 has {exercise}, output line 1311 has {solution-start}
  • directive #127 name changed: source line 1317 has {solution-start}, output line 1320 has {code-cell}
  • directive #129 name changed: source line 1397 has {code-cell}, output line 1399 has {solution-end}
  • directive #130 name changed: source line 1405 has {solution-end}, output line 1403 has {exercise-start}
  • directive #131 name changed: source line 1409 has {exercise-start}, output line 1413 has {code-cell}
  • directive #136 name changed: source line 1461 has {code-cell}, output line 1462 has {exercise-end}
  • directive #137 name changed: source line 1468 has {exercise-end}, output line 1466 has {solution-start}
  • directive #138 name changed: source line 1472 has {solution-start}, output line 1472 has {code-cell}
  • directive #144 name changed: source line 1534 has {code-cell}, output line 1532 has {solution-end}

You may need to manually resolve conflicts or run /translate-resync on the source PR.

@mmcky

mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Automatic rebase failed after #29 was merged.

Error: translation produced 1 error(s); branch left untouched: Error processing lectures/numpy.md: Error: structural parity check failed for lectures/numpy.md:

  • directive count differs: source has 145, output has 144 — a wholesale mismatch usually means the document was re-fenced or truncated
  • directive #64 name changed: source line 437 has {index}, output line 457 has {code-cell}
  • directive #66 name changed: source line 451 has {code-cell}, output line 477 has {index}
  • directive #67 name changed: source line 462 has {index}, output line 482 has {note}
  • directive #68 name changed: source line 467 has {note}, output line 503 has {code-cell}
  • directive #84 name changed: source line 914 has {code-cell}, output line 938 has {index}
  • directive #85 name changed: source line 930 has {index}, output line 943 has {code-cell}
  • directive #93 name changed: source line 986 has {code-cell}, output line 1005 has {index}
  • directive #94 name changed: source line 998 has {index}, output line 1010 has {code-cell}
  • directive #105 name changed: source line 1070 has {code-cell}, output line 1081 has {index}
  • directive #107 name changed: source line 1077 has {index}, output line 1106 has {code-cell}
  • directive #108 name changed: source line 1100 has {code-cell}, output line 1117 has {figure}
  • directive #109 name changed: source line 1111 has {figure}, output line 1129 has {exercise-start}
  • directive #110 name changed: source line 1127 has {exercise-start}, output line 1135 has {math}
  • directive #111 name changed: source line 1133 has {math}, output line 1147 has {hint}
  • directive #112 name changed: source line 1145 has {hint}, output line 1151 has {exercise-end}
  • directive #113 name changed: source line 1149 has {exercise-end}, output line 1154 has {solution-start}
  • directive #114 name changed: source line 1152 has {solution-start}, output line 1160 has {code-cell}
  • directive #116 name changed: source line 1168 has {code-cell}, output line 1180 has {solution-end}
  • directive #117 name changed: source line 1178 has {solution-end}, output line 1184 has {exercise-start}
  • directive #118 name changed: source line 1182 has {exercise-start}, output line 1205 has {code-cell}
  • directive #119 name changed: source line 1203 has {code-cell}, output line 1222 has {hint}
  • directive #120 name changed: source line 1220 has {hint}, output line 1236 has {exercise-end}
  • directive #121 name changed: source line 1234 has {exercise-end}, output line 1239 has {solution-start}
  • directive #122 name changed: source line 1237 has {solution-start}, output line 1245 has {code-cell}
  • directive #124 name changed: source line 1281 has {code-cell}, output line 1296 has {solution-end}
  • directive #125 name changed: source line 1302 has {solution-end}, output line 1300 has {exercise}
  • directive #126 name changed: source line 1306 has {exercise}, output line 1311 has {solution-start}
  • directive #127 name changed: source line 1317 has {solution-start}, output line 1320 has {code-cell}
  • directive #129 name changed: source line 1397 has {code-cell}, output line 1399 has {solution-end}
  • directive #130 name changed: source line 1405 has {solution-end}, output line 1403 has {exercise-start}
  • directive #131 name changed: source line 1409 has {exercise-start}, output line 1413 has {code-cell}
  • directive #136 name changed: source line 1461 has {code-cell}, output line 1462 has {exercise-end}
  • directive #137 name changed: source line 1468 has {exercise-end}, output line 1466 has {solution-start}
  • directive #138 name changed: source line 1472 has {solution-start}, output line 1472 has {code-cell}
  • directive #144 name changed: source line 1534 has {code-cell}, output line 1532 has {solution-end}

You may need to manually resolve conflicts or run /translate-resync on the source PR.

@mmcky

mmcky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: conflicts with fr#29 and the automatic rebase failed on the numpy.md structural-parity check. A regenerated sync PR from current main replaces this one.

@mmcky mmcky closed this Aug 18, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants