You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review of the French translation of Fondamentaux de Python
Fix
(Line 164). The English says "without brackets" for a tuple, but the French says "crochets" (square brackets). In French, a tuple is written with parentheses, so I changed it to "parenthèses".
Before: x = 'a', 'b' # Ou sans crochets --- la signification est identique
After: x = 'a', 'b' # Ou sans parenthèses --- la signification est identique
(Line 337). The file name is wrong here. The code above writes newfile.txt, so the text should refer to that file. The same slip exists in the English source, which I will report separately.
Before: Nous pouvons également utiliser Python pour lire le contenu de `newline.txt` comme suit
After: Nous pouvons également utiliser Python pour lire le contenu de `newfile.txt` comme suit
(Line 414). The sentence started with a lowercase letter and read like a fragment. I added the capital, a comma before the relative clause, and French quotation marks around the English term.
Before: nous pouvons passer au mode `a` qui signifie mode d'ajout (append)
After: Nous pouvons passer au mode `a`, qui correspond au mode d'ajout (« append »).
(Line 892). The coefficients start at a_0, not a_1, since the polynomial in the equation above has a constant term. The English source has the same mistake, which I will also report.
Before: Écrivez une fonction `p` telle que `p(x, coeff)` calcule la valeur dans {eq}`polynom0` étant donné un point `x` et une liste de coefficients `coeff` ($a_1, a_2, \cdots a_n$).
After: Écrivez une fonction `p` telle que `p(x, coeff)` calcule la valeur dans {eq}`polynom0` étant donné un point `x` et une liste de coefficients `coeff` ($a_0, a_1, \cdots a_n$).
(Line 1008). sets is not a Python type, since the type is set. I replaced it with the French term and put the real name in code.
Before: Bien sûr, si nous utilisons le type de données `sets`, la solution est plus facile
After: Bien sûr, si nous utilisons le type ensemble (`set`), la solution est plus facile
(Line 489). .title() capitalizes every word, not just the first one, so I reworded "Mettre en majuscule les noms de ville", which was slightly off.
Before: city = city.title() # Mettre en majuscule les noms de ville
After: city = city.title() # Mettre une majuscule à chaque mot des noms de ville
7.( Line 495). The f is a prefix placed before the quote, and the f' in the French suggests the quote is part of it. I also replaced "variables" with "valeurs", because an f-string inserts values, and added "de caractères" to match the usual wording.
Before: Ici `f'` est une f-string [utilisée pour insérer des variables dans des chaînes](https://docs.python.org/3/library/string.html#formatspec).
After: Ici, le préfixe `f` indique une f-string, [utilisée pour insérer des valeurs dans des chaînes de caractères](https://docs.python.org/3/library/string.html#formatspec).
(Line 738). Docstrings are documentation, not comments, so "ajouter des commentaires" was misleading. I used "chaînes de documentation" and kept the English term in italics.
Before: Python dispose d'un système pour ajouter des commentaires aux modules, classes, fonctions, etc. appelé *docstrings*.
After: Python dispose d'un système permettant d'ajouter de la documentation aux modules, classes, fonctions, etc. à l'aide de chaînes de documentation (*docstrings*).
(Line 650.) The original reads as if the expressions are "equivalent to False" in a list that mixes zero, containers and None. The meaning is that they are treated as False, so I reworded it and fixed the agreement.
Before: * Les expressions qui s'évaluent à zéro, à des séquences ou conteneurs vides (chaînes, listes, etc.) et `None` sont toutes équivalentes à `False`.
After: * Les expressions qui s'évaluent à zéro, les séquences ou conteneurs vides (chaînes, listes, etc.) ainsi que `None` sont tous considérés comme `False`.
Terminology and style
(Line 60.) I replaced "suivent" with "manipulent", because programs manipulate data types rather than follow them.
Before: Les programmes informatiques suivent généralement toute une gamme de types de données.
After: Les programmes informatiques manipulent généralement toute une gamme de types de données.
Before: * La fonction intégrée `open()` crée un objet fichier pour écrire dedans.
After: * La fonction native `open()` crée un objet fichier dans lequel écrire.
(Line 795.) I applied the same term here, "fonction native".
Before: (Pour certains, la fonction intégrée `sum()` s'avère pratique).
After: (Pour certains, la fonction native `sum()` s'avère pratique).
(Line 139.) These are Python types being named in prose, so I translated them as ordinary words instead of leaving them as code.
Before: Nous avons déjà vu les types `integer` et `float`.
After: Nous avons déjà vu les types entier et flottant.
(Line 282.) "Mappées" is a calque, so I used "associées". I also replaced the code-formatted values with the French word in italics.
Before: Les objets vers lesquels les clés sont mappées (`'Frodo'` et `33`) sont appelés les `values` (valeurs).
After: Les objets auxquels les clés sont associées (`'Frodo'` et `33`) sont appelés les *valeurs*.
(Line 950.) "Une alternative, solution plus pythonique" read as two nouns stuck together. I changed the order so it reads naturally.
Before: Une alternative, solution plus pythonique :
After: Une solution alternative, plus pythonique :
(Line 995.) I made the same fix as in the previous item, with an extra comma before the participle.
Before: Une alternative, solution plus pythonique utilisant `all()` :
After: Une solution alternative, plus pythonique, utilisant `all()` :
Docstring translation
Following your comment on #84 and issue #88, I translated the explanatory docstrings and left code identifiers and executable output as they are.
(Line 747.) I translated the docstring of f(x) in the code cell.
Before: This function squares its argument
After: Cette fonction élève son argument au carré.
(Lines 765 and 782.) I also translated the output blocks that echo the same docstring, so they match the code cell. I left the labels in those blocks (Type, String Form, File, Definition, Source) in English because they come from IPython. I will raise this edge case on Code comments and docstrings in the French lectures: French or English? #88.
Before (line 765): Docstring: This function squares its argument
After (line 765): Docstring: Cette fonction élève son argument au carré.
Before (line 782): This function squares its argument
After (line 782): Cette fonction élève son argument au carré.
(Lines 1047 to 1063.) I translated the docstring of linapprox in full. The section headings follow the numpydoc convention, so I changed "Parameters" to "Paramètres" and "Returns" to "Renvoie". I kept the ===== underlines as they were.
Before:
Evaluates the piecewise linear interpolant of f at x on the interval
[a, b], with n evenly spaced grid points.
Parameters
==========
f : function
The function to approximate
x, a, b : scalars (floats or integers)
Evaluation point and endpoints, with a <= x <= b
n : integer
Number of grid points
Returns
=======
A float. The interpolant evaluated at x
After:
Évalue l'interpolant linéaire par morceaux de f en x sur l'intervalle
[a, b], avec n points de grille régulièrement espacés.
Paramètres
==========
f : fonction
La fonction à approximer
x, a, b : scalaires (flottants ou entiers)
Point d'évaluation et bornes, avec a <= x <= b
n : entier
Nombre de points de grille
Renvoie
=======
Un flottant. L'interpolant évalué en x
Following your comment on Update about_py.md #84 and issue Code comments and docstrings in the French lectures: French or English? #88, I translated the explanatory docstrings (the f(x) cell and linapprox). The output blocks that echo the f(x) docstring (lines 765 and 782) are static IPython output. I translated the docstring text there so it matches the code cell, but I left the labels (Type, String Form, File, Definition, Source) in English because they come from IPython. Is that the right call, or would you rather leave those output blocks entirely in English?
Since remaining lectures are now redrafted from the current English, will you keep this lecture as it is, or redraft it too? I opened the PR on the same basis as Update about_py.md #84 and Update getting_started.md #85, so these corrections are not lost either way.
A few problems come from the English source, so I did not treat them as French-only issues: newline.txt instead of newfile.txt (item 2), the coefficient range starting at a_1 instead of a_0 (item 4), and sets instead of set (item 5). I fixed them in the French so it is correct now. I'll report them on the English repo so the source gets corrected as well.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review of the French translation of Fondamentaux de Python
Fix
(Line 164). The English says "without brackets" for a tuple, but the French says "crochets" (square brackets). In French, a tuple is written with parentheses, so I changed it to "parenthèses".
Before:
x = 'a', 'b' # Ou sans crochets --- la signification est identiqueAfter:
x = 'a', 'b' # Ou sans parenthèses --- la signification est identique(Line 337). The file name is wrong here. The code above writes
newfile.txt, so the text should refer to that file. The same slip exists in the English source, which I will report separately.Before:
Nous pouvons également utiliser Python pour lire le contenu de `newline.txt` comme suitAfter:
Nous pouvons également utiliser Python pour lire le contenu de `newfile.txt` comme suit(Line 414). The sentence started with a lowercase letter and read like a fragment. I added the capital, a comma before the relative clause, and French quotation marks around the English term.
Before:
nous pouvons passer au mode `a` qui signifie mode d'ajout (append)After:
Nous pouvons passer au mode `a`, qui correspond au mode d'ajout (« append »).(Line 892). The coefficients start at a_0, not a_1, since the polynomial in the equation above has a constant term. The English source has the same mistake, which I will also report.
Before:
Écrivez une fonction `p` telle que `p(x, coeff)` calcule la valeur dans {eq}`polynom0` étant donné un point `x` et une liste de coefficients `coeff` ($a_1, a_2, \cdots a_n$).After:
Écrivez une fonction `p` telle que `p(x, coeff)` calcule la valeur dans {eq}`polynom0` étant donné un point `x` et une liste de coefficients `coeff` ($a_0, a_1, \cdots a_n$).(Line 1008).
setsis not a Python type, since the type isset. I replaced it with the French term and put the real name in code.Before:
Bien sûr, si nous utilisons le type de données `sets`, la solution est plus facileAfter:
Bien sûr, si nous utilisons le type ensemble (`set`), la solution est plus facile(Line 489).
.title()capitalizes every word, not just the first one, so I reworded "Mettre en majuscule les noms de ville", which was slightly off.Before:
city = city.title() # Mettre en majuscule les noms de villeAfter:
city = city.title() # Mettre une majuscule à chaque mot des noms de ville7.( Line 495). The
fis a prefix placed before the quote, and thef'in the French suggests the quote is part of it. I also replaced "variables" with "valeurs", because an f-string inserts values, and added "de caractères" to match the usual wording.Before:
Ici `f'` est une f-string [utilisée pour insérer des variables dans des chaînes](https://docs.python.org/3/library/string.html#formatspec).After:
Ici, le préfixe `f` indique une f-string, [utilisée pour insérer des valeurs dans des chaînes de caractères](https://docs.python.org/3/library/string.html#formatspec).(Line 738). Docstrings are documentation, not comments, so "ajouter des commentaires" was misleading. I used "chaînes de documentation" and kept the English term in italics.
Before:
Python dispose d'un système pour ajouter des commentaires aux modules, classes, fonctions, etc. appelé *docstrings*.After:
Python dispose d'un système permettant d'ajouter de la documentation aux modules, classes, fonctions, etc. à l'aide de chaînes de documentation (*docstrings*).(Line 650.) The original reads as if the expressions are "equivalent to
False" in a list that mixes zero, containers andNone. The meaning is that they are treated asFalse, so I reworded it and fixed the agreement.Before:
* Les expressions qui s'évaluent à zéro, à des séquences ou conteneurs vides (chaînes, listes, etc.) et `None` sont toutes équivalentes à `False`.After:
* Les expressions qui s'évaluent à zéro, les séquences ou conteneurs vides (chaînes, listes, etc.) ainsi que `None` sont tous considérés comme `False`.Terminology and style
(Line 60.) I replaced "suivent" with "manipulent", because programs manipulate data types rather than follow them.
Before:
Les programmes informatiques suivent généralement toute une gamme de types de données.After:
Les programmes informatiques manipulent généralement toute une gamme de types de données.(Line 76.) I used "natifs" for "built-in", in line with the project's ruling on Proposal: review each remaining lecture as a fresh draft on its own PR #82. I also removed the repeated "Python".
Before:
Python fournit de nombreux autres types de données Python intégrés, dont certains que nous avons déjà rencontrésAfter:
Python fournit de nombreux autres types de données natifs, dont certains que nous avons déjà rencontrés(Line 324.) I changed "intégrée" to "native" for consistency with Proposal: review each remaining lecture as a fresh draft on its own PR #82, and fixed the awkward "pour écrire dedans".
Before:
* La fonction intégrée `open()` crée un objet fichier pour écrire dedans.After:
* La fonction native `open()` crée un objet fichier dans lequel écrire.(Line 795.) I applied the same term here, "fonction native".
Before:
(Pour certains, la fonction intégrée `sum()` s'avère pratique).After:
(Pour certains, la fonction native `sum()` s'avère pratique).(Line 139.) These are Python types being named in prose, so I translated them as ordinary words instead of leaving them as code.
Before:
Nous avons déjà vu les types `integer` et `float`.After:
Nous avons déjà vu les types entier et flottant.(Line 282.) "Mappées" is a calque, so I used "associées". I also replaced the code-formatted
valueswith the French word in italics.Before:
Les objets vers lesquels les clés sont mappées (`'Frodo'` et `33`) sont appelés les `values` (valeurs).After:
Les objets auxquels les clés sont associées (`'Frodo'` et `33`) sont appelés les *valeurs*.(Line 950.) "Une alternative, solution plus pythonique" read as two nouns stuck together. I changed the order so it reads naturally.
Before:
Une alternative, solution plus pythonique :After:
Une solution alternative, plus pythonique :(Line 995.) I made the same fix as in the previous item, with an extra comma before the participle.
Before:
Une alternative, solution plus pythonique utilisant `all()` :After:
Une solution alternative, plus pythonique, utilisant `all()` :Docstring translation
Following your comment on #84 and issue #88, I translated the explanatory docstrings and left code identifiers and executable output as they are.
(Line 747.) I translated the docstring of
f(x)in the code cell.Before:
This function squares its argumentAfter:
Cette fonction élève son argument au carré.(Lines 765 and 782.) I also translated the output blocks that echo the same docstring, so they match the code cell. I left the labels in those blocks (
Type,String Form,File,Definition,Source) in English because they come from IPython. I will raise this edge case on Code comments and docstrings in the French lectures: French or English? #88.Before (line 765):
Docstring: This function squares its argumentAfter (line 765):
Docstring: Cette fonction élève son argument au carré.Before (line 782):
This function squares its argumentAfter (line 782):
Cette fonction élève son argument au carré.(Lines 1047 to 1063.) I translated the docstring of
linapproxin full. The section headings follow the numpydoc convention, so I changed "Parameters" to "Paramètres" and "Returns" to "Renvoie". I kept the=====underlines as they were.Before: