Skip to content

Update functions.md - #77

Merged
mmcky merged 1 commit into
QuantEcon:mainfrom
Honaminto:patch-1
Sep 23, 2026
Merged

mmcky merged 1 commit into
QuantEcon:mainfrom
Honaminto:patch-1

Conversation

@Honaminto

@Honaminto Honaminto commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Review of the French translation of the Functions chapter (functions.md)

Must-fix

1. Exercise 3, line 571 – coin side
"heads" was rendered as "une face (pile)". In French, face and pile are the two opposite sides of a coin, so writing them together is contradictory. "Heads" is the side bearing the effigy, which is face; "tails" is pile.
Sources: Monnaie royale canadienne, Anatomie d'une pièce (https://www.mint.ca/fr/commencez-votre-collection/anatomie-dune-piece-de-monnaie).

  • Before: 1. Si une face (pile) apparaît k fois ou plus consécutivement dans cette séquence au moins une fois, payez un dollar.
  • After: 1. Si le côté « face » apparaît k fois ou plus consécutivement dans cette séquence au moins une fois, payez un dollar.

2. Exercise 3, line 576 – same coin side error in the second rule

  • Before: Si une face (pile) apparaîtk fois ou plus dans cette séquence, payez un dollar.
  • After: Si le côté « face » apparaîtk fois ou plus dans cette séquence, payez un dollar.

3. Exercise 5, line 688 – apostrophe rendered as a closing quote
A straight apostrophe followed by [ is converted by Sphinx smartquotes into ”, so the site displays "l”Exercice 1". Replaced with a typographic apostrophe in the source.

  • Before: Réécrivez la fonction factorial() de l'[Exercice 1](factorial_exercise) en utilisant la récursion.
  • After: Réécrivez la fonction factorial() de l’[Exercice 1](factorial_exercise) en utilisant la récursion.

4. Lambda section, line 273 – missing comma before the main clause

  • Before: Pour créer la fonction $f(x) = x^3$ nous pouvons utiliser lambda comme suit
  • After: Pour créer la fonction $f(x) = x^3$, nous pouvons utiliser lambda comme suit

Terminology and style

5. Adding conditions, line 405 – alias is the usual programming term

  • Before: * Pendant l'exécution de ces lignes, les noms generator_typeetrng.uniform sont des « synonymes », et peuvent être utilisés de manière identique.
  • After: * Pendant l'exécution de ces lignes, les noms generator_typeetrng.uniform sont des « alias », et peuvent être utilisés de manière identique.

6. Adding conditions, line 418 – general statement, present tense

  • Before: Ici, nous avons créé un autre nom pour la fonction intégrée max(), qui pouvait
  • After: Ici, nous avons créé un autre nom pour la fonction intégrée max(), qui peut

7. Recursion, line 437 – math mode consistency with $x_t$

  • Before: Par exemple, considérons le problème du calcul de $x_t$ pour un certain t lorsque
  • After: Par exemple, considérons le problème du calcul de $x_t$ pour un certain $t$ lorsque

8. Recursion, line 471 – smoother French for LIFO

  • Before: * une structure de données dernier entré, premier sorti (LIFO)
  • After: * une structure de données selon le principe « dernier entré, premier sorti » (LIFO)

9. Exercise 3, line 568 – expérience aléatoire is the standard term in French probability

  • Before: D'abord, écrivez une fonction qui renvoie une réalisation du dispositif aléatoire suivant
  • After: D'abord, écrivez une fonction qui renvoie une réalisation de l'expérience aléatoire suivante

10. Exercise 3, line 574 – same as 9

  • Before: Ensuite, écrivez une autre fonction qui effectue la même tâche sauf que la deuxième règle du dispositif aléatoire ci-dessus devient
  • After: Ensuite, écrivez une autre fonction qui effectue la même tâche sauf que la deuxième règle de l'expérience aléatoire ci-dessus devient

11. Exercise 3 solution, line 587 – same as 9

  • Before: Voici une fonction pour le premier dispositif aléatoire.
  • After: Voici une fonction pour la première expérience aléatoire.

12. Exercise 3 solution, line 612 – same as 9

  • Before: Voici une autre fonction pour le deuxième dispositif aléatoire.
  • After: Voici une autre fonction pour la deuxième expérience aléatoire.

13. Exercise 4, line 654 – more natural technical French

  • Before: Écrivez une fonction pour calculer récursivement le $t$-ième nombre de Fibonacci pour tout $t$.
  • After: Écrivez une fonction qui calcule récursivement le $t$-ième nombre de Fibonacci pour tout $t$.

14. Exercise 4 solution, line 663 – avoids implying a unique solution

  • Before: Voici la solution standard
  • After: Voici une solution standard

15. Exercise 5 solution, line 697 – same as 14

  • Before: Voici la solution standard
  • After: Voici une solution standard

After full change

@mmcky mmcky 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.

Thank you Emile — this is an excellent review, and apologies for the two-week wait for a reply.

We checked every change against the English and against fresh translations from the current version of the tool. All 15 are improvements or sound editorial choices, and your three must-fixes are confirmed:

  • face / pile — the tool still gets the coin side wrong in about half of fresh translations, so your ruling becomes a French glossary entry (Heads → Face). In testing, that took it from 6 of 12 correct to 12 of 12.
  • l’[Exercice 1] — you're right about the smartquotes mechanism. The same problem appears in 24 places across 13 chapters, so we'll fix it in the tool's French typography pass and repair the whole edition in one go, rather than asking you to chase them.

This is ready to merge as it is — merging now. Thank you again for the care that went into it.

One question, no rush: in exercises you've consistently kept the imperative (« Écrivez une fonction… », « Réécrivez… »), but in python_by_example you changed « Posez $T=200$ » to « On pose $T=200$ ». Was that specific to poser, or should parameter set-ups generally be impersonal? The tool currently turns every exercise instruction into « On écrit… » / « On écrira… », which your edits suggest is wrong, so your answer will shape that rule.

@mmcky
mmcky merged commit bd3f431 into QuantEcon:main Sep 23, 2026
2 checks passed
mmcky added a commit that referenced this pull request Sep 23, 2026
…, plus two hand-ports

Brings the rest of the edition into line with the editor's round-2
rulings (#77, #78, #80), following the #26 pattern:

- « espace de noms » -> « espace de nommage » (#80, per the official
  French Python docs): oop_intro.md:398, scipy.md:88,
  python_oop.md:262/296. The adjective at oop_intro.md:398 stays
  « intégré » pending the editor's built-in ruling.
- « retourner » -> « renvoyer » for returned values (#80):
  pandas_panel.md:466/475/479/517/523, polars.md:546.
- functions.md:348: the English "standard normals" are draws, so
  « variables normales centrées réduites », not « lois ».

Hand-ports:

- numpy.md:1296: `discreteRV` -> `DiscreteRV`, the QuantEcon/lecture-python-programming#604 edit
  that never arrived (the numpy.md sync fails structural parity until
  the source's duplicated {index} is removed).
- sympy.md: repair the garbled seed anchor `(sympy=` and drop the
  duplicate `(sympy)=` added before the title, matching the source
  pre-title.

No typography changes (apply.mjs --dry-run: 0/27).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Sep 23, 2026
…, plus two hand-ports (#81)

* Round-2 consistency pass: namespace and renvoyer rulings edition-wide, plus two hand-ports

Brings the rest of the edition into line with the editor's round-2
rulings (#77, #78, #80), following the #26 pattern:

- « espace de noms » -> « espace de nommage » (#80, per the official
  French Python docs): oop_intro.md:398, scipy.md:88,
  python_oop.md:262/296. The adjective at oop_intro.md:398 stays
  « intégré » pending the editor's built-in ruling.
- « retourner » -> « renvoyer » for returned values (#80):
  pandas_panel.md:466/475/479/517/523, polars.md:546.
- functions.md:348: the English "standard normals" are draws, so
  « variables normales centrées réduites », not « lois ».

Hand-ports:

- numpy.md:1296: `discreteRV` -> `DiscreteRV`, the QuantEcon/lecture-python-programming#604 edit
  that never arrived (the numpy.md sync fails structural parity until
  the source's duplicated {index} is removed).
- sympy.md: repair the garbled seed anchor `(sympy=` and drop the
  duplicate `(sympy)=` added before the title, matching the source
  pre-title.

No typography changes (apply.mjs --dry-run: 0/27).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* python_oop.md: `__init_` -> `__init__`

A one-character typo carried over from the English source
(QuantEcon/lecture-python-programming python_oop.md:243, listed in
QuantEcon/lecture-python-programming#633). Raised by Copilot review.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mmcky added a commit to QuantEcon/action-translation that referenced this pull request Sep 23, 2026
…he second editor round (#328)

* glossary(fr): v1.2 — Namespace, Heads, standard-normal context from the second editor round

Encodes the terminology rulings from the French editor's second review
round (QuantEcon/lecture-python-programming.fr#77 and #80, merged
2026-09-23) that meet the glossary bar — an explicit native ruling plus
measured variation:

- Namespace → Espace de nommage. The official French Python docs use
  « espace de nommage »; fresh init draws at v0.29.2 wrote « espace de
  noms » 206/206. A NEW section brought « noms » back 3/3 without the
  pin, 0/3 with it.
- Heads (coin toss) → Face. The coin side was wrong in 6/12 fresh draws
  of the exercise without the pin, 0/12 with it. Tails → Pile is not
  pinned: no source occurrence, and it would sit beside four « queue »
  entries.
- Standard normal keeps « Loi normale centrée réduite »; its context now
  steers draws and random variables to « variable normale centrée
  réduite » (« lois » for draws 8/32 → 0/28; distribution sense 16/16).

Held for measurement: Garbage collection, Return (a value). Held for an
editor ruling: Built-in function. 367 → 369 terms; docs counts updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs: ml glossary count 61/77 -> 87 (v0.7.0)

The ml glossary reached v0.7.0 / 87 terms across #303, #311 and #315,
which updated glossary/ml.json but not the docs. Raised by Copilot
review on #328.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Honaminto

Honaminto commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

For this one, I’d keep the distinction intentional. I think the imperative works better when we’re directly asking the reader to do something, like “Écrivez une fonction…”, “Calculez…” or “Tracez…”.

For parameter definitions or mathematical setup, I’d use the impersonal form instead, for example “On pose (T = 200)” or “On suppose que…”.

So the change from “Posez (T = 200)” to “On pose (T = 200)” was specific to that kind of setup. I wouldn’t change all exercise instructions to “On écrit…” / “On écrira…”. I’d keep the imperative for actual instructions and use “On…” for setup or assumptions.

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