Skip to content

Commit bb9334d

Browse files
[po] auto sync
1 parent 29566a9 commit bb9334d

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "89.82%", "updated_at": "2024-09-07T06:57:43Z"}
1+
{"translation": "89.82%", "updated_at": "2024-09-07T07:57:31Z"}

library/io.po

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ msgstr ""
9999
msgid ""
100100
"The easiest way to create a text stream is with :meth:`open`, optionally "
101101
"specifying an encoding::"
102-
msgstr "创建文本流的最简单方式是使用 :meth:`open`,并可选择指定编码格式::"
102+
msgstr "创建文本流的最简单方式是通过 :meth:`open`,并可选择指定编码格式::"
103103

104104
#: ../../library/io.rst:61
105105
msgid "f = open(\"myfile.txt\", \"r\", encoding=\"utf-8\")"
@@ -139,7 +139,7 @@ msgstr ""
139139
msgid ""
140140
"The easiest way to create a binary stream is with :meth:`open` with ``'b'`` "
141141
"in the mode string::"
142-
msgstr "创建二进制流的最简单方式是使用 :meth:`open` 并在模式字符串中使用 ``'b'``::"
142+
msgstr "创建二进制流的最简单方式是通过 :meth:`open` 并在模式字符串中使用 ``'b'``::"
143143

144144
#: ../../library/io.rst:83
145145
msgid "f = open(\"myfile.jpg\", \"rb\")"
@@ -1554,6 +1554,8 @@ msgid ""
15541554
"``encoding=\"locale\"`` can be used to specify the current locale's encoding"
15551555
" explicitly. See :ref:`io-text-encoding` for more information."
15561556
msgstr ""
1557+
"*encoding* 给出将被用于编码或解码流的编码格式。 该参数值默认为 :func:`locale.getencoding`。 可以使用 "
1558+
"``encoding=\"locale\"`` 来显式地指定当前语言区域的编码格式。 详情参见 :ref:`io-text-encoding`。"
15571559

15581560
#: ../../library/io.rst:957
15591561
msgid ""
@@ -1814,6 +1816,19 @@ msgid ""
18141816
"# .getvalue() will now raise an exception.\n"
18151817
"output.close()"
18161818
msgstr ""
1819+
"import io\n"
1820+
"\n"
1821+
"output = io.StringIO()\n"
1822+
"output.write('First line.\\n')\n"
1823+
"print('Second line.', file=output)\n"
1824+
"\n"
1825+
"# 提取文件内容 -- 这将为\n"
1826+
"# 'First line.\\nSecond line.\\n'\n"
1827+
"contents = output.getvalue()\n"
1828+
"\n"
1829+
"# 关闭对象并丢弃内存缓冲区 --\n"
1830+
"# 现在 .getvalue() 将引发一个异常。\n"
1831+
"output.close()"
18171832

18181833
#: ../../library/io.rst:1126
18191834
msgid ""
@@ -1923,6 +1938,8 @@ msgid ""
19231938
"standard streams and therefore affects the built-in :func:`print` function "
19241939
"as well."
19251940
msgstr ""
1941+
"上面的代码将显式地扩展到文本文件,因为 :func:`open` 函数将把缓冲的对象包装在 :class:`TextIOWrapper` 中。 "
1942+
"这包括标准流因而也会影响内置的 :func:`print` 函数。"
19261943

19271944
#: ../../library/io.rst:24
19281945
msgid "file object"

using/cmdline.po

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,13 @@ msgid ""
679679
"-Wonce # Warn once per Python process\n"
680680
"-Wignore # Never warn"
681681
msgstr ""
682+
"-Wdefault # 每个调用位置警告一次\n"
683+
"-Werror # 转换为异常\n"
684+
"-Walways # 每次都警告\n"
685+
"-Wall # 与 -Walways 相同\n"
686+
"-Wmodule # 每个调用模块警告一次\n"
687+
"-Wonce # 每个 Python 进程警告一次\n"
688+
"-Wignore # 从不警告"
682689

683690
#: ../../using/cmdline.rst:449
684691
msgid ""
@@ -1334,6 +1341,13 @@ msgid ""
13341341
"PYTHONWARNINGS=once # Warn once per Python process\n"
13351342
"PYTHONWARNINGS=ignore # Never warn"
13361343
msgstr ""
1344+
"PYTHONWARNINGS=default # 每个调用位置警告一次\n"
1345+
"PYTHONWARNINGS=error # 转换为异常\n"
1346+
"PYTHONWARNINGS=always # 每次都警告\n"
1347+
"PYTHONWARNINGS=all # 与 PYTHONWARNINGS=always 相同\n"
1348+
"PYTHONWARNINGS=module # 每个调用模块警告一次\n"
1349+
"PYTHONWARNINGS=once # 每个 Python 进程警告一次\n"
1350+
"PYTHONWARNINGS=ignore # 从不警告"
13371351

13381352
#: ../../using/cmdline.rst:933
13391353
msgid ""

0 commit comments

Comments
 (0)