Skip to content

Translate library/intro #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 114 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
d14714d
Upgrade to 3.9
adrianliaw Jun 20, 2020
a0da5dd
Update readme python version
adrianliaw Jun 20, 2020
2351675
Translate tutorial/interpreter.po and introduction.po (#67)
StevenHsuYL May 18, 2021
b3b431a
Translate tutorial/datastructures.po (#71)
StevenHsuYL May 24, 2021
1c19512
Translate tutorial/controlflow.po (#70)
StevenHsuYL Jun 2, 2021
804400a
Translate sphinx.po (#75)
StevenHsuYL Jun 2, 2021
a8ba69c
Translate tutorial/classes.po
StevenHsuYL Jun 5, 2021
8a817c1
Continue tutorial/modules.po (#72)
StevenHsuYL Jun 7, 2021
09f8d1c
Translate tutorial/stdlib2.po
StevenHsuYL Jun 8, 2021
02ce49f
Complete stdlib2.po
StevenHsuYL Jun 19, 2021
611b75d
Minor modification (#79)
StevenHsuYL Jun 27, 2021
15b08a0
Translate tutorial/inputoutput.po (#74)
StevenHsuYL Jun 28, 2021
9f81d74
Update fuzzy of tutorial/venv.po (#81)
StevenHsuYL Jun 28, 2021
80393b2
Update copyright.po (#87)
dukecat0 Jun 28, 2021
219aa85
Update tutorial/whatnow.po (#88)
dukecat0 Jun 28, 2021
96798f6
Update copyright.po (#91)
dukecat0 Jun 28, 2021
b565db2
Translate license.po
StevenHsuYL Jul 1, 2021
097c23d
Update license.po
StevenHsuYL Jul 2, 2021
41e5d1f
Translate intalling/index.po
StevenHsuYL Jul 3, 2021
242f116
Update license.po
StevenHsuYL Jul 3, 2021
bac89b9
Update installing/index.
StevenHsuYL Jul 3, 2021
70460bd
Translate distributing/index.po
StevenHsuYL Jul 4, 2021
a71ebd9
Translate tutorial/errors.po (#76)
StevenHsuYL Jul 4, 2021
b7ccbda
Update tutorial/stdlib.po (#78)
StevenHsuYL Jul 5, 2021
40a67b2
Update index pages.
StevenHsuYL Jul 5, 2021
097e0bb
Translate extending/index.po
StevenHsuYL Jul 6, 2021
e417bc2
Update index pages.
StevenHsuYL Jul 6, 2021
d281dec
Merge branch '3.9' of https://github.com/python/python-docs-zh-tw int…
StevenHsuYL Jul 7, 2021
e0ae8ac
Update sphinx.po
StevenHsuYL Jul 7, 2021
9cf98f1
Translate tutorial/interactive.po (#83)
StevenHsuYL Jul 13, 2021
2e27e7b
Translate tutorial/appendix.po (#84)
dukecat0 Jul 13, 2021
30342dd
Update tutorial/stdlib.po (#97)
StevenHsuYL Aug 16, 2021
db26e0c
Merge branch '3.9' of https://github.com/python/python-docs-zh-tw int…
StevenHsuYL Aug 19, 2021
657e006
Update sphinx.po
StevenHsuYL Aug 19, 2021
2097fa6
secrets translation v 1.0 (#66)
bonzoyang Aug 29, 2021
43c68ce
Apply suggestions from code review
StevenHsuYL Sep 4, 2021
90edb0f
Update stdlib2.po
StevenHsuYL Sep 4, 2021
e0d7814
feat: automation with github action (#102)
mattwang44 Sep 7, 2021
d54eaf6
sync with cpython 9ad2184d (#104)
github-actions[bot] Sep 7, 2021
9630419
Revert "sync with cpython 9ad2184d (#104)" (#106)
adrianliaw Sep 7, 2021
7fedc5f
chore: insert `Language` header entry when merging from CPython doc
mattwang44 Sep 8, 2021
a01692d
chore(doc): update the link for current translated doc
mattwang44 Sep 8, 2021
ce5c2eb
chore: send cpython-syncing PR as a draft
mattwang44 Sep 8, 2021
3da23ec
chore: remove reviewer for cpython-syncing PR
mattwang44 Sep 8, 2021
212beef
chore: insert github app token for triggering ci on automation PR
mattwang44 Sep 8, 2021
9c34230
Merge pull request #108 from mattwang44/improve-github-action
mattwang44 Sep 10, 2021
c25c111
sync with cpython 1b02e29f
github-actions[bot] Sep 13, 2021
3eef7db
fix(sphinx): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
24f673b
fix(tutorial/controlflow): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
ed9b230
fix(copyright): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
e8007dc
fix(faq/general): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
dbc1aa7
fix(faq/programming): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
aecf717
fix(howto/descriptor): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
0c84161
fix(library/array): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
93bae2f
fix(c-api/dict): update based on changes from cpython syncing
mattwang44 Sep 10, 2021
841a567
fix(action): allow merging cpython on existing branch
mattwang44 Sep 13, 2021
2d3ada9
Merge pull request #110 from mattwang44/fix/sync-workflow/edit-on-branch
mattwang44 Sep 13, 2021
a9375a1
Translate tutorial/floatingpoint.po (#89)
StevenHsuYL Sep 15, 2021
16f8e71
Translate bugs.po (#93)
StevenHsuYL Sep 15, 2021
518f91a
Merge branch '3.9' into cron/sync/3.9
mattwang44 Sep 15, 2021
ce2b526
sync with cpython 4ce55cce
github-actions[bot] Sep 15, 2021
585450f
sync with cpython 9443ce4e
github-actions[bot] Sep 16, 2021
399996c
fix(tutorial/floatingpoint): update based on changes from cpython syn…
mattwang44 Sep 16, 2021
3a35894
Merge pull request #105 from python/cron/sync/3.9
adrianliaw Sep 17, 2021
e18f68b
Merge branch '3.9' into classes
mattwang44 Sep 17, 2021
4880a17
Merge branch '3.9' into distributing
mattwang44 Sep 17, 2021
e4bee2a
Merge branch '3.9' into index
mattwang44 Sep 17, 2021
bdc86e3
Merge branch '3.9' into installing
mattwang44 Sep 17, 2021
e0bc195
Update classes.po
StevenHsuYL Sep 21, 2021
768a30d
Update classes.po
StevenHsuYL Sep 21, 2021
0acb12f
Update sphinx.po
StevenHsuYL Sep 22, 2021
7679966
Merge pull request #80 from StevenHsuYL/stdlib2
adrianliaw Sep 23, 2021
1323c0c
Merge branch '3.9' of https://github.com/python/python-docs-zh-tw int…
StevenHsuYL Sep 25, 2021
3035926
Merge pull request #77 from StevenHsuYL/classes
adrianliaw Sep 25, 2021
1aa70ac
Update sphinx.po
StevenHsuYL Sep 29, 2021
292ce1e
Update distributing/index.po
StevenHsuYL Oct 1, 2021
69c669d
Update distributing/index.po
StevenHsuYL Oct 2, 2021
bb356f6
Update installing/index.po
StevenHsuYL Oct 2, 2021
1c134bf
Update installing/index.po
StevenHsuYL Oct 3, 2021
6b750f0
Update installing/index.po
StevenHsuYL Oct 3, 2021
4b8215b
Update license.po
StevenHsuYL Oct 3, 2021
c22e614
Update tutorial/appetite.po
StevenHsuYL Oct 3, 2021
62cf869
Update tutorial/modules.po
StevenHsuYL Oct 3, 2021
784b73c
Merge pull request #96 from StevenHsuYL/distributing
mattwang44 Oct 8, 2021
551ff79
Sync with CPython 3.9 (#112)
pydoc-zh-tw[bot] Oct 8, 2021
747337d
Merge branch '3.9' into installing
mattwang44 Oct 8, 2021
2075526
Merge branch '3.9' into index
mattwang44 Oct 8, 2021
6899e33
Merge branch '3.9' into license
mattwang44 Oct 8, 2021
b5e12a0
Translate library/text.po
jordanSu Oct 10, 2021
f5dc070
docs: improve wording and add introduction to pot file
grimmerk Oct 17, 2021
240d202
update library/text.po according to suggestions
jordanSu Oct 17, 2021
ac134e5
Merge pull request #122 from grimmer0125/improve_readme
mattwang44 Oct 17, 2021
9e3ccd8
fix(README): broken anchor due to modified title
mattwang44 Oct 17, 2021
7af1155
Merge pull request #120 from jordanSu/library-text
mattwang44 Oct 17, 2021
142c849
Merge pull request #123 from python/fix/readme-broken-anchor
josix Oct 18, 2021
c6f8ec3
docs: add more detailed introduction to readme
grimmerk Oct 18, 2021
f60a084
Apply suggestions from code review
StevenHsuYL Oct 19, 2021
5373f0b
Apply suggestions from code review
StevenHsuYL Oct 19, 2021
170b522
Apply suggestions from code review
StevenHsuYL Oct 19, 2021
7cfb039
Merge pull request #95 from StevenHsuYL/installing
mattwang44 Oct 19, 2021
b90882d
Merge pull request #99 from StevenHsuYL/index
mattwang44 Oct 19, 2021
a8ffd10
Merge pull request #94 from StevenHsuYL/license
mattwang44 Oct 19, 2021
8d59554
Sync with CPython 3.9 (#121)
pydoc-zh-tw[bot] Oct 19, 2021
1f1fbbc
docs: update the sentences about searching fuzzy entries
grimmerk Oct 21, 2021
1200b89
fix(README): wrong Telegram invitation link
mattwang44 Oct 21, 2021
80e1d32
docs: correct some typo
grimmerk Oct 21, 2021
78ab3d7
docs: add back some heapq translations which were accidentally deleted
grimmerk Oct 21, 2021
da179b8
Update README.rst
grimmerk Oct 21, 2021
52104be
Merge pull request #124 from grimmer0125/organize_readme
josix Oct 21, 2021
532f75e
fix(README): a translation typo
grimmerk Oct 23, 2021
53c6451
Merge pull request #128 from grimmer0125/fix_readme_typo
josix Oct 23, 2021
2d317b2
translate library/intro
eopXD Oct 5, 2018
56636ac
error fix
eopXD Oct 14, 2018
55368bb
chore: update for Python 3.9
mattwang44 Oct 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build

on:
pull_request:
branches:
- "3.7"
- "3.8"
- "3.9"

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Build
run: VERSION=${{ github.event.pull_request.base.ref }} make
26 changes: 26 additions & 0 deletions .github/workflows/deploy-gh-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: deploy-gh-page

on:
push:
branches:
- "3.9"

jobs:
cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Build
run: make

- name: Deploy to gh page
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ../cpython/Doc/build/html
CLEAN: true
64 changes: 64 additions & 0 deletions .github/workflows/py39-sync-cpython.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: python-3.9-sync-with-cpython

on:
push:
branches:
- "3.9"
schedule:
- cron: "0 0 * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
VERSION: "3.9"
BRANCH: "cron/sync/3.9"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.VERSION }}

- name: Get the changes on branch (if exists)
continue-on-error: true
run: |
git fetch origin ${{ env.BRANCH }}:${{ env.BRANCH }}
git reset --hard ${{ env.BRANCH }}

- name: Set env
run: echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Sync with CPython
run: make clone && make merge && make rm_cpython

- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: sync with cpython ${{ env.LATEST_COMMIT_ID }}
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
base: ${{ env.VERSION }}
branch: ${{ env.BRANCH }}
delete-branch: false
title: 'Sync with CPython ${{ env.VERSION }}'
body: |
Sync with CPython ${{ env.VERSION }}
draft: true
labels: |
sync-cpython
automation

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ LC_MESSAGES := $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
VENV := ~/.venvs/python-docs-i18n/
PYTHON := $(shell which python3)
MODE := autobuild-dev-html
BRANCH = $(shell git describe --contains --all HEAD)
BRANCH := $(or $(VERSION), $(shell git describe --contains --all HEAD))
JOBS = 1


.PHONY: all
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb $(SPHINX_CONF)
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone
mkdir -p $(LC_MESSAGES)
for dirname in $$(find . -name '*.po' | xargs -n1 dirname | sort -u | grep -v '^\.$$'); do mkdir -p $(LC_MESSAGES)/$$dirname; done
for file in *.po */*.po; do ln -f $$file $(LC_MESSAGES)/$$file; done
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE)


$(SPHINX_CONF):
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE)
clone:
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE) || echo "cpython exists"
cd $(CPYTHON_CLONE) && git checkout $(BRANCH)


Expand Down Expand Up @@ -84,11 +84,11 @@ endif
if [ -f "$$PO" ];\
then\
case "$$POT" in\
*whatsnew*) msgmerge --backup=off --force-po --no-fuzzy-matching -U "$$PO" "$$POT" ;;\
*) msgmerge --backup=off --force-po -U "$$PO" "$$POT" ;;\
*whatsnew*) msgmerge --lang=$(LANGUAGE) --backup=off --force-po --no-fuzzy-matching -U "$$PO" "$$POT" ;;\
*) msgmerge --lang=$(LANGUAGE) --backup=off --force-po -U "$$PO" "$$POT" ;;\
esac\
else\
msgcat -o "$$PO" "$$POT";\
msgcat --lang=$(LANGUAGE) -o "$$PO" "$$POT";\
fi\
done

Expand All @@ -104,3 +104,7 @@ update_txconfig:
.PHONY: fuzzy
fuzzy:
for file in *.po */*.po; do echo $$(msgattrib --only-fuzzy --no-obsolete "$$file" | grep -c '#, fuzzy') $$file; done | grep -v ^0 | sort -gr

.PHONY: rm_cpython
rm_cpython:
rm -rf $(CPYTHON_CLONE)
92 changes: 51 additions & 41 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Python 官方說明文件臺灣繁體中文翻譯計畫
:target: https://t.me/PyDocTW
:alt: Join Chat on Telegram

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

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

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

想問問題、認識翻譯同好,歡迎加入 Telegram 聊天室 `t.me/PyDocTW`_

Expand Down Expand Up @@ -61,19 +61,26 @@ the PSF for inclusion in the documentation.
您在對 PSF 送出說明文件貢獻的同時,即表示同意上述的協議。


參加翻譯
參與翻譯
========

如何參加翻譯
關於 po (Portable Object) 檔
-----------------------------

此為所需翻譯的文字檔,副檔名為 ``.po``,不同語系就會有一個 po 檔。主要內容為翻譯的參考原始字串 (*msgid*),\
及需要填入的翻譯字串 (*msgstr*)。有時你會看到 ``#, fuzzy`` 的註記,它代表此翻譯字串需要校閱。

翻譯流程
------------

**事先需要有:**
事先需要有
~~~~~~~~~~

- 一個 `GitHub 帳號 <https://github.com/join>`_
- `安裝好 git <https://help.github.com/articles/set-up-git/>`_\ (Windows
上請參考 https://gitforwindows.org/)
- 一個 ``.po`` 檔的編輯器,如果還沒有的話請使用 `poedit <https://poedit.net>`_
- MacOS 的使用者還需要先利用 `homebrew <https://brew.sh/index_zh-tw>`_ 安裝 gettext ,屆時 Sphinx 會使用到。
- 一個 ``.po`` 檔的編輯器。推薦使用 `Poedit <https://poedit.net>`_,若熟悉 po 檔用一般文字編輯器亦可。
- macOS 的使用者還需要先利用 `homebrew <https://brew.sh/index_zh-tw>`_ 安裝 gettext,屆時 Sphinx 會使用到。
.. code-block:: bash

brew install gettext
Expand All @@ -84,7 +91,10 @@ the PSF for inclusion in the documentation.
按鈕),這樣會把整個專案複製一份到你的 GitHub 帳號底下,你可以對這個 fork
進行修改。

在\ **第一次貢獻以前**\ (還沒有 clone 過),請在 terminal 裡依照以下步驟:
第一次貢獻以前(還沒有 clone 過)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

請在 terminal 裡依照以下步驟:

.. code-block:: bash

Expand All @@ -97,7 +107,10 @@ the PSF for inclusion in the documentation.
# 將 python/python-docs-zh-tw 設為 upstream remote
git remote add upstream https://github.com/python/python-docs-zh-tw.git

在\ **每一次翻譯時**\ 請遵照以下步驟(`GitHub Flow`_):
每一次翻譯時
~~~~~~~~~~~~

請遵照以下步驟(`GitHub Flow`_):

.. _GitHub Flow: https://guides.github.com/introduction/flow/

Expand All @@ -106,27 +119,30 @@ the PSF for inclusion in the documentation.

接著在 terminal 裡按照以下步驟:

1. 基於最新版本的 ``upstream/3.7`` 開啟一個 branch,現在假設我們想要翻譯 Glossary
1. 基於最新版本的 ``upstream/3.9`` 開啟一個 branch,現在假設我們想要翻譯 Glossary \
所以把這個 branch 叫做 ``glossary`` ::

git fetch upstream
git checkout -b glossary upstream/3.7
git checkout -b glossary upstream/3.9

2. 接著就可以開始翻譯,你可以使用 Poedit 應用程式將檔案打開,或是用以下指令\
翻譯不同檔案時將 glossary 換成別的檔名) ::
2. 接著就可以開始翻譯(翻譯時可參考`翻譯守則`_),你可以手動開啟 Poedit 應用程式再選檔案或用以下指令請 Poedit 將檔案\
打開,翻譯不同檔案時將 glossary 換成別的檔名) ::

poedit glossary.po

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

make

這個過程中 Sphinx 會幫你檢查 rST 語法錯誤,我們盡量保持沒有 warning
如果你還沒有執行 `維護、預覽`_ 的 clone CPython 的動作,此指令會自動幫你 clone CPython,\
並且會使用 Sphinx 幫你檢查 rST 語法錯誤,我們盡量保持沒有 warning \
的狀態,因此如果有出現 warning 的話請修復它。另外也記得檢查是否符合\
`翻譯守則`_

4. 在瀏覽器中打開編譯出來的文件以確認整份文件的語意通暢\
(翻譯別的檔案時將 glossary 換成別的檔名) ::
4. 輸出的文件會被放置在您的本地端 CPython clone(見 `維護、預覽`_ 段落的圖示)\
底下的 ``Doc/build/html``,切換到該目錄再使用 ``python3 -m http.server`` \
或類似的靜態網頁伺服器即可以預覽成果。你可以執行下列指令請瀏覽器打開編譯出來的文件\
以確認整份文件的語意通暢(翻譯別的檔案時將 glossary 換成別的檔名) ::

open ../cpython/Doc/build/html/glossary.html

Expand Down Expand Up @@ -159,14 +175,16 @@ the PSF for inclusion in the documentation.

- 從 upstream(我們的主要 GitHub repo)做 fetch 的動作
- 對 origin(你的 fork)做 push
- 永遠不對 ``3.7`` branch 進行修改,請保持讓這個 branch 唯讀,可以避免\
- 永遠不對 ``3.9`` branch 進行修改,請保持讓這個 branch 唯讀,可以避免\
掉很多問題。

要翻譯哪些東西
--------------

最簡單的貢獻方式就是更新 *fuzzy entries*,讓翻譯的內容保持與最新版本的文件\
同步。請參考 `尋找 fuzzy entries`_ 段落。
主要是填入翻譯字串 (*msgid*) 以及更新有標記為 ``#, fuzzy`` 的字串。

其中最簡單的貢獻方式就是更新 *fuzzy entries*,讓曾經翻譯的內容保持與最新版本的文件\
同步。請參考 `尋找有翻譯過但需校閱的 fuzzy entries`_ 段落。

此外,當前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
po 檔皆為首要的翻譯對象。您也可以幫忙校對已經翻譯過的內容。
Expand Down Expand Up @@ -344,7 +362,7 @@ type 型別
幫助,則可以使用 Telegram_。

.. _Issue: https://github.com/python-doc-tw/python-docs-zh-tw/issues
.. _Telegram: https://t.me/PyDocT
.. _Telegram: https://t.me/PyDocTW

另外,此翻譯的 coordinator 為 `adrianliaw <https://github.com/adrianliaw>`_,\
您也可以透過此 email 聯繫:``adrianliaw2000 at gmail dot com``。
Expand Down Expand Up @@ -382,36 +400,28 @@ type 型別
這樣可以避免下載完整的 commit 歷史(對輸出文件沒什麼幫助),但仍然能把所有的
branch clone 下來。

與 CPython 同步最新的 pot 檔
----------------------------
與 CPython 同步最新的 pot 檔 (目前由 GitHub Actions 定時代為執行)
----------------------------------------------------------

pot 檔為翻譯的樣板檔案,它包含需要翻譯的原始字串 (*msgid*) 跟其對應的空白翻譯字串 (*msgstr*),\
此步驟會參考最新的 CPython 中的 pot 檔來更新 po 檔。如果是之前在 po 檔中已填入過翻譯字串但參考的 \
pot 檔的 ``msgid`` 已有變動,則此指令會自動加上 ``#, fuzzy`` 的標記,代表內容有些許差異需要更新。

.. code-block:: bash

$ make merge

尋找 fuzzy entries
------------------
尋找有翻譯過但需校閱的 fuzzy entries
---------------------------------

*Fuzzy entries* 係指更新 po 檔的原始字串(*msgid*)以後,大部分內容相同但有\
些許差異的字串,即表示該字串的翻譯需要更新。在 po 檔中,您會看到 ``#, fuzzy``
的字樣,這就表示了接下來的字串是 fuzzy entry,需要更新翻譯
在 po 檔中,您會看到 ``#, fuzzy`` 的字樣,這就表示了接下來的字串是 fuzzy entry,需要更新翻譯。\
您可以自行用習慣的文字編輯器、Linux 指令搜尋有包含此字樣的檔案,但請記得 ``#, fuzzy`` 標記的翻譯字串\
有可能是尚未翻譯過的空白字串 (*msgstr*)。執行下列指令會列出有 *Fuzzy entries* 的檔案且會排除這個情形

.. code-block:: bash

$ make fuzzy

本地端編譯輸出文件
------------------

輸出的文件會被放置在您的本地端 CPython clone(見 `維護、預覽`_ 段落的圖示)\
底下的 ``Doc/build/html``,切換到該目錄再使用 ``python3 -m http.server``
或類似的靜態網頁伺服器即可以預覽成果。編譯程序則使用:

.. code-block:: bash

$ make


Project History
===============

Expand Down
Loading