Skip to content

Commit 7e48c38

Browse files
mattwang44claude
andcommitted
Fill code-only and markup-only entries from upstream sync
For msgids newly introduced or turned fuzzy by this sync that need no or almost no translation: - msgids that are only inline markup (roles, literals, math, footnote refs): copy msgid to msgstr - literal blocks (doctest, ::, code-block) without comments, and license texts: copy msgid to msgstr - literal blocks with a few comments: copy the code and translate only the comments, reusing existing comment translations where available Fuzzy flags on these entries are cleared. Edits are limited to the target entries; the rest of each file is byte-for-byte unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5458c9e commit 7e48c38

28 files changed

Lines changed: 379 additions & 111 deletions

‎builtins/stdtypes.po‎

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,19 +2931,19 @@ msgstr ":meth:`bytes.rstrip`"
29312931

29322932
#: ../../builtins/stdtypes.rst:1729
29332933
msgid ":meth:`str.removeprefix`"
2934-
msgstr ""
2934+
msgstr ":meth:`str.removeprefix`"
29352935

29362936
#: ../../builtins/stdtypes.rst:1729
29372937
msgid ":meth:`bytes.removeprefix`"
2938-
msgstr ""
2938+
msgstr ":meth:`bytes.removeprefix`"
29392939

29402940
#: ../../builtins/stdtypes.rst:1731
29412941
msgid ":meth:`str.removesuffix`"
2942-
msgstr ""
2942+
msgstr ":meth:`str.removesuffix`"
29432943

29442944
#: ../../builtins/stdtypes.rst:1731
29452945
msgid ":meth:`bytes.removesuffix`"
2946-
msgstr ""
2946+
msgstr ":meth:`bytes.removesuffix`"
29472947

29482948
#: ../../builtins/stdtypes.rst:1733
29492949
msgid "Translation and Encoding"
@@ -4877,6 +4877,16 @@ msgid ""
48774877
">>> f'{one_third = :~>10}~'\n"
48784878
"'one_third = ~~~~~~~1/3~'"
48794879
msgstr ""
4880+
">>> from fractions import Fraction\n"
4881+
">>> one_third = Fraction(1, 3)\n"
4882+
">>> f'{one_third:.6f}'\n"
4883+
"'0.333333'\n"
4884+
">>> f'{one_third:_^+10}'\n"
4885+
"'___+1/3___'\n"
4886+
">>> f'{one_third!r:_^20}'\n"
4887+
"'___Fraction(1, 3)___'\n"
4888+
">>> f'{one_third = :~>10}~'\n"
4889+
"'one_third = ~~~~~~~1/3~'"
48804890

48814891
#: ../../builtins/stdtypes.rst:3048
48824892
msgid "Template String Literals (t-strings)"
@@ -8239,6 +8249,43 @@ msgid ""
82398249
">>> values.mapping['spam']\n"
82408250
"500"
82418251
msgstr ""
8252+
">>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500}\n"
8253+
">>> keys = dishes.keys()\n"
8254+
">>> values = dishes.values()\n"
8255+
"\n"
8256+
">>> # 疊代\n"
8257+
">>> n = 0\n"
8258+
">>> for val in values:\n"
8259+
"... n += val\n"
8260+
"...\n"
8261+
">>> print(n)\n"
8262+
"504\n"
8263+
"\n"
8264+
">>> # 鍵和值會以相同的順序被疊代(插入順序)\n"
8265+
">>> list(keys)\n"
8266+
"['eggs', 'sausage', 'bacon', 'spam']\n"
8267+
">>> list(values)\n"
8268+
"[2, 1, 1, 500]\n"
8269+
"\n"
8270+
">>> # 視圖物件是動態的,會反映字典的變更\n"
8271+
">>> del dishes['eggs']\n"
8272+
">>> del dishes['sausage']\n"
8273+
">>> list(keys)\n"
8274+
"['bacon', 'spam']\n"
8275+
"\n"
8276+
">>> # 集合運算\n"
8277+
">>> keys & {'eggs', 'bacon', 'salad'}\n"
8278+
"{'bacon'}\n"
8279+
">>> keys ^ {'sausage', 'juice'} == {'juice', 'sausage', 'bacon', 'spam'}\n"
8280+
"True\n"
8281+
">>> keys | ['juice', 'juice', 'juice'] == {'bacon', 'spam', 'juice'}\n"
8282+
"True\n"
8283+
"\n"
8284+
">>> # 取得原始字典的唯讀代理\n"
8285+
">>> values.mapping\n"
8286+
"mappingproxy({'bacon': 1, 'spam': 500})\n"
8287+
">>> values.mapping['spam']\n"
8288+
"500"
82428289

82438290
#: ../../builtins/stdtypes.rst:5707
82448291
msgid "Context Manager Types"
@@ -8601,6 +8648,9 @@ msgid ""
86018648
">>> inspect.isclass(list[int])\n"
86028649
"False"
86038650
msgstr ""
8651+
">>> import inspect\n"
8652+
">>> inspect.isclass(list[int])\n"
8653+
"False"
86048654

86058655
#: ../../builtins/stdtypes.rst:5899
86068656
msgid ""
@@ -9141,6 +9191,12 @@ msgid ""
91419191
" ...\n"
91429192
"TypeError: isinstance() argument 2 cannot be a parameterized generic"
91439193
msgstr ""
9194+
">>> isinstance(1, int | list[int]) # 短路求值\n"
9195+
"True\n"
9196+
">>> isinstance([1], int | list[int])\n"
9197+
"Traceback (most recent call last):\n"
9198+
" ...\n"
9199+
"TypeError: isinstance() argument 2 cannot be a parameterized generic"
91449200

91459201
#: ../../builtins/stdtypes.rst:6134
91469202
msgid ""

‎builtins/time-complexity.po‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ msgstr ""
3939

4040
#: ../../builtins/time-complexity.rst:22
4141
msgid ":class:`!list`"
42-
msgstr ""
42+
msgstr ":class:`!list`"
4343

4444
#: ../../builtins/time-complexity.rst:24
4545
msgid ""
@@ -89,7 +89,7 @@ msgstr ""
8989
#: ../../builtins/time-complexity.rst:270
9090
#: ../../builtins/time-complexity.rst:272
9191
msgid "*O*\\ (*n*)"
92-
msgstr ""
92+
msgstr "*O*\\ (*n*)"
9393

9494
#: ../../builtins/time-complexity.rst:38
9595
msgid "Append (``l.append(x)``) [1]_"
@@ -120,7 +120,7 @@ msgstr ""
120120
#: ../../builtins/time-complexity.rst:268
121121
#: ../../builtins/time-complexity.rst:274
122122
msgid "*O*\\ (1)"
123-
msgstr ""
123+
msgstr "*O*\\ (1)"
124124

125125
#: ../../builtins/time-complexity.rst:40
126126
msgid "Pop (``l.pop(k)``) [1]_ [2]_"
@@ -129,7 +129,7 @@ msgstr ""
129129
#: ../../builtins/time-complexity.rst:41 ../../builtins/time-complexity.rst:43
130130
#: ../../builtins/time-complexity.rst:49
131131
msgid "*O*\\ (*n* - *k*)"
132-
msgstr ""
132+
msgstr "*O*\\ (*n* - *k*)"
133133

134134
#: ../../builtins/time-complexity.rst:42
135135
msgid "Insert (``l.insert(k, x)``) [1]_ [2]_"
@@ -160,7 +160,7 @@ msgstr ""
160160
#: ../../builtins/time-complexity.rst:53 ../../builtins/time-complexity.rst:92
161161
#: ../../builtins/time-complexity.rst:204
162162
msgid "*O*\\ (*j* - *i*)"
163-
msgstr ""
163+
msgstr "*O*\\ (*j* - *i*)"
164164

165165
#: ../../builtins/time-complexity.rst:54
166166
msgid "Set slice (``l[i:j] = t``) [1]_"
@@ -178,7 +178,7 @@ msgstr ""
178178

179179
#: ../../builtins/time-complexity.rst:58
180180
msgid "*O*\\ (*n* - *i*)"
181-
msgstr ""
181+
msgstr "*O*\\ (*n* - *i*)"
182182

183183
#: ../../builtins/time-complexity.rst:59
184184
msgid "Extend (``l.extend(t)``) [1]_ [3]_"
@@ -215,19 +215,19 @@ msgstr ""
215215

216216
#: ../../builtins/time-complexity.rst:67
217217
msgid "``x in l``"
218-
msgstr ""
218+
msgstr "``x in l``"
219219

220220
#: ../../builtins/time-complexity.rst:69
221221
msgid "``min(l)``, ``max(l)``"
222-
msgstr ""
222+
msgstr "``min(l)``, ``max(l)``"
223223

224224
#: ../../builtins/time-complexity.rst:71
225225
msgid "Get length (``len(l)``) [5]_"
226226
msgstr ""
227227

228228
#: ../../builtins/time-complexity.rst:76
229229
msgid ":class:`!tuple`"
230-
msgstr ""
230+
msgstr ":class:`!tuple`"
231231

232232
#: ../../builtins/time-complexity.rst:78
233233
msgid ""
@@ -262,19 +262,19 @@ msgstr ""
262262

263263
#: ../../builtins/time-complexity.rst:99
264264
msgid "``x in t``"
265-
msgstr ""
265+
msgstr "``x in t``"
266266

267267
#: ../../builtins/time-complexity.rst:101
268268
msgid "``min(t)``, ``max(t)``"
269-
msgstr ""
269+
msgstr "``min(t)``, ``max(t)``"
270270

271271
#: ../../builtins/time-complexity.rst:103
272272
msgid "Get length (``len(t)``) [5]_"
273273
msgstr ""
274274

275275
#: ../../builtins/time-complexity.rst:108
276276
msgid ":class:`!dict`"
277-
msgstr ""
277+
msgstr ":class:`!dict`"
278278

279279
#: ../../builtins/time-complexity.rst:110
280280
msgid ""
@@ -289,7 +289,7 @@ msgstr ""
289289

290290
#: ../../builtins/time-complexity.rst:123
291291
msgid "``key in d``"
292-
msgstr ""
292+
msgstr "``key in d``"
293293

294294
#: ../../builtins/time-complexity.rst:125
295295
msgid "Copy (``d.copy()``) [7]_"
@@ -321,7 +321,7 @@ msgstr ""
321321

322322
#: ../../builtins/time-complexity.rst:142
323323
msgid ":class:`!set`, :class:`!frozenset`"
324-
msgstr ""
324+
msgstr ":class:`!set`, :class:`!frozenset`"
325325

326326
#: ../../builtins/time-complexity.rst:144
327327
msgid ""
@@ -340,7 +340,7 @@ msgstr ""
340340

341341
#: ../../builtins/time-complexity.rst:158
342342
msgid "``x in s``"
343-
msgstr ""
343+
msgstr "``x in s``"
344344

345345
#: ../../builtins/time-complexity.rst:160
346346
msgid "Copy (``s.copy()``) [6]_ [7]_"
@@ -419,7 +419,7 @@ msgstr ""
419419

420420
#: ../../builtins/time-complexity.rst:187
421421
msgid ":class:`!str`, :class:`!bytes`, :class:`!bytearray`"
422-
msgstr ""
422+
msgstr ":class:`!str`, :class:`!bytes`, :class:`!bytearray`"
423423

424424
#: ../../builtins/time-complexity.rst:189
425425
msgid ""
@@ -470,7 +470,7 @@ msgstr ""
470470

471471
#: ../../builtins/time-complexity.rst:222
472472
msgid ":class:`!memoryview`"
473-
msgstr ""
473+
msgstr ":class:`!memoryview`"
474474

475475
#: ../../builtins/time-complexity.rst:224
476476
msgid ""
@@ -510,7 +510,7 @@ msgstr ""
510510

511511
#: ../../builtins/time-complexity.rst:251
512512
msgid ":class:`!range`"
513-
msgstr ""
513+
msgstr ":class:`!range`"
514514

515515
#: ../../builtins/time-complexity.rst:253
516516
msgid ""
@@ -529,15 +529,15 @@ msgstr ""
529529

530530
#: ../../builtins/time-complexity.rst:265
531531
msgid "``x in r`` [15]_"
532-
msgstr ""
532+
msgstr "``x in r`` [15]_"
533533

534534
#: ../../builtins/time-complexity.rst:267
535535
msgid "Index and count (``r.index(x)``, ``r.count(x)``) [15]_"
536536
msgstr ""
537537

538538
#: ../../builtins/time-complexity.rst:271
539539
msgid "``min(r)``, ``max(r)``"
540-
msgstr ""
540+
msgstr "``min(r)``, ``max(r)``"
541541

542542
#: ../../builtins/time-complexity.rst:273
543543
msgid "Get length (``len(r)``) [5]_"

‎howto/curses.po‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,14 @@ msgid ""
762762
" elif c == curses.KEY_HOME:\n"
763763
" x = y = 0"
764764
msgstr ""
765+
"while True:\n"
766+
" c = stdscr.get_wch()\n"
767+
" if c == 'p':\n"
768+
" PrintDocument()\n"
769+
" elif c == 'q':\n"
770+
" break # 離開 while 迴圈\n"
771+
" elif c == curses.KEY_HOME:\n"
772+
" x = y = 0"
765773

766774
#: ../../howto/curses.rst:482
767775
msgid ""
@@ -789,6 +797,10 @@ msgid ""
789797
"# Get a line of at most 15 bytes, with the cursor on the top line\n"
790798
"s = stdscr.getstr(0,0, 15)"
791799
msgstr ""
800+
"curses.echo() # 啟用字元回顯\n"
801+
"\n"
802+
"# 讀取最多 15 個位元組的一行,游標位於最上方那一行\n"
803+
"s = stdscr.getstr(0,0, 15)"
792804

793805
#: ../../howto/curses.rst:501
794806
msgid ""

‎howto/remote_debugging.po‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ msgstr ""
8888

8989
#: ../../howto/remote_debugging.rst:39
9090
msgid "``setpriv --ptracer any python3``"
91-
msgstr ""
91+
msgstr "``setpriv --ptracer any python3``"
9292

9393
#: ../../howto/remote_debugging.rst:41
9494
msgid ""

‎library/argparse.po‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3025,7 +3025,6 @@ msgstr ""
30253025
"退出並印出錯誤及用法訊息: ::"
30263026

30273027
#: ../../library/argparse.rst:1534
3028-
#, fuzzy
30293028
msgid ""
30303029
">>> parser = argparse.ArgumentParser(prog='PROG')\n"
30313030
">>> parser.add_argument('--foo', type=int)\n"
@@ -3058,12 +3057,12 @@ msgstr ""
30583057
">>> # 無效選項\n"
30593058
">>> parser.parse_args(['--bar'])\n"
30603059
"usage: PROG [-h] [--foo FOO] [bar]\n"
3061-
"PROG: error: no such option: --bar\n"
3060+
"PROG: error: unrecognized arguments: --bar\n"
30623061
"\n"
30633062
">>> # 錯誤引數數量\n"
30643063
">>> parser.parse_args(['spam', 'badger'])\n"
30653064
"usage: PROG [-h] [--foo FOO] [bar]\n"
3066-
"PROG: error: extra arguments found: badger"
3065+
"PROG: error: unrecognized arguments: badger"
30673066

30683067
#: ../../library/argparse.rst:1555
30693068
msgid "Arguments containing ``-``"
@@ -3087,7 +3086,6 @@ msgstr ""
30873086
"開頭: ::"
30883087

30893088
#: ../../library/argparse.rst:1565
3090-
#, fuzzy
30913089
msgid ""
30923090
">>> parser = argparse.ArgumentParser(prog='PROG')\n"
30933091
">>> parser.add_argument('-x')\n"
@@ -3142,7 +3140,7 @@ msgstr ""
31423140
">>> # 有負數選項存在,所以 -2 是選項\n"
31433141
">>> parser.parse_args(['-2'])\n"
31443142
"usage: PROG [-h] [-1 ONE] [foo]\n"
3145-
"PROG: error: no such option: -2\n"
3143+
"PROG: error: unrecognized arguments: -2\n"
31463144
"\n"
31473145
">>> # 有負數選項存在,所以兩個 -1 都是選項\n"
31483146
">>> parser.parse_args(['-1', '-1'])\n"

‎library/asyncio-dev.po‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,31 @@ msgid ""
572572
"\n"
573573
"asyncio.run(main())"
574574
msgstr ""
575+
"import asyncio\n"
576+
"work_done = False\n"
577+
"\n"
578+
"async def cursor():\n"
579+
" try:\n"
580+
" yield 1\n"
581+
" finally:\n"
582+
" assert work_done\n"
583+
"\n"
584+
"async def rows():\n"
585+
" global work_done\n"
586+
" try:\n"
587+
" yield 2\n"
588+
" finally:\n"
589+
" await asyncio.sleep(0.1) # 模擬一些非同步工作\n"
590+
" work_done = True\n"
591+
"\n"
592+
"\n"
593+
"async def main():\n"
594+
" async for c in cursor():\n"
595+
" async for r in rows():\n"
596+
" break\n"
597+
" break\n"
598+
"\n"
599+
"asyncio.run(main())"
575600

576601
#: ../../library/asyncio-dev.rst:319
577602
msgid "For this example, we get the following output::"

‎library/asyncio-graph.po‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ msgstr ""
3939

4040
#: ../../library/asyncio-graph.rst:22
4141
msgid ":ref:`asyncio-introspection-tools`"
42-
msgstr ""
42+
msgstr ":ref:`asyncio-introspection-tools`"
4343

4444
#: ../../library/asyncio-graph.rst:23
4545
msgid ""

0 commit comments

Comments
 (0)