Skip to content

Commit 2ad7edb

Browse files
[po] auto sync
1 parent 11ddc22 commit 2ad7edb

File tree

9 files changed

+411
-16
lines changed

9 files changed

+411
-16
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.43%", "updated_at": "2024-09-22T07:57:31Z"}
1+
{"translation": "92.53%", "updated_at": "2024-09-22T13:57:09Z"}

library/http.client.po

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ msgid ""
2222
msgstr ""
2323
"Project-Id-Version: Python 3.13\n"
2424
"Report-Msgid-Bugs-To: \n"
25-
"POT-Creation-Date: 2024-08-31 10:59+0000\n"
25+
"POT-Creation-Date: 2024-09-20 14:17+0000\n"
2626
"PO-Revision-Date: 2021-06-28 01:07+0000\n"
2727
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2828
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -803,6 +803,28 @@ msgid ""
803803
">>> data2 = r2.read()\n"
804804
">>> conn.close()"
805805
msgstr ""
806+
">>> import http.client\n"
807+
">>> conn = http.client.HTTPSConnection(\"www.python.org\")\n"
808+
">>> conn.request(\"GET\", \"/\")\n"
809+
">>> r1 = conn.getresponse()\n"
810+
">>> print(r1.status, r1.reason)\n"
811+
"200 OK\n"
812+
">>> data1 = r1.read() # 这将返回全部内容。\n"
813+
">>> # 下面的例子演示了分块读取数据。\n"
814+
">>> conn.request(\"GET\", \"/\")\n"
815+
">>> r1 = conn.getresponse()\n"
816+
">>> while chunk := r1.read(200):\n"
817+
"... print(repr(chunk))\n"
818+
"b'<!doctype html>\\n<!--[if\"...\n"
819+
"...\n"
820+
">>> # 无效请求的例子\n"
821+
">>> conn = http.client.HTTPSConnection(\"docs.python.org\")\n"
822+
">>> conn.request(\"GET\", \"/parrot.spam\")\n"
823+
">>> r2 = conn.getresponse()\n"
824+
">>> print(r2.status, r2.reason)\n"
825+
"404 Not Found\n"
826+
">>> data2 = r2.read()\n"
827+
">>> conn.close()"
806828

807829
#: ../../library/http.client.rst:596
808830
msgid ""

library/importlib.metadata.po

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.13\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2024-09-13 14:16+0000\n"
18+
"POT-Creation-Date: 2024-09-20 14:17+0000\n"
1919
"PO-Revision-Date: 2021-06-28 01:08+0000\n"
2020
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2121
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -753,6 +753,11 @@ msgid ""
753753
" loading the metadata for packages for the indicated ``context``.\n"
754754
" \"\"\""
755755
msgstr ""
756+
"@abc.abstractmethod\n"
757+
"def find_distributions(context=DistributionFinder.Context()):\n"
758+
" \"\"\"返回一个由所有能够为指定 ``context`` 加载包的元数据的\n"
759+
" Distribution 实例组成的可迭代对象。\n"
760+
" \"\"\""
756761

757762
#: ../../library/importlib.metadata.rst:399
758763
msgid ""

library/locale.po

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ msgid ""
1717
msgstr ""
1818
"Project-Id-Version: Python 3.13\n"
1919
"Report-Msgid-Bugs-To: \n"
20-
"POT-Creation-Date: 2024-07-20 00:52+0000\n"
20+
"POT-Creation-Date: 2024-09-20 14:17+0000\n"
2121
"PO-Revision-Date: 2021-06-28 01:08+0000\n"
2222
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2323
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -91,6 +91,14 @@ msgid ""
9191
" start with a call of ::"
9292
msgstr ":func:`setlocale` 在大多数系统上都不是线程安全的。应用程序通常会如下调用:"
9393

94+
#: ../../library/locale.rst:49
95+
msgid ""
96+
"import locale\n"
97+
"locale.setlocale(locale.LC_ALL, '')"
98+
msgstr ""
99+
"import locale\n"
100+
"locale.setlocale(locale.LC_ALL, '')"
101+
94102
#: ../../library/locale.rst:52
95103
msgid ""
96104
"This sets the locale for all categories to the user's default setting "
@@ -825,6 +833,18 @@ msgstr "一个符号常量, :func:`localeconv` 返回多个值时将会用到
825833
msgid "Example::"
826834
msgstr "示例:"
827835

836+
#: ../../library/locale.rst:557
837+
msgid ""
838+
">>> import locale\n"
839+
">>> loc = locale.getlocale() # get current locale\n"
840+
"# use German locale; name might vary with platform\n"
841+
">>> locale.setlocale(locale.LC_ALL, 'de_DE')\n"
842+
">>> locale.strcoll('f\\xe4n', 'foo') # compare a string containing an umlaut\n"
843+
">>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale\n"
844+
">>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale\n"
845+
">>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale"
846+
msgstr ""
847+
828848
#: ../../library/locale.rst:568
829849
msgid "Background, details, hints, tips and caveats"
830850
msgstr "背景、细节、提示、技巧和注意事项"

tutorial/classes.po

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ msgid ""
2121
msgstr ""
2222
"Project-Id-Version: Python 3.13\n"
2323
"Report-Msgid-Bugs-To: \n"
24-
"POT-Creation-Date: 2024-08-31 10:59+0000\n"
24+
"POT-Creation-Date: 2024-09-20 14:17+0000\n"
2525
"PO-Revision-Date: 2021-06-28 01:49+0000\n"
2626
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2727
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -948,6 +948,16 @@ msgid ""
948948
" self.add(x)\n"
949949
" self.add(x)"
950950
msgstr ""
951+
"class Bag:\n"
952+
" def __init__(self):\n"
953+
" self.data = []\n"
954+
"\n"
955+
" def add(self, x):\n"
956+
" self.data.append(x)\n"
957+
"\n"
958+
" def addtwice(self, x):\n"
959+
" self.add(x)\n"
960+
" self.add(x)"
951961

952962
#: ../../tutorial/classes.rst:549
953963
msgid ""
@@ -989,6 +999,12 @@ msgid ""
989999
" .\n"
9901000
" <statement-N>"
9911001
msgstr ""
1002+
"class DerivedClassName(BaseClassName):\n"
1003+
" <语句-1>\n"
1004+
" .\n"
1005+
" .\n"
1006+
" .\n"
1007+
" <语句-N>"
9921008

9931009
#: ../../tutorial/classes.rst:579
9941010
msgid ""
@@ -1002,7 +1018,7 @@ msgstr ""
10021018

10031019
#: ../../tutorial/classes.rst:585
10041020
msgid "class DerivedClassName(modname.BaseClassName):"
1005-
msgstr ""
1021+
msgstr "class DerivedClassName(modname.BaseClassName):"
10061022

10071023
#: ../../tutorial/classes.rst:587
10081024
msgid ""
@@ -1095,6 +1111,12 @@ msgid ""
10951111
" .\n"
10961112
" <statement-N>"
10971113
msgstr ""
1114+
"class DerivedClassName(Base1, Base2, Base3):\n"
1115+
" <语句-1>\n"
1116+
" .\n"
1117+
" .\n"
1118+
" .\n"
1119+
" <语句-N>"
10981120

10991121
#: ../../tutorial/classes.rst:640
11001122
msgid ""
@@ -1261,6 +1283,13 @@ msgid ""
12611283
" dept: str\n"
12621284
" salary: int"
12631285
msgstr ""
1286+
"from dataclasses import dataclass\n"
1287+
"\n"
1288+
"@dataclass\n"
1289+
"class Employee:\n"
1290+
" name: str\n"
1291+
" dept: str\n"
1292+
" salary: int"
12641293

12651294
#: ../../tutorial/classes.rst:754
12661295
msgid ""
@@ -1270,6 +1299,11 @@ msgid ""
12701299
">>> john.salary\n"
12711300
"1000"
12721301
msgstr ""
1302+
">>> john = Employee('john', 'computer lab', 1000)\n"
1303+
">>> john.dept\n"
1304+
"'computer lab'\n"
1305+
">>> john.salary\n"
1306+
"1000"
12731307

12741308
#: ../../tutorial/classes.rst:760
12751309
msgid ""
@@ -1318,6 +1352,16 @@ msgid ""
13181352
"for line in open(\"myfile.txt\"):\n"
13191353
" print(line, end='')"
13201354
msgstr ""
1355+
"for element in [1, 2, 3]:\n"
1356+
" print(element)\n"
1357+
"for element in (1, 2, 3):\n"
1358+
" print(element)\n"
1359+
"for key in {'one':1, 'two':2}:\n"
1360+
" print(key)\n"
1361+
"for char in \"123\":\n"
1362+
" print(char)\n"
1363+
"for line in open(\"myfile.txt\"):\n"
1364+
" print(line, end='')"
13211365

13221366
#: ../../tutorial/classes.rst:798
13231367
msgid ""
@@ -1355,6 +1399,21 @@ msgid ""
13551399
" next(it)\n"
13561400
"StopIteration"
13571401
msgstr ""
1402+
">>> s = 'abc'\n"
1403+
">>> it = iter(s)\n"
1404+
">>> it\n"
1405+
"<str_iterator object at 0x10c90e650>\n"
1406+
">>> next(it)\n"
1407+
"'a'\n"
1408+
">>> next(it)\n"
1409+
"'b'\n"
1410+
">>> next(it)\n"
1411+
"'c'\n"
1412+
">>> next(it)\n"
1413+
"Traceback (most recent call last):\n"
1414+
" File \"<stdin>\", line 1, in <module>\n"
1415+
" next(it)\n"
1416+
"StopIteration"
13581417

13591418
#: ../../tutorial/classes.rst:823
13601419
msgid ""
@@ -1399,6 +1458,16 @@ msgid ""
13991458
"p\n"
14001459
"s"
14011460
msgstr ""
1461+
">>> rev = Reverse('spam')\n"
1462+
">>> iter(rev)\n"
1463+
"<__main__.Reverse object at 0x00A1DB50>\n"
1464+
">>> for char in rev:\n"
1465+
"... print(char)\n"
1466+
"...\n"
1467+
"m\n"
1468+
"a\n"
1469+
"p\n"
1470+
"s"
14021471

14031472
#: ../../tutorial/classes.rst:860
14041473
msgid "Generators"
@@ -1423,6 +1492,9 @@ msgid ""
14231492
" for index in range(len(data)-1, -1, -1):\n"
14241493
" yield data[index]"
14251494
msgstr ""
1495+
"def reverse(data):\n"
1496+
" for index in range(len(data)-1, -1, -1):\n"
1497+
" yield data[index]"
14261498

14271499
#: ../../tutorial/classes.rst:875
14281500
msgid ""

tutorial/datastructures.po

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,24 @@ msgid ""
640640
">>> v\n"
641641
"([1, 2, 3], [3, 2, 1])"
642642
msgstr ""
643+
">>> t = 12345, 54321, 'hello!'\n"
644+
">>> t[0]\n"
645+
"12345\n"
646+
">>> t\n"
647+
"(12345, 54321, 'hello!')\n"
648+
">>> # 元组可以嵌套:\n"
649+
">>> u = t, (1, 2, 3, 4, 5)\n"
650+
">>> u\n"
651+
"((12345, 54321, 'hello!'), (1, 2, 3, 4, 5))\n"
652+
">>> # 元组是不可变对象:\n"
653+
">>> t[0] = 88888\n"
654+
"Traceback (most recent call last):\n"
655+
" File \"<stdin>\", line 1, in <module>\n"
656+
"TypeError: 'tuple' object does not support item assignment\n"
657+
">>> # 但它们可以包含可变对象:\n"
658+
">>> v = ([1, 2, 3], [3, 2, 1])\n"
659+
">>> v\n"
660+
"([1, 2, 3], [3, 2, 1])"
643661

644662
#: ../../tutorial/datastructures.rst:400
645663
msgid ""
@@ -689,6 +707,14 @@ msgid ""
689707
">>> singleton\n"
690708
"('hello',)"
691709
msgstr ""
710+
">>> empty = ()\n"
711+
">>> singleton = 'hello', # <-- 注意末尾的逗号\n"
712+
">>> len(empty)\n"
713+
"0\n"
714+
">>> len(singleton)\n"
715+
"1\n"
716+
">>> singleton\n"
717+
"('hello',)"
692718

693719
#: ../../tutorial/datastructures.rst:430
694720
msgid ""
@@ -701,7 +727,7 @@ msgstr ""
701727

702728
#: ../../tutorial/datastructures.rst:434
703729
msgid ">>> x, y, z = t"
704-
msgstr ""
730+
msgstr ">>> x, y, z = t"
705731

706732
#: ../../tutorial/datastructures.rst:436
707733
msgid ""
@@ -781,6 +807,9 @@ msgid ""
781807
">>> a\n"
782808
"{'r', 'd'}"
783809
msgstr ""
810+
">>> a = {x for x in 'abracadabra' if x not in 'abc'}\n"
811+
">>> a\n"
812+
"{'r', 'd'}"
784813

785814
#: ../../tutorial/datastructures.rst:493
786815
msgid "Dictionaries"
@@ -863,6 +892,24 @@ msgid ""
863892
">>> 'jack' not in tel\n"
864893
"False"
865894
msgstr ""
895+
">>> tel = {'jack': 4098, 'sape': 4139}\n"
896+
">>> tel['guido'] = 4127\n"
897+
">>> tel\n"
898+
"{'jack': 4098, 'sape': 4139, 'guido': 4127}\n"
899+
">>> tel['jack']\n"
900+
"4098\n"
901+
">>> del tel['sape']\n"
902+
">>> tel['irv'] = 4127\n"
903+
">>> tel\n"
904+
"{'jack': 4098, 'guido': 4127, 'irv': 4127}\n"
905+
">>> list(tel)\n"
906+
"['jack', 'guido', 'irv']\n"
907+
">>> sorted(tel)\n"
908+
"['guido', 'irv', 'jack']\n"
909+
">>> 'guido' in tel\n"
910+
"True\n"
911+
">>> 'jack' not in tel\n"
912+
"False"
866913

867914
#: ../../tutorial/datastructures.rst:544
868915
msgid ""
@@ -875,6 +922,8 @@ msgid ""
875922
">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n"
876923
"{'sape': 4139, 'guido': 4127, 'jack': 4098}"
877924
msgstr ""
925+
">>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])\n"
926+
"{'sape': 4139, 'guido': 4127, 'jack': 4098}"
878927

879928
#: ../../tutorial/datastructures.rst:550
880929
msgid ""
@@ -887,6 +936,8 @@ msgid ""
887936
">>> {x: x**2 for x in (2, 4, 6)}\n"
888937
"{2: 4, 4: 16, 6: 36}"
889938
msgstr ""
939+
">>> {x: x**2 for x in (2, 4, 6)}\n"
940+
"{2: 4, 4: 16, 6: 36}"
890941

891942
#: ../../tutorial/datastructures.rst:556
892943
msgid ""
@@ -899,6 +950,8 @@ msgid ""
899950
">>> dict(sape=4139, guido=4127, jack=4098)\n"
900951
"{'sape': 4139, 'guido': 4127, 'jack': 4098}"
901952
msgstr ""
953+
">>> dict(sape=4139, guido=4127, jack=4098)\n"
954+
"{'sape': 4139, 'guido': 4127, 'jack': 4098}"
902955

903956
#: ../../tutorial/datastructures.rst:566
904957
msgid "Looping Techniques"
@@ -919,6 +972,12 @@ msgid ""
919972
"gallahad the pure\n"
920973
"robin the brave"
921974
msgstr ""
975+
">>> knights = {'gallahad': 'the pure', 'robin': 'the brave'}\n"
976+
">>> for k, v in knights.items():\n"
977+
"... print(k, v)\n"
978+
"...\n"
979+
"gallahad the pure\n"
980+
"robin the brave"
922981

923982
#: ../../tutorial/datastructures.rst:578
924983
msgid ""
@@ -935,6 +994,12 @@ msgid ""
935994
"1 tac\n"
936995
"2 toe"
937996
msgstr ""
997+
">>> for i, v in enumerate(['tic', 'tac', 'toe']):\n"
998+
"... print(i, v)\n"
999+
"...\n"
1000+
"0 tic\n"
1001+
"1 tac\n"
1002+
"2 toe"
9381003

9391004
#: ../../tutorial/datastructures.rst:588
9401005
msgid ""

0 commit comments

Comments
 (0)