Skip to content

Commit 73c5cfc

Browse files
Copilotmattwang44
andcommitted
Apply all review suggestions and fix msgid translations
Co-authored-by: mattwang44 <[email protected]>
1 parent 06b87f4 commit 73c5cfc

File tree

7 files changed

+28
-35
lines changed

7 files changed

+28
-35
lines changed

tutorial/classes.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ msgid ""
13971397
" for item in iterable:\n"
13981398
" self.items_list.append(item)\n"
13991399
"\n"
1400-
" __update = update # 原始 update() 方法的私有副本\n"
1400+
" __update = update # private copy of original update() method\n"
14011401
"\n"
14021402
"class MappingSubclass(Mapping):\n"
14031403
"\n"

tutorial/controlflow.po

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ msgid ""
11321132
"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]"
11331133
msgstr ""
11341134
">>> def fib2(n): # 回傳到 n 為止的費氏數列\n"
1135-
"... \"\"\"回傳包含到 n 為止的費氏數列的列表\"\"\"\n"
1135+
"... \"\"\"回傳包含到 n 為止的費氏數列的串列\"\"\"\n"
11361136
"... result = []\n"
11371137
"... a, b = 0, 1\n"
11381138
"... while a < n:\n"
@@ -1399,15 +1399,12 @@ msgid ""
13991399
"parrot('a thousand', state='pushing up the daisies') # 1 positional, 1 "
14001400
"keyword"
14011401
msgstr ""
1402-
"parrot(1000) # 1 positional "
1403-
"argument\n"
1404-
"parrot(voltage=1000) # 1 個關鍵字引數\n"
1405-
"parrot(voltage=1000000, action='VOOOOOM') # 2 個關鍵字引數\n"
1406-
"parrot(action='VOOOOOM', voltage=1000000) # 2 個關鍵字引數\n"
1407-
"parrot('a million', 'bereft of life', 'jump') # 3 positional "
1408-
"arguments\n"
1409-
"parrot('a thousand', state='pushing up the daisies') # 1 positional, 1 "
1410-
"keyword"
1402+
"parrot(1000) # 1 個位置引數
1403+
parrot(voltage=1000) # 1 個關鍵字引數
1404+
parrot(voltage=1000000, action='VOOOOOM') # 2 個關鍵字引數
1405+
parrot(action='VOOOOOM', voltage=1000000) # 2 個關鍵字引數
1406+
parrot('a million', 'bereft of life', 'jump') # 3 個位置引數
1407+
parrot('a thousand', state='pushing up the daisies') # 1 個位置引數、1 個關鍵字引數"
14111408

14121409
#: ../../tutorial/controlflow.rst:677
14131410
msgid "but all the following calls would be invalid::"
@@ -1422,8 +1419,7 @@ msgid ""
14221419
"parrot(actor='John Cleese') # unknown keyword argument"
14231420
msgstr ""
14241421
"parrot() # 缺少必要引數\n"
1425-
"parrot(voltage=5.0, 'dead') # non-keyword argument after a keyword "
1426-
"argument\n"
1422+
"parrot(voltage=5.0, 'dead') # 關鍵字引數後面的非關鍵字引數\n"
14271423
"parrot(110, voltage=220) # 同一個引數有重複值\n"
14281424
"parrot(actor='John Cleese') # 未知的關鍵字引數"
14291425

@@ -1992,8 +1988,7 @@ msgstr ""
19921988
">>> list(range(3, 6)) # 使用分離引數的一般呼叫\n"
19931989
"[3, 4, 5]\n"
19941990
">>> args = [3, 6]\n"
1995-
">>> list(range(*args)) # call with arguments unpacked from a "
1996-
"list\n"
1991+
">>> list(range(*args)) # 以從串列解包而得的引數呼叫\n"
19971992
"[3, 4, 5]"
19981993

19991994
#: ../../tutorial/controlflow.rst:965

tutorial/datastructures.po

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,10 @@ msgid ""
458458
"[1, 2, 3, 4, 5, 6, 7, 8, 9]"
459459
msgstr ""
460460
">>> vec = [-4, -2, 0, 2, 4]\n"
461-
">>> # 建立一個值加倍的新列表\n"
461+
">>> # 建立一個值加倍的新串列\n"
462462
">>> [x*2 for x in vec]\n"
463463
"[-8, -4, 0, 4, 8]\n"
464-
">>> # 過濾列表以排除負數\n"
464+
">>> # 過濾串列以排除負數\n"
465465
">>> [x for x in vec if x >= 0]\n"
466466
"[0, 2, 4]\n"
467467
">>> # 對所有元素套用函式\n"
@@ -471,7 +471,7 @@ msgstr ""
471471
">>> freshfruit = [' banana', ' loganberry ', 'passion fruit ']\n"
472472
">>> [weapon.strip() for weapon in freshfruit]\n"
473473
"['banana', 'loganberry', 'passion fruit']\n"
474-
">>> # 建立像 (數字, 平方) 的 2-元組列表\n"
474+
">>> # 建立像 (數字, 平方) 的 2-元組串列\n"
475475
">>> [(x, x**2) for x in range(6)]\n"
476476
"[(0, 0), (1, 1), (2, 4), (3, 9), (4, 16), (5, 25)]\n"
477477
">>> # 元組必須加上括號,否則會產生錯誤\n"
@@ -884,8 +884,7 @@ msgid ""
884884
"{'r', 'd', 'b', 'm', 'z', 'l'}"
885885
msgstr ""
886886
">>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}\n"
887-
">>> print(basket) # show that duplicates have been "
888-
"removed\n"
887+
">>> print(basket) # 確認重複值已被移除\n"
889888
"{'orange', 'banana', 'pear', 'apple'}\n"
890889
">>> 'orange' in basket # 快速成員測試\n"
891890
"True\n"

tutorial/floatingpoint.po

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,16 +506,15 @@ msgstr ""
506506
"8.042173697819788e-13\n"
507507
">>> math.fsum(arr) # 單次四捨五入\n"
508508
"8.042173697819788e-13\n"
509-
">>> sum(arr) # Multiple roundings in extended "
510-
"precision\n"
509+
">>> sum(arr) # 在擴展精度中進行多次捨入\n"
511510
"8.042178034628478e-13\n"
512511
">>> total = 0.0\n"
513512
">>> for x in arr:\n"
514-
"... total += x # Multiple roundings in standard "
515-
"precision\n"
513+
"... total += x # 在標準精度中進行多次捨入 "
514+
"\n"
516515
"...\n"
517-
">>> total # Straight addition has no correct "
518-
"digits!\n"
516+
">>> total # 直接相加沒有正確的數字 "
517+
"\n"
519518
"-0.0051575902860057365"
520519

521520
#: ../../tutorial/floatingpoint.rst:260

tutorial/introduction.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ msgstr ""
336336

337337
#: ../../tutorial/introduction.rst:161
338338
msgid ""
339-
">>> 'doesn\\'t' # use \\' to escape the single quote...\n"
339+
">>> 'doesn\\'t' # \\' 來跳脫單引號...\n"
340340
"\"doesn't\"\n"
341341
">>> \"doesn't\" # ...or use double quotes instead\n"
342342
"\"doesn't\"\n"
@@ -347,7 +347,7 @@ msgid ""
347347
">>> '\"Isn\\'t,\" they said.'\n"
348348
"'\"Isn\\'t,\" they said.'"
349349
msgstr ""
350-
">>> 'doesn\\'t' # use \\' to escape the single quote...\n"
350+
">>> 'doesn\\'t' # \\' 來跳脫單引號...\n"
351351
"\"doesn't\"\n"
352352
">>> \"doesn't\" # ...或改用雙引號\n"
353353
"\"doesn't\"\n"
@@ -893,7 +893,7 @@ msgstr ""
893893
"1\n"
894894
">>> squares[-1]\n"
895895
"25\n"
896-
">>> squares[-3:] # 切片回傳新列表\n"
896+
">>> squares[-3:] # 切片回傳新串列\n"
897897
"[9, 16, 25]"
898898

899899
#: ../../tutorial/introduction.rst:407

tutorial/modules.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ msgstr ""
10751075
" \"reverse\", # !!! 現在指向 'reverse' 函式 !!!\n"
10761076
"]\n"
10771077
"\n"
1078-
"def reverse(msg: str): # <-- 這個名稱遮蔽了 'reverse.py' 子模組\n"
1079-
" return msg[::-1] # 在 'from sound.effects import *' 的情況下"
1078+
"def reverse(msg: str): # 在 'from sound.effects import *' 的情況下\n"
1079+
" return msg[::-1] # 這個名稱遮蔽了 'reverse.py' 子模組"
10801080

10811081
#: ../../tutorial/modules.rst:534
10821082
msgid ""

tutorial/stdlib2.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,12 @@ msgstr ""
578578
"... def __repr__(self):\n"
579579
"... return str(self.value)\n"
580580
"...\n"
581-
">>> a = A(10) # 建立一個參考\n"
581+
">>> a = A(10) # 建立一個參照\n"
582582
">>> d = weakref.WeakValueDictionary()\n"
583-
">>> d['primary'] = a # 不會建立參考\n"
583+
">>> d['primary'] = a # 不會建立參照\n"
584584
">>> d['primary'] # 如果物件仍然存在則取得它\n"
585585
"10\n"
586-
">>> del a # 移除一個參考\n"
586+
">>> del a # 移除一個參照\n"
587587
">>> gc.collect() # 立即執行垃圾回收\n"
588588
"0\n"
589589
">>> d['primary'] # 項目被自動移除\n"
@@ -725,7 +725,7 @@ msgid ""
725725
msgstr ""
726726
">>> from heapq import heapify, heappop, heappush\n"
727727
">>> data = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]\n"
728-
">>> heapify(data) # 將列表重新排列為堆積順序\n"
728+
">>> heapify(data) # 將串列重新排列為堆積順序\n"
729729
">>> heappush(data, -5) # 加入新項目\n"
730730
">>> [heappop(data) for i in range(3)] # 取得三個最小的項目\n"
731731
"[-5, 0, 1]"

0 commit comments

Comments
 (0)