Skip to content

Commit a553961

Browse files
Copilotmattwang44
andcommitted
Translate code comments and docstrings, apply review suggestions
Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent 3449ca8 commit a553961

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

tutorial/classes.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -824,20 +824,20 @@ msgid ""
824824
msgstr ""
825825
"class Dog:\n"
826826
"\n"
827-
" kind = 'canine' # class variable shared by all instances\n"
827+
" kind = 'canine' # 所有實例共享的類別變數\n"
828828
"\n"
829829
" def __init__(self, name):\n"
830-
" self.name = name # instance variable unique to each instance\n"
830+
" self.name = name # 每個實例獨有的實例變數\n"
831831
"\n"
832832
">>> d = Dog('Fido')\n"
833833
">>> e = Dog('Buddy')\n"
834-
">>> d.kind # shared by all dogs\n"
834+
">>> d.kind # 所有狗共享\n"
835835
"'canine'\n"
836-
">>> e.kind # shared by all dogs\n"
836+
">>> e.kind # 所有狗共享\n"
837837
"'canine'\n"
838-
">>> d.name # unique to d\n"
838+
">>> d.name # d 獨有\n"
839839
"'Fido'\n"
840-
">>> e.name # unique to e\n"
840+
">>> e.name # e 獨有\n"
841841
"'Buddy'"
842842

843843
#: ../../tutorial/classes.rst:422
@@ -1655,7 +1655,7 @@ msgid ""
16551655
" return self.data[self.index]"
16561656
msgstr ""
16571657
"class Reverse:\n"
1658-
" \"\"\"Iterator for looping over a sequence backwards.\"\"\"\n"
1658+
" \"\"\"用於向後迴圈遍歷序列的迭代器。\"\"\"\n"
16591659
" def __init__(self, data):\n"
16601660
" self.data = data\n"
16611661
" self.index = len(data)\n"

tutorial/controlflow.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ msgid ""
159159
" if status == 'active':\n"
160160
" active_users[user] = status"
161161
msgstr ""
162-
"# Create a sample collection\n"
162+
"# 建立一個範例集合\n"
163163
"users = {'Hans': 'active', 'Éléonore': 'inactive', '景太郎': 'active'}\n"
164164
"\n"
165-
"# Strategy: Iterate over a copy\n"
165+
"# 策略:對副本進行迭代\n"
166166
"for user, status in users.copy().items():\n"
167167
" if status == 'inactive':\n"
168168
" del users[user]\n"
169169
"\n"
170-
"# Strategy: Create a new collection\n"
170+
"# 策略:建立一個新集合\n"
171171
"active_users = {}\n"
172172
"for user, status in users.items():\n"
173173
" if status == 'active':\n"

tutorial/index.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ msgid ""
7777
"Python interpreter handy for hands-on experience, but all examples are self-"
7878
"contained, so the tutorial can be read off-line as well."
7979
msgstr ""
80-
"這份教學將非正式地介紹 Python 語言與系統的基本概念及功能。請注意,它預期你對程式"
80+
"這份教學將非常規地介紹 Python 語言與系統的基本概念及功能。請注意,它預期你對程式"
8181
"設計有基本的了解。實際用 Python 直譯器進行實際操作將有助於學習,但所有範例都是"
8282
"獨立完整的,所以這份教學也可以離線閱讀。"
8383

tutorial/introduction.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ msgid ""
4545
"hovering over or tapping a code example), which strips prompts and omits "
4646
"output, to copy and paste the input lines into your interpreter."
4747
msgstr ""
48-
"你可以使用\"複製\"按鈕(當游標移至程式碼範例上方或點選程式碼範例時,它會出現在右上角),"
48+
"你可以使用 \"Copy\" 按鈕(當游標移至程式碼範例上方或點選程式碼範例時,它會出現在右上角),"
4949
"這會去除提示字元並略過輸出,讓你可以複製貼上輸入行到你的直譯器。"
5050

5151
#: ../../tutorial/introduction.rst:22

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy