Skip to content

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

Merged
mmcky merged 2 commits into
mainfrom
feat/fr-editor-feedback
Aug 4, 2026
Merged

feat(fr): encode the first native-editor review — 4 register/anti-calque rules + glossary v1.1#241
mmcky merged 2 commits into
mainfrom
feat/fr-editor-feedback

Conversation

@mmcky

@mmcky mmcky commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Encodes the first substantial native-editor feedback on machine-translated French — Emile's (@Honaminto) hand-review of two seeded lectures, QuantEcon/lecture-python-programming.fr#24 (numpy, 53 corrections) and QuantEcon/lecture-python-programming.fr#25 (python_by_example, ~25 corrections) — as engine rules, applying the ml packet pattern (#237) to French: every correction he made at least twice becomes a prompt rule, every explicit terminology ruling becomes a glossary pin.

The two PRs were independently validated before mining (six-lens review, adversarially verified): zero regressions on numpy.md, two minor connector/consistency nits on python_by_example.md, zero major findings. The full validation record is in QuantEcon/project-translation (research/2026-08-04-fr-editor-feedback-mining.md); program context on QuantEcon/project-translation#15.

Glossary v1.1 (+3 terms)

en fr evidence
Flat array Tableau unidimensionnel explicit ruling in fr#24 against the seed's calque « tableau plat »
One-dimensional array Tableau unidimensionnel companion phrasing of the same concept, same ruling
Boolean mask Masque booléen introduced in fr#24; Emile logged checking it against French NumPy references

Deliberately not pinned, per #78's bar (pin only on real variation or an explicit ruling — every pinned term costs input tokens in every prompt): terms the seed already rendered consistently (bloc de code, bruit blanc, élément par élément), the context-dependent package-vs-bibliothèque call (Emile says « bibliothèque » where "package" names a library like NumPy but kept the Packages/Sous-packages headings), and Lecture → Chapitre — his edits use both « cours » and « chapitre », the glossary currently pins Cours, and 24 seeded lectures say « cours », so that goes back to him as a question rather than into the glossary as churn.

fr additionalRules 2 → 6 (provenance comment in language-config.ts mirrors the ml pattern):

  1. Impersonal academic register over calqued direct address — « On pose $T = 200$ », « L'objectif de cet exercice est de… »
  2. No word-for-word discourse formulas — « Nous verrons plus loin… », never « Nous pouvons et allons… »
  3. Translate descriptive symbols in display math, hints and code comments ($aire = \pi * rayon^2$); never rename identifiers executable code defines or uses
  4. Natural French sentence structure over mirrored English syntax — fidelity is owed to meaning and technical content

Before this reaches a release: these rules feed review mode as well as translation. Harness validation should confirm (a) review mode does not flag Emile-style impersonal register or de-calqued phrasing as meaning drift, and (b) a translation run under the new rules stops producing the « Posez… » / « Nous pouvons et allons… » patterns. Harness-first per the standing policy.

🤖 Generated with Claude Code

…que 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>
Copilot AI review requested due to automatic review settings August 4, 2026 00:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Encodes native-editor French review feedback into the translation engine by extending the French language rule set (register + anti-calque guidance) and pinning a small set of NumPy terminology decisions in the French glossary, with corresponding documentation, tests, and bundled action output updates.

Changes:

  • Expanded fr additionalRules to include four new register/anti-calque rules derived from native-editor corrections.
  • Bumped glossary/fr.json to v1.1 and added three pinned terms (Boolean mask, Flat array, One-dimensional array).
  • Updated docs, changelog, tests, and regenerated dist-action/ bundle to reflect the new French rules/glossary.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/language-config.ts Adds four French register/anti-calque prompt rules and provenance comment.
src/tests/language-config.test.ts Adds assertions covering the expanded French rule set.
glossary/fr.json Bumps version to 1.1 and adds three French terminology pins.
docs/user/language-config.md Documents the expanded French rule set.
docs/user/glossary.md Updates French glossary metadata (term count/date) and description of review provenance.
dist-action/index.js Regenerates bundled action output to include updated French rules.
CHANGELOG.md Records the user-visible addition of the new French rules and glossary v1.1.

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

Comment thread src/language-config.ts
Comment thread docs/user/language-config.md Outdated
…tion 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>
@mmcky
mmcky merged commit ed9dcf5 into main Aug 4, 2026
1 check passed
@mmcky
mmcky deleted the feat/fr-editor-feedback branch August 4, 2026 00:52
@mmcky mmcky mentioned this pull request Aug 4, 2026
mmcky added a commit that referenced this pull request Aug 4, 2026
* chore: release v0.25.0

Promote [Unreleased] → [0.25.0] - 2026-08-04: the #192 trust-gated workflow
templates, #117 demand-driven bibliography backfill, #210 deletion
partitioning in review mode, the #202 one-version E2E harness, #237 ml
packet rulings, and #241 fr editor rules + glossary v1.1.

Version refs bumped (package.json, README, docs/index, architecture,
AGENTS.md release-gate example); glossary counts in docs/index corrected
against the shipped files (fr 364 → 367, ml 52 → 57); STATE.md release
entry added. Bundle verified byte-current before the bump — engineVersion
is read from package.json at runtime, so no rebuild rides this commit.

* chore: fix release-doc consistency flagged on the release PR

Three of Copilot's four comments on #242 held up; this addresses them.

.dev/STATE.md said "the release decision is taken — v0.24.0 is cut" in the same
file that now carries a v0.25.0 entry, and it claimed #210 was "released in
v0.25.0" when the tags are uncut and @v0 still resolves to v0.24.0. Both now
state the actual position: v0.25.0 is prepared, PR #242 is open, nothing is
tagged. The verified: header goes to 2026-08-04, since the file's own preamble
tells readers to trust it less as that date ages and this PR edits it.

The --action-ref gate examples in AGENTS.md and tool-test-action-on-github/
README.md had drifted apart (v0.25.0 and v0.24.0 respectively). Rather than bump
both again, they now use the vX.Y.Z placeholder that AGENTS.md:236 and
README.md:55 already use — the drift was structural, not a missed edit, so this
removes the per-release churn instead of resetting it.

Copilot's fourth comment, asking for an empty [Unreleased] header above the
release section, is declined: the v0.24.0 release commit (86e154c) also went
straight to its version header, so the convention here is that the release
commit consumes [Unreleased] and the next feature PR reintroduces it.

Tests: 1478 passed, 64 suites.
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