Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02219cb

Browse files
[po] auto sync
1 parent 65c33b0 commit 02219cb

14 files changed

+239
-61
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.28%", "updated_at": "2025-03-14T15:47:03Z"}
1+
{"translation": "81.35%", "updated_at": "2025-03-14T18:48:53Z"}

c-api/arg.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-03-07 14:53+0000\n"
14+
"POT-Creation-Date: 2025-03-14 14:53+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -30,7 +30,7 @@ msgid ""
3030
"These functions are useful when creating your own extension functions and "
3131
"methods. Additional information and examples are available in "
3232
":ref:`extending-index`."
33-
msgstr ""
33+
msgstr "这些函数在创建你自己的扩展函数和方法时很有用处。 更多信息和示例可在 :ref:`extending-index` 查看。"
3434

3535
#: ../../c-api/arg.rst:12
3636
msgid ""

extending/embedding.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-03-07 14:53+0000\n"
14+
"POT-Creation-Date: 2025-03-14 14:53+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -453,6 +453,8 @@ msgid ""
453453
"argument, which is constructed using the :c:func:`PyUnicode_DecodeFSDefault`"
454454
" data conversion routine. ::"
455455
msgstr ""
456+
"在初始化解析器之后,再使用 :c:func:`PyImport_Import` 加载脚本。 此例程需要一个 Python 字符串作为其参数,它是使用 "
457+
":c:func:`PyUnicode_DecodeFSDefault` 数据转换例程来构造的。 ::"
456458

457459
#: ../../extending/embedding.rst:183
458460
msgid ""

library/argparse.po

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.12\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2025-02-28 14:56+0000\n"
15+
"POT-Creation-Date: 2025-03-14 14:53+0000\n"
1616
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
1717
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -716,6 +716,9 @@ msgid ""
716716
" for options like ``+f`` or ``/foo``, may specify them using the "
717717
"``prefix_chars=`` argument to the :class:`ArgumentParser` constructor::"
718718
msgstr ""
719+
"大多数命令行选项会使用 ``-`` 作为前缀,例如 ``-f/--foo``。 如果解析器需要支持不同的或者额外的前缀字符,例如像 ``+f`` 或 "
720+
"``/foo`` 之类的选项,可以在 :class:`ArgumentParser` 构造器中使用 ``prefix_chars=`` "
721+
"参数来指定它们::"
719722

720723
#: ../../library/argparse.rst:377
721724
msgid ""
@@ -809,6 +812,10 @@ msgid ""
809812
"encoding and error handler`. Arguments file should be encoded in UTF-8 "
810813
"instead of ANSI Codepage on Windows."
811814
msgstr ""
815+
":class:`ArgumentParser` 将读取参数的编码格式和错误处理方式从默认值 (即 "
816+
":func:`locale.getpreferredencoding(False) <locale.getpreferredencoding>` 和 "
817+
"``\"strict\"``) 改为 :term:`filesystem encoding and error handler`。 在 Windows "
818+
"上参数文件应当以 UTF-8 而不是 ANSI 代码页来编码。"
812819

813820
#: ../../library/argparse.rst:426
814821
msgid "argument_default"
@@ -1726,7 +1733,7 @@ msgstr ""
17261733
msgid ""
17271734
"If the target namespace already has an attribute set, the action *default* "
17281735
"will not overwrite it::"
1729-
msgstr ""
1736+
msgstr "如果目标命名空间已经有一个属性集,则 *default* 动作不会覆盖它::"
17301737

17311738
#: ../../library/argparse.rst:920
17321739
msgid ""
@@ -1793,6 +1800,8 @@ msgid ""
17931800
" applies to positional arguments with nargs_ values other than ``?`` or "
17941801
"``*``, or optional arguments marked as ``required=True``."
17951802
msgstr ""
1803+
"对于 required_ 参数, ``default`` 值将被忽略。 例如,这将适用于带有 ``?`` 和 ``*`` 以外的 nargs_ "
1804+
"值的位置参数,或者被标记为 ``required=True`` 的可选参数。"
17961805

17971806
#: ../../library/argparse.rst:950
17981807
msgid ""
@@ -1864,6 +1873,16 @@ msgid ""
18641873
"parser.add_argument('dest_file', type=argparse.FileType('w', encoding='latin-1'))\n"
18651874
"parser.add_argument('datapath', type=pathlib.Path)"
18661875
msgstr ""
1876+
"import argparse\n"
1877+
"import pathlib\n"
1878+
"\n"
1879+
"parser = argparse.ArgumentParser()\n"
1880+
"parser.add_argument('count', type=int)\n"
1881+
"parser.add_argument('distance', type=float)\n"
1882+
"parser.add_argument('street', type=ascii)\n"
1883+
"parser.add_argument('code_point', type=ord)\n"
1884+
"parser.add_argument('dest_file', type=argparse.FileType('w', encoding='latin-1'))\n"
1885+
"parser.add_argument('datapath', type=pathlib.Path)"
18671886

18681887
#: ../../library/argparse.rst:996
18691888
msgid "User defined functions can be used as well:"
@@ -1926,6 +1945,9 @@ msgid ""
19261945
"the parser has run and then use the :keyword:`with`-statement to manage the "
19271946
"files."
19281947
msgstr ""
1948+
"甚至 :class:`~argparse.FileType` 在用于 ``type`` 关键字时也是有限制的。 如果一个参数使用了 "
1949+
":class:`~argparse.FileType` 并且有一个后续参数出错,则将报告错误但文件并不会被自动关闭。 "
1950+
"在此情况下,更好的做法是等待直到解析器运行完毕再使用 :keyword:`with` 语句来管理文件。"
19291951

19301952
#: ../../library/argparse.rst:1029
19311953
msgid ""
@@ -1975,6 +1997,8 @@ msgid ""
19751997
"conversions have been performed, so the type of the objects in the *choices*"
19761998
" sequence should match the type_ specified."
19771999
msgstr ""
2000+
"注意包括在 *choices* 序列中的内容会在执行任意 type_ 转换之后被检查,因此 *choices* 序列中对象的类型应当与指定的 type_"
2001+
" 相匹配。"
19782002

19792003
#: ../../library/argparse.rst:1057
19802004
msgid ""
@@ -2623,6 +2647,35 @@ msgid ""
26232647
"usage: PROG [-h] [-1 ONE] [foo]\n"
26242648
"PROG: error: argument -1: expected one argument"
26252649
msgstr ""
2650+
">>> parser = argparse.ArgumentParser(prog='PROG')\n"
2651+
">>> parser.add_argument('-x')\n"
2652+
">>> parser.add_argument('foo', nargs='?')\n"
2653+
"\n"
2654+
">>> # 没有负数选项,因此 -1 是位置参数\n"
2655+
">>> parser.parse_args(['-x', '-1'])\n"
2656+
"Namespace(foo=None, x='-1')\n"
2657+
"\n"
2658+
">>> # 没有负数选项,因此 -1 和 -5 是位置参数\n"
2659+
">>> parser.parse_args(['-x', '-1', '-5'])\n"
2660+
"Namespace(foo='-5', x='-1')\n"
2661+
"\n"
2662+
">>> parser = argparse.ArgumentParser(prog='PROG')\n"
2663+
">>> parser.add_argument('-1', dest='one')\n"
2664+
">>> parser.add_argument('foo', nargs='?')\n"
2665+
"\n"
2666+
">>> # 有负数选项,因此 -1 是选项\n"
2667+
">>> parser.parse_args(['-1', 'X'])\n"
2668+
"Namespace(foo=None, one='X')\n"
2669+
"\n"
2670+
">>> # 有负数选项,因此 -2 是选项\n"
2671+
">>> parser.parse_args(['-2'])\n"
2672+
"usage: PROG [-h] [-1 ONE] [foo]\n"
2673+
"PROG: error: no such option: -2\n"
2674+
"\n"
2675+
">>> # 有负数选项,因此两个 -1 都是选项\n"
2676+
">>> parser.parse_args(['-1', '-1'])\n"
2677+
"usage: PROG [-h] [-1 ONE] [foo]\n"
2678+
"PROG: error: argument -1: expected one argument"
26262679

26272680
#: ../../library/argparse.rst:1426
26282681
msgid ""
@@ -2901,6 +2954,24 @@ msgid ""
29012954
">>> parser.parse_args(['--foo', 'b', '--baz', 'Z'])\n"
29022955
"Namespace(baz='Z', foo=True)"
29032956
msgstr ""
2957+
">>> # 创建一个最高层级解析器\n"
2958+
">>> parser = argparse.ArgumentParser(prog='PROG')\n"
2959+
">>> parser.add_argument('--foo', action='store_true', help='foo help')\n"
2960+
">>> subparsers = parser.add_subparsers(help='subcommand help')\n"
2961+
">>>\n"
2962+
">>> # 创建一个针对 \"a\" 命令的解析器\n"
2963+
">>> parser_a = subparsers.add_parser('a', help='a help')\n"
2964+
">>> parser_a.add_argument('bar', type=int, help='bar help')\n"
2965+
">>>\n"
2966+
">>> # 创建一个针对 \"b\" 命令的解析器\n"
2967+
">>> parser_b = subparsers.add_parser('b', help='b help')\n"
2968+
">>> parser_b.add_argument('--baz', choices=('X', 'Y', 'Z'), help='baz help')\n"
2969+
">>>\n"
2970+
">>> # 解析一些参数列表\n"
2971+
">>> parser.parse_args(['a', '12'])\n"
2972+
"Namespace(bar=12, foo=False)\n"
2973+
">>> parser.parse_args(['--foo', 'b', '--baz', 'Z'])\n"
2974+
"Namespace(baz='Z', foo=True)"
29042975

29052976
#: ../../library/argparse.rst:1591
29062977
msgid ""
@@ -3099,6 +3170,37 @@ msgid ""
30993170
">>> args.func(args)\n"
31003171
"((XYZYX))"
31013172
msgstr ""
3173+
">>> # 子命令函数\n"
3174+
">>> def foo(args):\n"
3175+
"... print(args.x * args.y)\n"
3176+
"...\n"
3177+
">>> def bar(args):\n"
3178+
"... print('((%s))' % args.z)\n"
3179+
"...\n"
3180+
">>> # 创建最高层级解析器\n"
3181+
">>> parser = argparse.ArgumentParser()\n"
3182+
">>> subparsers = parser.add_subparsers(required=True)\n"
3183+
">>>\n"
3184+
">>> # 创建针对 \"foo\" 命令的解析器\n"
3185+
">>> parser_foo = subparsers.add_parser('foo')\n"
3186+
">>> parser_foo.add_argument('-x', type=int, default=1)\n"
3187+
">>> parser_foo.add_argument('y', type=float)\n"
3188+
">>> parser_foo.set_defaults(func=foo)\n"
3189+
">>>\n"
3190+
">>> # 创建针对 \"bar\" 命令的解析器\n"
3191+
">>> parser_bar = subparsers.add_parser('bar')\n"
3192+
">>> parser_bar.add_argument('z')\n"
3193+
">>> parser_bar.set_defaults(func=bar)\n"
3194+
">>>\n"
3195+
">>> # 解析参数并调用被选定的任何函数\n"
3196+
">>> args = parser.parse_args('foo 1 -x 2'.split())\n"
3197+
">>> args.func(args)\n"
3198+
"2.0\n"
3199+
">>>\n"
3200+
">>> # 解析参数并调用被选定的任何函数\n"
3201+
">>> args = parser.parse_args('bar XYZYX'.split())\n"
3202+
">>> args.func(args)\n"
3203+
"((XYZYX))"
31023204

31033205
#: ../../library/argparse.rst:1703
31043206
msgid ""
@@ -3755,7 +3857,7 @@ msgstr ""
37553857
#: ../../library/argparse.rst:2078
37563858
msgid ""
37573859
"The following example shows how to register a custom type with a parser::"
3758-
msgstr ""
3860+
msgstr "下面的例子演示了如何注册一个带解析器的自定义类型::"
37593861

37603862
#: ../../library/argparse.rst:2080
37613863
msgid ""

library/collections.po

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-03-07 14:53+0000\n"
14+
"POT-Creation-Date: 2025-03-14 14:53+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1262,6 +1262,9 @@ msgid ""
12621262
"normal dictionaries, return ``None`` as a default rather than using "
12631263
":attr:`default_factory`."
12641264
msgstr ""
1265+
"请注意除了 :meth:`~object.__getitem__` 以外 :meth:`__missing__` 将 *不会* 被调用以执行任何操作。 "
1266+
"这意味着 :meth:`~dict.get` 会像普通字典一样返回 ``None`` 作为默认值而不是使用 "
1267+
":attr:`default_factory`。"
12651268

12661269
#: ../../library/collections.rst:756
12671270
msgid ":class:`defaultdict` objects support the following instance variable:"
@@ -1366,6 +1369,9 @@ msgid ""
13661369
":meth:`~object.__repr__` method which lists the tuple contents in a "
13671370
"``name=value`` format."
13681371
msgstr ""
1372+
"返回一个新的名为 *typename* 的元组子类。 这个新子类将被用于创建具有即可通过索引和迭代又可通过属性查找来访问的字段的元组型对象。 "
1373+
"这样的子类实例还将具有文档字符串 (包含 *typename* 和 *field_names*) 和以 ``name=value`` 格式列出元组内容的"
1374+
" :meth:`~object.__repr__` 方法以方便使用。"
13691375

13701376
#: ../../library/collections.rst:856
13711377
msgid ""
@@ -1444,13 +1450,13 @@ msgstr "添加了 *module* 参数。"
14441450

14451451
#: ../../library/collections.rst:897
14461452
msgid "Removed the *verbose* parameter and the :attr:`!_source` attribute."
1447-
msgstr ""
1453+
msgstr "移除了 *verbose* 形参和 :attr:`!_source` 属性。"
14481454

14491455
#: ../../library/collections.rst:900
14501456
msgid ""
14511457
"Added the *defaults* parameter and the "
14521458
":attr:`~somenamedtuple._field_defaults` attribute."
1453-
msgstr ""
1459+
msgstr "添加了 *defaults* 形参和 :attr:`~somenamedtuple._field_defaults` 属性。"
14541460

14551461
#: ../../library/collections.rst:904
14561462
msgid ""
@@ -1796,6 +1802,8 @@ msgid ""
17961802
"different signature. It accepts an optional argument to specify which item "
17971803
"is popped."
17981804
msgstr ""
1805+
":class:`OrderedDict` 的 :meth:`~OrderedDict.popitem` 方法具有不同的签名。 "
1806+
"它接受一个可选参数来指定要弹出哪一项。"
17991807

18001808
#: ../../library/collections.rst:1110
18011809
msgid ""
@@ -1819,6 +1827,7 @@ msgid ""
18191827
":class:`OrderedDict` has a :meth:`~OrderedDict.move_to_end` method to "
18201828
"efficiently reposition an element to an endpoint."
18211829
msgstr ""
1830+
":class:`OrderedDict` 具有一个 :meth:`~OrderedDict.move_to_end` 方法以高效地将元素移到任一端点。"
18221831

18231832
#: ../../library/collections.rst:1120
18241833
msgid ""
@@ -1842,7 +1851,7 @@ msgstr ""
18421851
msgid ""
18431852
"Until Python 3.8, :class:`dict` lacked a :meth:`~object.__reversed__` "
18441853
"method."
1845-
msgstr ""
1854+
msgstr "在 Python 3.8 之前,:class:`dict` 都缺少 :meth:`~object.__reversed__` 方法。"
18461855

18471856
#: ../../library/collections.rst:1133
18481857
msgid ""
@@ -1926,6 +1935,8 @@ msgid ""
19261935
"passed to the :class:`OrderedDict` constructor and its :meth:`~dict.update` "
19271936
"method."
19281937
msgstr ""
1938+
"随着 :pep:`468` 的通过,传给 :class:`OrderedDict` 构造器及其 :meth:`~dict.update` "
1939+
"方法的关键字参数顺序将被保留。"
19291940

19301941
#: ../../library/collections.rst:1191
19311942
msgid ":class:`OrderedDict` Examples and Recipes"

library/constants.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-03-07 14:53+0000\n"
14+
"POT-Creation-Date: 2025-03-14 14:53+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -93,6 +93,8 @@ msgid ""
9393
"interchangeable. This constant should only be used as described above; see "
9494
":exc:`NotImplementedError` for details on correct usage of the exception."
9595
msgstr ""
96+
":data:`!NotImplemented` 和 :exc:`!NotImplementedError` 不能互相替代。 "
97+
"此常量应当仅以上文所描述的方式使用;请参阅 :exc:`NotImplementedError` 了解正确使用该异常的相关细节。"
9698

9799
#: ../../library/constants.rst:56
98100
msgid ""

0 commit comments

Comments
 (0)