Skip to content

Restore French typography after edits made in the GitHub editor #91

Description

@mmcky

The translation engine puts a non-breaking space (U+00A0) before : ; ! ? in the French text, as French typography requires. Four edits made in GitHub's web editor since 2026-09-21 replaced every one of them in the edited file with an ordinary space:

Pull request or commit File Spaces to restore
#80, merged 2026-09-23 names.md all 8 replaced; restored on the pull request before the merge (c5d5185)
f2799d3, committed to main on 2026-10-02 python_oop.md all 10 replaced
#84, open about_py.md all 6 replaced
#85, open getting_started.md all 19 replaced, 8 of them in the page's <style> block (see step 2)

The cause is not known; nothing about it is asked of a reviewer. The spaces cannot be seen in the editor, which makes keeping them a step on our side rather than something to ask of a reviewer. Without them, a colon or a question mark can wrap onto a line of its own.

Steps

  1. python_oop.md, now. Restore the 10 in a small pull request with scripts/typography/apply.mjs from QuantEcon/action-translation (node scripts/typography/apply.mjs --repo <this repository> --lang fr, after npm run build:cli there). Check that the diff changes spacing only, and nothing outside python_oop.md; restore any other loss it finds the same way. The pull request also completes the check of the round-3 corrections that f2799d3 brought to main, so its description names Review: python_oop.md #51, the lecture's review issue, which its merge then closes.
  2. Every pull request edited in the browser, before it merges. Restore the spaces on the pull request's branch, as c5d5185 did for Review of the French translation of Names and Namespaces #80: Update about_py.md #84 and Update getting_started.md #85 when Matt answers Emile's questions there, in the same sitting, and any later pull request edited in the browser. In getting_started.md (Update getting_started.md #85), restore only the 11 in the prose. The 8 in the <style> block are the CSS defect that Typography writes U+00A0 into raw <style> blocks — the fr getting_started page loses its CSS action-translation#325 describes, so Update getting_started.md #85 removing them repairs the page's figure widths. Running apply.mjs from the current release would put them back, because the change for Typography writes U+00A0 into raw <style> blocks — the fr getting_started page loses its CSS action-translation#325 is not released yet.
  3. A check that catches the loss before a merge. For example, run apply.mjs --dry-run in this repository's pull-request workflow (ci.yml) and fail when it reports a file it would change. The script has no failing mode yet (--dry-run reports "Would change: N" and exits 0), so this needs a small --check flag in QuantEcon/action-translation. Add the check only after the release that carries Typography writes U+00A0 into raw <style> blocks — the fr getting_started page loses its CSS action-translation#325 (Release the engine for the Malayalam and French editions action-translation#346), or it will flag the <style> block in getting_started.md. If a check is not worth its cost, record here that the hand step in 2 stays.

Done when

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

maintenanceMaintenance tasks on the repository

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions