Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita8e9d3f

Browse files
authored
Merge branch '3.10' into translate-stdtypes-intro-true-value-test
2 parentsff2e487 +cc6aaec commita8e9d3f

40 files changed

+2611
-2109
lines changed

‎.github/workflows/ci.yml

Lines 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

Lines 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

Lines 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+
# - makeall # 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+
definePRINT_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+
exportPRINT_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
fordirnamein$$(find. -name'*.po'| xargs -n1 dirname| sort -u| grep -v'^\.$$');do mkdir -p$(LC_MESSAGES)/$$dirname;done
3353
forfilein*.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
forfilein*.po*/*.po;doecho$$(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
forfilein*.po*/*.po;doecho$$(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

Lines 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 onTelegram
5+
..image::https://badgen.net/badge/chat/on%20Discord/blue
6+
:target:https://discord.gg/44XheGXhWH
7+
:alt:Join Chat onDiscord
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

‎c-api/apiabiversion.po

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,92 @@
1-
# SOME DESCRIPTIVE TITLE.
21
# Copyright (C) 2001-2022, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
5+
# Liang-Bo Wang <me@liang2.tw>, 2015
6+
# Matt Wang <mattwang44@gmail.com>, 2022
67
msgid ""
78
msgstr ""
89
"Project-Id-Version:Python 3.10\n"
910
"Report-Msgid-Bugs-To:\n"
1011
"POT-Creation-Date:2021-10-26 16:47+0000\n"
11-
"PO-Revision-Date:2015-12-09 17:51+0000\n"
12-
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
12+
"PO-Revision-Date:2022-01-24 22:34+0800\n"
13+
"Last-Translator:Matt Wang <mattwang44@gmail.com>\n"
1314
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1415
"tw)\n"
1516
"Language:zh_TW\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"
1920
"Plural-Forms:nplurals=1; plural=0;\n"
21+
"X-Generator:Poedit 3.0.1\n"
2022

2123
#:../../c-api/apiabiversion.rst:7
2224
msgid"API and ABI Versioning"
23-
msgstr""
25+
msgstr"API 和 ABI 版本管理"
2426

2527
#:../../c-api/apiabiversion.rst:9
2628
msgid""
2729
"CPython exposes its version number in the following macros. Note that these "
2830
"correspond to the version code is **built** with, not necessarily the "
2931
"version used at **run time**."
3032
msgstr""
33+
"CPython 透過以下巨集 (macro) 公開其版本號。請注意,對應到的是\\ **建置 "
34+
"(built)** 所用到的版本,並不一定是\\ **運行時期 (run time)** 所使用的版本。"
3135

3236
#:../../c-api/apiabiversion.rst:13
3337
msgid""
3438
"See :ref:`stable` for a discussion of API and ABI stability across versions."
35-
msgstr""
39+
msgstr"關於跨版本 API 和 ABI 穩定性的討論,請見 :ref:`stable`\\"
3640

3741
#:../../c-api/apiabiversion.rst:17
3842
msgid"The ``3`` in ``3.4.1a2``."
39-
msgstr""
43+
msgstr"在 ``3.4.1a2`` 中的 ``3``\\"
4044

4145
#:../../c-api/apiabiversion.rst:21
4246
msgid"The ``4`` in ``3.4.1a2``."
43-
msgstr""
47+
msgstr"在 ``3.4.1a2`` 中的 ``4``\\"
4448

4549
#:../../c-api/apiabiversion.rst:25
4650
msgid"The ``1`` in ``3.4.1a2``."
47-
msgstr""
51+
msgstr"在 ``3.4.1a2`` 中的 ``1``\\"
4852

4953
#:../../c-api/apiabiversion.rst:29
5054
msgid""
5155
"The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, "
5256
"``0xC`` for release candidate or ``0xF`` for final."
5357
msgstr""
58+
"在 ``3.4.1a2`` 中的 ``a``\\\\ ``0xA`` 代表 alpha 版本、\\ ``0xB`` 代表 "
59+
"beta 版本、\\ ``0xC`` 為發布候選版本、\\ ``0xF`` 則為最終版。"
5460

5561
#:../../c-api/apiabiversion.rst:35
5662
msgid"The ``2`` in ``3.4.1a2``. Zero for final releases."
57-
msgstr""
63+
msgstr"在 ``3.4.1a2`` 中的 ``2``\\ 。零則為最終發布版本。"
5864

5965
#:../../c-api/apiabiversion.rst:39
6066
msgid"The Python version number encoded in a single integer."
61-
msgstr""
67+
msgstr"被編碼為單一整數的 Python 版本號。"
6268

6369
#:../../c-api/apiabiversion.rst:41
6470
msgid""
6571
"The underlying version information can be found by treating it as a 32 bit "
6672
"number in the following manner:"
67-
msgstr""
73+
msgstr"所代表的版本資訊可以用以下規則將其看做是一個 32 位元數字來獲得:"
6874

6975
#:../../c-api/apiabiversion.rst:45
7076
msgid"Bytes"
71-
msgstr""
77+
msgstr"位元組串"
7278

7379
#:../../c-api/apiabiversion.rst:45
7480
msgid"Bits (big endian order)"
75-
msgstr""
81+
msgstr"位元(大端位元組序 (big endian order))"
7682

7783
#:../../c-api/apiabiversion.rst:45
7884
msgid"Meaning"
79-
msgstr""
85+
msgstr"意義"
8086

8187
#:../../c-api/apiabiversion.rst:45
8288
msgid"Value for ``3.4.1a2``"
83-
msgstr""
89+
msgstr"``3.4.1a2`` 中的值"
8490

8591
#:../../c-api/apiabiversion.rst:47
8692
msgid"1"
@@ -163,7 +169,9 @@ msgid ""
163169
"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion "
164170
"``0x030a00f0``."
165171
msgstr""
172+
"因此 ``3.4.1a2`` 代表 hexversion ``0x030401a2``\\\\ ``3.10.0`` 代表 "
173+
"hexversion ``0x030a00f0``\\ 。"
166174

167175
#:../../c-api/apiabiversion.rst:62
168176
msgid"All the given macros are defined in :source:`Include/patchlevel.h`."
169-
msgstr""
177+
msgstr"所有提到的巨集都定義在 :source:`Include/patchlevel.h`\\"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp