Skip to content

[numpy] Corrections de style et de terminologie - #24

Merged
mmcky merged 1 commit into
QuantEcon:mainfrom
Honaminto:fix/numpy-4
Aug 4, 2026
Merged

[numpy] Corrections de style et de terminologie#24
mmcky merged 1 commit into
QuantEcon:mainfrom
Honaminto:fix/numpy-4

Conversation

@Honaminto

Copy link
Copy Markdown
Contributor

Summary

I went through numpy.md sentence by sentence, comparing it with the English version. In total I made 53 changes in the file, almost all style fixes to make the French read more naturally, plus one small bug fix.

What I changed

Most of my changes fix sentences that stuck too close to the English wording and sounded a bit forced in French. For example, I reworded phrases like "les tableaux disposent de méthodes utiles, toutes soigneusement optimisées" so it sounds more natural.

A few specific things:

  • I made terminology more consistent in a few spots ("tableau plat" became "tableau unidimensionnel" in some sentences, to match the vocabulary already used elsewhere)
  • I simplified a few clunky sentences in the exercises
  • I reworded the intro note on broadcasting so it reads more smoothly
  • I found and fixed a small bug: an {index} block was accidentally duplicated under Matrix Multiplication, so I removed the extra one

What I intentionally left alone

A few suggestions I didn't apply, because they either changed the technical meaning of the text or would have created inconsistency with terminology used elsewhere in the file. I also noticed a small mismatch between the text (which mentions tic/toc) and the code (which uses qe.Timer), but that comes from the English version, so I'll flag it as a separate issue instead of fixing it directly in the code.

@mmcky

mmcky commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Merci Emile — this is exactly the review the edition needed. We validated the PR sentence-by-sentence against the English source (fidelity, French quality, and technical integrity, each independently double-checked): zero regressions across 53 changes, all 109 code cells byte-identical, MyST structure intact. The calque repairs are the standout — « droits égaux », « choquant pour les programmeurs MATLAB », the stranded « de » before the numbered list — and a few edits improve on the English itself (the row/column ordering now matches the code cells that follow). Recommendation is to merge.

Your duplicated {index} find is a defect in the English source (numpy.md lines 432–438 carry the same duplicate) — we're filing it upstream so the next sync doesn't try to fight your fix. Same treatment as your #594.

Four small things before or just after merge, none blocking:

  1. Non-breaking spaces: four of the new sentences use a plain space before « : » (« …importantes près : », « doivent être homogènes : », « …unidimensionnel : », « …qu'un seul élément : »). The file's convention is U+00A0 before high punctuation — could you add them (or we'll sweep them in a follow-up)?
  2. « tableau plat » survives in 4 places (2 code comments, 2 broadcasting-section sentences). Since we're adopting your « tableau unidimensionnel » ruling into the engine glossary, do you want to finish the sweep here, or shall we do it in the follow-up pass?
  3. Two spots to confirm as deliberate: « Le problème essentiel que NumPy résout » became « L'un des principaux objectifs » (the English asserts it as the essential problem), and exercise np_ex1 now forbids only « boucle Python explicite » where the English forbids any form of Python loop (a reader could argue a comprehension is allowed under the French but not the English).
  4. « cours » vs « chapitre »: you introduced « chapitre » in a few sentences while « cours » remains elsewhere (and in the other 24 lectures, matching the glossary's Lecture → Cours). Which do you want as the standard term for one lecture? Whatever you pick becomes the glossary ruling for the whole series — happy to do the fleet-wide sweep once you decide.

Also encoded from this PR into the translation engine (so future syncs produce text closer to yours): Tableau unidimensionnel and Masque booléen as glossary pins, plus four style rules generalising your corrections. Thanks for making them minable — the before/after list format is perfect.

@mmcky
mmcky merged commit 8c73585 into QuantEcon:main Aug 4, 2026
2 checks passed
mmcky added a commit to QuantEcon/action-translation that referenced this pull request Aug 4, 2026
…que rules + glossary v1.1 (#241)

* feat(fr): encode the first native-editor review — 4 register/anti-calque rules + glossary v1.1

Encodes Emile's (@Honaminto) hand-review of two machine-seeded lectures
(QuantEcon/lecture-python-programming.fr#24 and #25, ~80 corrections,
independently validated at 0 regressions on numpy.md) as engine rules,
following the ml packet pattern from #237: every correction made at least
twice becomes a prompt rule, every explicit terminology ruling becomes a
glossary pin.

Glossary v1.1 (+3): Flat array / One-dimensional array -> Tableau
unidimensionnel; Boolean mask -> Masque booléen. Not pinned, per the #78
bar: no-variation terms, the context-dependent package/bibliothèque call,
and Lecture -> Chapitre (his edits are mixed and 24 seeded lectures say
cours — going back to the editor as a question).

fr additionalRules 2 -> 6: impersonal academic register, no calqued
discourse formulas, translate descriptive math/comment symbols but never
code identifiers, natural French sentence structure over mirrored English.

Rules feed review mode too — validate on the harness before release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(fr): gate the comment-symbol clause on the code-comments localization rule

Copilot review on #241: rule 3 instructed descriptive-symbol translation
in code comments unconditionally, conflicting with the base keep-code-as-is
prompt rules — comment translation is architecturally the opt-in
code-comments localization rule. The clause now scopes to display math and
hints, extending into comments only where that rule is active. Docs and
changelog mirrored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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