Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac0a9a7

Browse filesBrowse files
authored
Merge branch '3.10' into feat/trans-library-pdb
2 parents b52a345 + a31c167 commit ac0a9a7
Copy full SHA for ac0a9a7

File tree

185 files changed

+15940
-15006
lines changed
Filter options

Some content is hidden

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

185 files changed

+15940
-15006
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: sudo apt-get install gettext
1919

2020
- name: Validate
21-
run: VERSION=${{ github.event.pull_request.base.ref }} MODE=dummy make
21+
run: VERSION=${{ github.event.pull_request.base.ref }} MODE=dummy make all

‎.github/workflows/deploy-gh-page.yml

Copy file name to clipboardExpand all lines: .github/workflows/deploy-gh-page.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run: sudo apt-get install gettext
1616

1717
- name: Build
18-
run: make
18+
run: make all
1919

2020
- name: Deploy to gh page
2121
uses: JamesIves/github-pages-deploy-action@3.7.1

‎Makefile

Copy file name to clipboardExpand all lines: Makefile
+32-10Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Here is what you can do:
44
#
5-
# - make # Automatically build an html local version
5+
# - make all # Automatically build an html local version
66
# - make todo # To list remaining tasks
77
# - make merge # To merge pot from upstream
88
# - make fuzzy # To find fuzzy strings
@@ -15,6 +15,27 @@
1515
#
1616
# Credits: Python Documentation French Translation Team (https://github.com/python/python-docs-fr)
1717

18+
.DEFAULT_GOAL := help # Sets default action to be help
19+
20+
define PRINT_HELP_PYSCRIPT # start of Python section
21+
import re, sys
22+
23+
output = []
24+
# Loop through the lines in this file
25+
for line in sys.stdin:
26+
# if the line has a command and a comment start with
27+
# two pound signs, add it to the output
28+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
29+
if match:
30+
target, help = match.groups()
31+
output.append("%-10s %s" % (target, help))
32+
# Sort the output in alphanumeric order
33+
output.sort()
34+
# Print the help result
35+
print('\n'.join(output))
36+
endef
37+
export PRINT_HELP_PYSCRIPT # End of python section
38+
1839
CPYTHON_CLONE := ../cpython/
1940
SPHINX_CONF := $(CPYTHON_CLONE)/Doc/conf.py
2041
LANGUAGE := zh_TW
@@ -25,16 +46,17 @@ MODE := autobuild-dev-html
2546
BRANCH := $(or $(VERSION), $(shell git describe --contains --all HEAD))
2647
JOBS := 4
2748

28-
2949
.PHONY: all
30-
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone
50+
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone ## Automatically build an html local version
3151
mkdir -p $(LC_MESSAGES)
3252
for dirname in $$(find . -name '*.po' | xargs -n1 dirname | sort -u | grep -v '^\.$$'); do mkdir -p $(LC_MESSAGES)/$$dirname; done
3353
for file in *.po */*.po; do ln -f $$file $(LC_MESSAGES)/$$file; done
3454
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE)
3555

56+
help:
57+
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
3658

37-
clone:
59+
clone: ## Clone latest cpython repository to `../cpython/` if it doesn't exist
3860
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE) || echo "cpython exists"
3961
cd $(CPYTHON_CLONE) && git checkout $(BRANCH)
4062

@@ -53,24 +75,24 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate
5375

5476

5577
.PHONY: upgrade_venv
56-
upgrade_venv: $(VENV)/bin/activate
78+
upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc
5779
. $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb
5880

5981

6082
.PHONY: progress
61-
progress:
83+
progress: ## Compute current progression
6284
@python3 -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \
6385
$(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \
6486
$(shell msgcat *.po */*.po | grep -c '^msgid')
6587

6688

6789
.PHONY: todo
68-
todo:
90+
todo: ## List remaining tasks
6991
for file in *.po */*.po; do echo $$(msgattrib --untranslated $$file | grep ^msgid | sed 1d | wc -l ) $$file; done | grep -v ^0 | sort -gr
7092

7193

7294
.PHONY: merge
73-
merge: upgrade_venv
95+
merge: upgrade_venv ## To merge pot from upstream
7496
ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
7597
$(error "You're merging from a different branch")
7698
endif
@@ -102,9 +124,9 @@ update_txconfig:
102124

103125

104126
.PHONY: fuzzy
105-
fuzzy:
127+
fuzzy: ## Find fuzzy strings
106128
for file in *.po */*.po; do echo $$(msgattrib --only-fuzzy --no-obsolete "$$file" | grep -c '#, fuzzy') $$file; done | grep -v ^0 | sort -gr
107129

108130
.PHONY: rm_cpython
109-
rm_cpython:
131+
rm_cpython: ## Remove cloned cpython repo
110132
rm -rf $(CPYTHON_CLONE)

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
Python 官方說明文件臺灣繁體中文翻譯計畫
33
=======================================
44

5-
.. image:: https://badgen.now.sh/badge/chat/on%20Telegram/blue
6-
:target: https://t.me/PyDocTW
7-
:alt: Join Chat on Telegram
5+
.. image:: https://badgen.net/badge/chat/on%20Discord/blue
6+
:target: https://discord.gg/44XheGXhWH
7+
:alt: Join Chat on Discord
88

99
這是 Python 3.10 官方說明文件的臺灣繁體中文(zh_TW)翻譯。
1010

1111
翻譯之前,請務必詳讀並同意\ `授權與 License`_。參與方式請參考\ `參與翻譯`_。
1212

1313
你可以在 https://python.github.io/python-docs-zh-tw/ 瀏覽目前翻譯的成果。
1414

15-
想問問題、認識翻譯同好,歡迎加入 Telegram 聊天室 `t.me/PyDocTW`_
15+
想問問題、認識翻譯同好,歡迎加入 Discord 頻道 `discord.gg/44XheGXhWH`_
1616

17-
.. _t.me/PyDocTW: https://t.me/PyDocTW
17+
.. _discord.gg/44XheGXhWH: https://discord.gg/44XheGXhWH
1818

1919
.. contents:: **目錄 Table of Contents**
2020

@@ -132,7 +132,7 @@ the PSF for inclusion in the documentation.
132132

133133
3. 存檔以後,執行以下列指令編譯輸出文件,以確保你的修改沒有 rST 的語法錯誤或警告 ::
134134

135-
make
135+
make all
136136

137137
如果你還沒有執行 `維護、預覽`_ 的 clone CPython 的動作,此指令會自動幫你 clone CPython,\
138138
並且會使用 Sphinx 幫你檢查 rST 語法錯誤,我們盡量保持沒有 warning \
@@ -326,10 +326,10 @@ Sprint中共同討論是否合併進術語列表。
326326
==============
327327

328328
如果有需要共同討論的問題,請開設一個新的 Issue_。如果是翻譯上遇到困難需要\
329-
幫助,則可以使用 Telegram_
329+
幫助,則可以使用 Discord_
330330

331331
.. _Issue: https://github.com/python/python-docs-zh-tw/issues
332-
.. _Telegram: https://t.me/PyDocTW
332+
.. _Discord: https://discord.gg/44XheGXhWH
333333

334334
另外,此翻譯的 coordinator 為 `mattwang44 <https://github.com/mattwang44>`_ 和 \
335335
`josix <https://github.com/josix>`_,你也可以分別透過以下 email 聯繫:\
@@ -339,7 +339,7 @@ Sprint中共同討論是否合併進術語列表。
339339
額外翻譯資源
340340
============
341341

342-
- Telegram group `t.me/PyDocTW`_
342+
- Discord channel `discord.gg/44XheGXhWH`_
343343
- `Doc-SIG mailing list <https://mail.python.org/mailman/listinfo/doc-sig>`_
344344
- `PEP 545 <https://www.python.org/dev/peps/pep-0545/>`_
345345
- `zh_CN Translation of the Python Documentation

‎about.po

Copy file name to clipboardExpand all lines: about.po
+11-10Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ msgid ""
1414
msgstr ""
1515
"Project-Id-Version: Python 3.10\n"
1616
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
18-
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
17+
"POT-Creation-Date: 2022-05-21 17:35+0000\n"
18+
"PO-Revision-Date: 2022-05-12 00:11+0800\n"
1919
"Last-Translator: hsiao yi <hsiaoyi0504@gmail.com>\n"
2020
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
2121
"tw)\n"
@@ -24,6 +24,7 @@ msgstr ""
2424
"Content-Type: text/plain; charset=UTF-8\n"
2525
"Content-Transfer-Encoding: 8bit\n"
2626
"Plural-Forms: nplurals=1; plural=0;\n"
27+
"X-Generator: Poedit 3.0.1\n"
2728

2829
#: ../../about.rst:3
2930
msgid "About these documents"
@@ -57,7 +58,7 @@ msgid ""
5758
"Fred L. Drake, Jr., the creator of the original Python documentation toolset "
5859
"and writer of much of the content;"
5960
msgstr ""
60-
"Fred L. Drake, Jr.,原始 Python 文件工具集的創造者以及一大部份內容的作者"
61+
"Fred L. Drake, Jr.,原始 Python 文件工具集的創造者以及一大部份內容的作者"
6162

6263
#: ../../about.rst:24
6364
msgid ""
@@ -69,17 +70,17 @@ msgstr ""
6970

7071
#: ../../about.rst:26
7172
msgid ""
72-
"Fredrik Lundh for his `Alternative Python Reference <http://effbot.org/zone/"
73-
"pyref.htm>`_ project from which Sphinx got many good ideas."
73+
"Fredrik Lundh for his Alternative Python Reference project from which Sphinx "
74+
"got many good ideas."
7475
msgstr ""
75-
"Fredrik Lundh 先生,Sphinx 從他的 `Alternative Python Reference <http://"
76-
"effbot.org/zone/pyref.htm>`_ 計劃中獲得許多的好主意。"
76+
"Fredrik Lundh 先生,Sphinx 從他的 Alternative Python Reference 計劃中獲得許多"
77+
"的好主意。"
7778

78-
#: ../../about.rst:32
79+
#: ../../about.rst:31
7980
msgid "Contributors to the Python Documentation"
8081
msgstr "Python 文件的貢獻者們"
8182

82-
#: ../../about.rst:34
83+
#: ../../about.rst:33
8384
msgid ""
8485
"Many people have contributed to the Python language, the Python standard "
8586
"library, and the Python documentation. See :source:`Misc/ACKS` in the "
@@ -88,7 +89,7 @@ msgstr ""
8889
"許多人都曾為 Python 這門語言、Python 標準函式庫和 Python 說明文件貢獻過。"
8990
"Python 所發佈的原始碼中含有部份貢獻者的清單,請見 :source:`Misc/ACKS` 。"
9091

91-
#: ../../about.rst:38
92+
#: ../../about.rst:37
9293
msgid ""
9394
"It is only with the input and contributions of the Python community that "
9495
"Python has such wonderful documentation -- Thank You!"

‎bugs.po

Copy file name to clipboardExpand all lines: bugs.po
+30-18Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.10\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
17-
"PO-Revision-Date: 2021-09-05 00:55+0800\n"
16+
"POT-Creation-Date: 2022-04-17 00:15+0000\n"
17+
"PO-Revision-Date: 2022-04-21 17:54+0800\n"
1818
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1919
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
2020
"tw)\n"
@@ -23,7 +23,7 @@ msgstr ""
2323
"Content-Type: text/plain; charset=UTF-8\n"
2424
"Content-Transfer-Encoding: 8bit\n"
2525
"Plural-Forms: nplurals=1; plural=0;\n"
26-
"X-Generator: Poedit 2.4.3\n"
26+
"X-Generator: Poedit 3.0.1\n"
2727

2828
#: ../../bugs.rst:5
2929
msgid "Dealing with Bugs"
@@ -93,7 +93,7 @@ msgid ""
9393
"Overview of the process involved in reporting an improvement on the tracker."
9494
msgstr "在追蹤系統上回報改進建議的過程簡介。"
9595

96-
#: ../../bugs.rst:35
96+
#: ../../bugs.rst:36
9797
msgid ""
9898
"`Helping with Documentation <https://devguide.python.org/docquality/#helping-"
9999
"with-documentation>`_"
@@ -107,11 +107,23 @@ msgid ""
107107
"Python documentation."
108108
msgstr "給有意成為 Python 說明文件貢獻者的綜合指南。"
109109

110-
#: ../../bugs.rst:41
110+
#: ../../bugs.rst:38
111+
msgid ""
112+
"`Documentation Translations <https://devguide.python.org/documenting/"
113+
"#translating>`_"
114+
msgstr "`文件翻譯 <https://devguide.python.org/documenting/#translating>`_"
115+
116+
#: ../../bugs.rst:39
117+
msgid ""
118+
"A list of GitHub pages for documentation translation and their primary "
119+
"contacts."
120+
msgstr ""
121+
122+
#: ../../bugs.rst:45
111123
msgid "Using the Python issue tracker"
112124
msgstr "使用 Python 問題追蹤系統"
113125

114-
#: ../../bugs.rst:43
126+
#: ../../bugs.rst:47
115127
msgid ""
116128
"Bug reports for Python itself should be submitted via the Python Bug Tracker "
117129
"(https://bugs.python.org/). The bug tracker offers a web form which allows "
@@ -121,7 +133,7 @@ msgstr ""
121133
"python.org/) 提交。這個錯誤追蹤系統提供了一個網頁表單,可以輸入並提交相關資訊"
122134
"給開發者。"
123135

124-
#: ../../bugs.rst:47
136+
#: ../../bugs.rst:51
125137
msgid ""
126138
"The first step in filing a report is to determine whether the problem has "
127139
"already been reported. The advantage in doing so, aside from saving the "
@@ -137,7 +149,7 @@ msgstr ""
137149
"迎您提供資訊!)。要確認是否重複回報,請使用頁面頂端的搜尋框來搜尋錯誤資料"
138150
"庫。"
139151

140-
#: ../../bugs.rst:54
152+
#: ../../bugs.rst:58
141153
msgid ""
142154
"If the problem you're reporting is not already in the bug tracker, go back "
143155
"to the Python Bug Tracker and log in. If you don't already have a tracker "
@@ -149,15 +161,15 @@ msgstr ""
149161
"統。如果您還沒有系統的帳號,請點選「註冊 (Register)」,如果您有 OpenID,也可"
150162
"以在側邊欄中點選其中一個 OpenID 的提供者圖示。您無法以匿名方式提交錯誤報告。"
151163

152-
#: ../../bugs.rst:59
164+
#: ../../bugs.rst:63
153165
msgid ""
154166
"Being now logged in, you can submit a bug. Select the \"Create New\" link "
155167
"in the sidebar to open the bug reporting form."
156168
msgstr ""
157169
"如果已經登入,那您就可以提交一個錯誤。請點選側邊欄中的「新建 (Create New)」連"
158170
"結,開啟錯誤回報表單。"
159171

160-
#: ../../bugs.rst:62
172+
#: ../../bugs.rst:66
161173
msgid ""
162174
"The submission form has a number of fields. For the \"Title\" field, enter "
163175
"a *very* short description of the problem; less than ten words is good. In "
@@ -169,7 +181,7 @@ msgstr ""
169181
"型 (Type)」欄位,選擇您的問題類型;也要選擇與錯誤相關的「Component(組件)」"
170182
"和「Versions(版本)」。"
171183

172-
#: ../../bugs.rst:67
184+
#: ../../bugs.rst:71
173185
msgid ""
174186
"In the \"Comment\" field, describe the problem in detail, including what you "
175187
"expected to happen and what did happen. Be sure to include whether any "
@@ -180,7 +192,7 @@ msgstr ""
180192
"情況。請確定說明中包含了涉及到的任何擴充模組,以及您當時所使用的硬體和軟體平"
181193
"台(視情況而定,可以附上版本資訊)。"
182194

183-
#: ../../bugs.rst:72
195+
#: ../../bugs.rst:76
184196
msgid ""
185197
"Each bug report will be assigned to a developer who will determine what "
186198
"needs to be done to correct the problem. You will receive an update each "
@@ -189,42 +201,42 @@ msgstr ""
189201
"每一份錯誤報告會被分派給一位開發者,並由他決定要做出什麼變更來修正這個問題。"
190202
"每當該錯誤有修正動作時,您會收到更新回報。"
191203

192-
#: ../../bugs.rst:81
204+
#: ../../bugs.rst:85
193205
msgid ""
194206
"`How to Report Bugs Effectively <https://www.chiark.greenend.org.uk/"
195207
"~sgtatham/bugs.html>`_"
196208
msgstr ""
197209
"`如何有效地回報錯誤 <https://www.chiark.greenend.org.uk/~sgtatham/bugs."
198210
"html>`_"
199211

200-
#: ../../bugs.rst:80
212+
#: ../../bugs.rst:84
201213
msgid ""
202214
"Article which goes into some detail about how to create a useful bug report. "
203215
"This describes what kind of information is useful and why it is useful."
204216
msgstr ""
205217
"這篇文章詳細說明如何建立一份有用的錯誤報告。它描述了什麼樣的資訊是有用的,以"
206218
"及這些資訊為什麼有用。"
207219

208-
#: ../../bugs.rst:84
220+
#: ../../bugs.rst:88
209221
msgid ""
210222
"`Bug Writing Guidelines <https://bugzilla.mozilla.org/page.cgi?id=bug-"
211223
"writing.html>`_"
212224
msgstr ""
213225
"`錯誤撰寫指南 <https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html>`_"
214226

215-
#: ../../bugs.rst:84
227+
#: ../../bugs.rst:88
216228
msgid ""
217229
"Information about writing a good bug report. Some of this is specific to "
218230
"the Mozilla project, but describes general good practices."
219231
msgstr ""
220232
"撰寫一份優良錯誤報告的相關資訊。部分的文章內容是針對 Mozilla 專案,但它也描述"
221233
"了通用的好習慣。"
222234

223-
#: ../../bugs.rst:90
235+
#: ../../bugs.rst:94
224236
msgid "Getting started contributing to Python yourself"
225237
msgstr "開始讓自己貢獻 Python"
226238

227-
#: ../../bugs.rst:92
239+
#: ../../bugs.rst:96
228240
msgid ""
229241
"Beyond just reporting bugs that you find, you are also welcome to submit "
230242
"patches to fix them. You can find more information on how to get started "

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.