Skip to content

Commit 422cb12

Browse files
committed
Make merge
1 parent 536359a commit 422cb12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+14244
-12708
lines changed

Makefile

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# from which we generated our po files. We use it here so when we
2121
# test build, we're building with the .rst files that generated our
2222
# .po files.
23-
CPYTHON_CURRENT_COMMIT := b2db1c208066b67bdf57bf3799de50352fe63416
23+
CPYTHON_CURRENT_COMMIT := 100da7c31aeb3888962bf33c8cc3594272964815
2424
LANGUAGE := fr
2525
BRANCH := 3.10
2626

@@ -65,7 +65,7 @@ PYTHON := $(shell which python3)
6565
MODE := html
6666
POSPELL_TMP_DIR := .pospell/
6767
JOBS := auto
68-
SERVE_PORT :=
68+
SPHINXERRORHANDLING = -W
6969

7070
# Detect OS
7171

@@ -90,15 +90,16 @@ all: ensure_prerequisites
9090
mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/
9191
$(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/
9292
$(MAKE) -C venv/cpython/Doc/ \
93-
SPHINXOPTS='-j$(JOBS) \
94-
-D locale_dirs=$(abspath locales) \
93+
JOBS='$(JOBS)' \
94+
SPHINXOPTS='-D locale_dirs=$(abspath locales) \
9595
-D language=$(LANGUAGE) \
9696
-D gettext_compact=0 \
9797
-D latex_engine=xelatex \
9898
-D latex_elements.inputenc= \
9999
-D latex_elements.fontenc=' \
100+
SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \
100101
$(MODE)
101-
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make serve' to see them."
102+
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them."
102103

103104

104105
# We clone cpython/ inside venv/ because venv/ is the only directory
@@ -117,18 +118,13 @@ ensure_prerequisites: venv/cpython/.git/HEAD
117118
exit 1; \
118119
fi
119120

120-
121-
.PHONY: serve
122-
serve:
123-
ifdef SERVE_PORT
124-
$(MAKE) -C venv/cpython/Doc/ serve SERVE_PORT=$(SERVE_PORT)
125-
else
126-
$(MAKE) -C venv/cpython/Doc/ serve
127-
endif
121+
.PHONY: htmlview
122+
htmlview: MODE=htmlview
123+
htmlview: all
128124

129125
.PHONY: todo
130126
todo: ensure_prerequisites
131-
potodo --exclude venv .venv $(EXCLUDED)
127+
potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED)
132128

133129
.PHONY: wrap
134130
wrap: ensure_prerequisites
@@ -142,22 +138,51 @@ DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS)))
142138
.PHONY: spell
143139
spell: ensure_prerequisites $(DESTS)
144140

141+
.PHONY: line-length
142+
line-length:
143+
@echo "Searching for long lines..."
144+
@awk '{if (length(gensub(/శ్రీనివాస్/, ".", "g", $$0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $$0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}' *.po */*.po
145+
146+
.PHONY: sphinx-lint
147+
sphinx-lint:
148+
@echo "Checking all files using sphinx-lint..."
149+
@sphinx-lint --enable all --disable line-too-long *.po */*.po
150+
145151
$(POSPELL_TMP_DIR)/%.po.out: %.po dict
146152
@echo "Pospell checking $<..."
147-
mkdir -p $(@D)
153+
@mkdir -p $(@D)
148154
pospell -p dict -l fr_FR $< && touch $@
149155

150156
.PHONY: fuzzy
151157
fuzzy: ensure_prerequisites
152-
potodo -f --exclude venv .venv $(EXCLUDED)
158+
potodo --only-fuzzy --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED)
159+
160+
.PHONY: check-headers
161+
check-headers:
162+
@grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' *.po */*.po | while read -r file;\
163+
do \
164+
echo "Please update the po comment in $$file"; \
165+
done
166+
@grep -L '^"Project-Id-Version: Python 3\\n"$$' *.po */*.po | while read -r file;\
167+
do \
168+
echo "Please update the 'Project-Id-Version' header in $$file"; \
169+
done
170+
@grep -L '^"Language: fr\\n"$$' *.po */*.po | while read -r file;\
171+
do \
172+
echo "Please update the 'Language' header in $$file"; \
173+
done
174+
@grep -L '^"Language-Team: FRENCH <traductions@lists.afpy.org>\\n"' *.po */*.po | while read -r file;\
175+
do \
176+
echo "Please update the 'Language-Team' header in $$file"; \
177+
done
153178

154179
.PHONY: verifs
155-
verifs: spell
180+
verifs: spell line-length sphinx-lint check-headers
156181

157182
.PHONY: clean
158183
clean:
159184
@echo "Cleaning *.mo and $(POSPELL_TMP_DIR)"
160-
rm -fr $(POSPELL_TMP_DIR)
185+
rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/
161186
find -name '*.mo' -delete
162187
@echo "Cleaning build directory"
163188
$(MAKE) -C venv/cpython/Doc/ clean

bugs.po

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: Python 3\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2022-10-18 15:46+0200\n"
8+
"POT-Creation-Date: 2023-03-22 22:57+0100\n"
99
"PO-Revision-Date: 2022-07-08 17:50+0200\n"
1010
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
1111
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@@ -61,6 +61,12 @@ msgstr ""
6161

6262
#: bugs.rst:22
6363
msgid ""
64+
"You can also open a discussion item on our `Documentation Discourse forum "
65+
"<https://discuss.python.org/c/documentation/26>`_."
66+
msgstr ""
67+
68+
#: bugs.rst:25
69+
msgid ""
6470
"If you're short on time, you can also email documentation bug reports to "
6571
"docs@python.org (behavioral bugs can be sent to python-list@python.org). "
6672
"'docs@' is a mailing list run by volunteers; your request will be noticed, "
@@ -72,64 +78,64 @@ msgstr ""
7278
"volontaires, votre requête sera vue, mais elle peut prendre un moment pour "
7379
"être traitée."
7480

75-
#: bugs.rst:30
81+
#: bugs.rst:33
7682
msgid "`Documentation bugs`_"
7783
msgstr "`Bogues de documentation`_"
7884

79-
#: bugs.rst:30
85+
#: bugs.rst:33
8086
msgid ""
8187
"A list of documentation bugs that have been submitted to the Python issue "
8288
"tracker."
8389
msgstr ""
8490
"Liste des bogues de documentation soumis à l'outil de suivi des problèmes "
8591
"Python."
8692

87-
#: bugs.rst:33
93+
#: bugs.rst:36
8894
msgid "`Issue Tracking <https://devguide.python.org/tracker/>`_"
8995
msgstr "`Outil de suivi des problèmes <https://devguide.python.org/tracker/>`_"
9096

91-
#: bugs.rst:33
97+
#: bugs.rst:36
9298
msgid ""
9399
"Overview of the process involved in reporting an improvement on the tracker."
94100
msgstr ""
95101
"Vue d'ensemble du processus pour proposer une amélioration avec l'outil de "
96102
"suivi."
97103

98-
#: bugs.rst:36
104+
#: bugs.rst:39
99105
msgid ""
100106
"`Helping with Documentation <https://devguide.python.org/docquality/#helping-"
101107
"with-documentation>`_"
102108
msgstr ""
103109
"`Aider avec la documentation <https://devguide.python.org/docquality/"
104110
"#helping-with-documentation>`_"
105111

106-
#: bugs.rst:36
112+
#: bugs.rst:39
107113
msgid ""
108114
"Comprehensive guide for individuals that are interested in contributing to "
109115
"Python documentation."
110116
msgstr "Guide complet pour qui souhaite contribuer à la documentation Python."
111117

112-
#: bugs.rst:38
118+
#: bugs.rst:41
113119
msgid ""
114120
"`Documentation Translations <https://devguide.python.org/documenting/"
115121
"#translating>`_"
116122
msgstr ""
117123
"`Aider avec la documentation <https://devguide.python.org/documenting/"
118124
"#translating>`_"
119125

120-
#: bugs.rst:39
126+
#: bugs.rst:42
121127
msgid ""
122128
"A list of GitHub pages for documentation translation and their primary "
123129
"contacts."
124130
msgstr ""
125131
"Liste de dépôts GitHub où la documentation est traduite, avec les personnes "
126132
"à contacter."
127133

128-
#: bugs.rst:45
134+
#: bugs.rst:48
129135
msgid "Using the Python issue tracker"
130136
msgstr "Utilisation du gestionnaire de tickets Python"
131137

132-
#: bugs.rst:47
138+
#: bugs.rst:50
133139
msgid ""
134140
"Issue reports for Python itself should be submitted via the GitHub issues "
135141
"tracker (https://github.com/python/cpython/issues). The GitHub issues "
@@ -142,7 +148,7 @@ msgstr ""
142148
"permettant de saisir des informations pertinentes à soumettre aux "
143149
"développeurs."
144150

145-
#: bugs.rst:52
151+
#: bugs.rst:55
146152
msgid ""
147153
"The first step in filing a report is to determine whether the problem has "
148154
"already been reported. The advantage in doing so, aside from saving the "
@@ -160,7 +166,7 @@ msgstr ""
160166
"contribution est la bienvenue !). Pour ce faire, cherchez dans le "
161167
"gestionnaire de tickets grâce à la boîte de recherche en haut de la page."
162168

163-
#: bugs.rst:59
169+
#: bugs.rst:62
164170
msgid ""
165171
"If the problem you're reporting is not already in the list, log in to "
166172
"GitHub. If you don't already have a GitHub account, create a new account "
@@ -172,7 +178,7 @@ msgstr ""
172178
"compte en cliquant sur le lien « Sign Up ». Il n'est pas possible de "
173179
"soumettre un rapport de bogue de manière anonyme."
174180

175-
#: bugs.rst:64
181+
#: bugs.rst:67
176182
msgid ""
177183
"Being now logged in, you can submit an issue. Click on the \"New issue\" "
178184
"button in the top bar to report a new issue."
@@ -181,19 +187,20 @@ msgstr ""
181187
"*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de "
182188
"rapport."
183189

184-
#: bugs.rst:67
190+
#: bugs.rst:70
185191
msgid "The submission form has two fields, \"Title\" and \"Comment\"."
186192
msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*."
187193

188-
#: bugs.rst:69
194+
#: bugs.rst:72
195+
#, fuzzy
189196
msgid ""
190197
"For the \"Title\" field, enter a *very* short description of the problem; "
191-
"less than ten words is good."
198+
"fewer than ten words is good."
192199
msgstr ""
193200
"Dans le champ *Title*, entrez une *très* brève description du problème "
194201
"rencontré ; tâchez de vous limiter à dix mots."
195202

196-
#: bugs.rst:72
203+
#: bugs.rst:75
197204
msgid ""
198205
"In the \"Comment\" field, describe the problem in detail, including what you "
199206
"expected to happen and what did happen. Be sure to include whether any "
@@ -206,7 +213,7 @@ msgstr ""
206213
"plateforme matérielle et logicielle vous utilisiez (en incluant les "
207214
"informations de versions)."
208215

209-
#: bugs.rst:77
216+
#: bugs.rst:80
210217
msgid ""
211218
"Each issue report will be reviewed by a developer who will determine what "
212219
"needs to be done to correct the problem. You will receive an update each "
@@ -216,15 +223,15 @@ msgstr ""
216223
"nécessaire d'entreprendre pour corriger le problème. Vous recevrez une "
217224
"notification à chaque action concernant le rapport."
218225

219-
#: bugs.rst:86
226+
#: bugs.rst:89
220227
msgid ""
221228
"`How to Report Bugs Effectively <https://www.chiark.greenend.org.uk/"
222229
"~sgtatham/bugs.html>`_"
223230
msgstr ""
224231
"`Comment signaler des bogues de manière efficace <https://www.chiark."
225232
"greenend.org.uk/~sgtatham/bugs.html>`_ (en anglais)"
226233

227-
#: bugs.rst:85
234+
#: bugs.rst:88
228235
msgid ""
229236
"Article which goes into some detail about how to create a useful bug report. "
230237
"This describes what kind of information is useful and why it is useful."
@@ -233,27 +240,27 @@ msgstr ""
233240
"bogue utile. Il décrit quel genre d'information est utile et pourquoi elle "
234241
"est utile."
235242

236-
#: bugs.rst:89
243+
#: bugs.rst:92
237244
msgid ""
238245
"`Bug Writing Guidelines <https://bugzilla.mozilla.org/page.cgi?id=bug-"
239246
"writing.html>`_"
240247
msgstr ""
241248
"`Guide pour la rédaction de rapports de bogues <https://bugzilla.mozilla.org/"
242249
"page.cgi?id=bug-writing.html>`_"
243250

244-
#: bugs.rst:89
251+
#: bugs.rst:92
245252
msgid ""
246253
"Information about writing a good bug report. Some of this is specific to "
247254
"the Mozilla project, but describes general good practices."
248255
msgstr ""
249256
"Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au "
250257
"projet Mozilla mais présentent des bonnes pratiques générales."
251258

252-
#: bugs.rst:95
259+
#: bugs.rst:98
253260
msgid "Getting started contributing to Python yourself"
254261
msgstr "Commencer à contribuer à Python vous-même"
255262

256-
#: bugs.rst:97
263+
#: bugs.rst:100
257264
msgid ""
258265
"Beyond just reporting bugs that you find, you are also welcome to submit "
259266
"patches to fix them. You can find more information on how to get started "

0 commit comments

Comments
 (0)