11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Rafael Fontenelle <[email protected] >, 2023 7+ # Rafael Fontenelle <[email protected] >, 2024 88#
99#, fuzzy
1010msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.11\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-08-04 14:46 +0000\n "
14+ "POT-Creation-Date : 2024-02-09 16:33 +0000\n "
1515"PO-Revision-Date : 2023-05-24 02:08+0000\n "
16- "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023 \n "
16+ "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024 \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 "
@@ -112,6 +112,62 @@ msgstr "以下函数提供与语言环境无关的字符串到数字转换。"
112112
113113#: ../../c-api/conversion.rst:53
114114msgid ""
115+ "Convert the initial part of the string in ``str`` to an :c:expr:`unsigned "
116+ "long` value according to the given ``base``, which must be between ``2`` and"
117+ " ``36`` inclusive, or be the special value ``0``."
118+ msgstr ""
119+ "根据给定的 ``base`` 将 ``str`` 中字符串的初始部分转换为 :c:expr:`unsigned long` 值,该值必须在 ``2`` "
120+ "至 ``36`` 的开区间内,或者为特殊值 ``0``。"
121+
122+ #: ../../c-api/conversion.rst:57
123+ msgid ""
124+ "Leading white space and case of characters are ignored. If ``base`` is zero"
125+ " it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If "
126+ "these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 "
127+ "(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the "
128+ "end of the scan."
129+ msgstr ""
130+ "空白前缀和字符大小写将被忽略。 如果 ``base`` 为零则会查找 ``0b``、``0o`` 或 ``0x`` 前缀以确定基数。 "
131+ "如果没有则默认基数为 ``10``。 基数必须为 0 或在 2 和 36 之间(包括边界值)。 如果 ``ptr`` 不为 ``NULL`` "
132+ "则它将包含一个指向扫描结束位置的指针。"
133+
134+ #: ../../c-api/conversion.rst:63
135+ msgid ""
136+ "If the converted value falls out of range of corresponding return type, "
137+ "range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and "
138+ ":c:macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0``"
139+ " is returned."
140+ msgstr ""
141+ "如果转换后的值不在对应返回类型的取值范围之内,则会发生取值范围错误 (:c:data:`errno` 被设为 :c:macro:`!ERANGE`) "
142+ "并返回 :c:macro:`!ULONG_MAX`。 如果无法执行转换,则返回 ``0``。"
143+
144+ #: ../../c-api/conversion.rst:68
145+ msgid "See also the Unix man page :manpage:`strtoul(3)`."
146+ msgstr "另请参阅 Unix 指南页 :manpage:`strtoul(3)`。"
147+
148+ #: ../../c-api/conversion.rst:75
149+ msgid ""
150+ "Convert the initial part of the string in ``str`` to an :c:expr:`long` value"
151+ " according to the given ``base``, which must be between ``2`` and ``36`` "
152+ "inclusive, or be the special value ``0``."
153+ msgstr ""
154+ "根据给定的 ``base`` 将 ``str`` 中字符串的初始部分转换为 :c:expr:`long` 值,该值必须在 ``2`` 至 ``36`` "
155+ "的开区间内,或者为特殊值 ``0``。"
156+
157+ #: ../../c-api/conversion.rst:79
158+ msgid ""
159+ "Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead "
160+ "and :c:macro:`LONG_MAX` on overflows."
161+ msgstr ""
162+ "类似于 :c:func:`PyOS_strtoul`,但在溢出时将返回一个 :c:expr:`long` 值而不是 "
163+ ":c:macro:`LONG_MAX`。"
164+
165+ #: ../../c-api/conversion.rst:82
166+ msgid "See also the Unix man page :manpage:`strtol(3)`."
167+ msgstr "另请参阅 Unix 指南页 :manpage:`strtol(3)`。"
168+
169+ #: ../../c-api/conversion.rst:89
170+ msgid ""
115171"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on "
116172"failure. The set of accepted strings corresponds to the set of strings "
117173"accepted by Python's :func:`float` constructor, except that ``s`` must not "
@@ -121,7 +177,7 @@ msgstr ""
121177"将字符串 ``s`` 转换为 :c:expr:`double` 类型,失败时会引发 Python 异常。 接受的字符串集合对应于可被 Python 的 "
122178":func:`float` 构造器所接受的字符集集合,除了 ``s`` 必须没有前导或尾随空格。 转换必须独立于当前的语言区域。"
123179
124- #: ../../c-api/conversion.rst:59
180+ #: ../../c-api/conversion.rst:95
125181msgid ""
126182"If ``endptr`` is ``NULL``, convert the whole string. Raise "
127183":exc:`ValueError` and return ``-1.0`` if the string is not a valid "
@@ -130,7 +186,7 @@ msgstr ""
130186"如果 ``endptr`` 是 ``NULL`` ,转换整个字符串。引发 :exc:`ValueError` 并且 返回 ``-1.0`` "
131187"如果字符串不是浮点数的有效的表达方式。"
132188
133- #: ../../c-api/conversion.rst:63
189+ #: ../../c-api/conversion.rst:99
134190msgid ""
135191"If endptr is not ``NULL``, convert as much of the string as possible and set"
136192" ``*endptr`` to point to the first unconverted character. If no initial "
@@ -142,7 +198,7 @@ msgstr ""
142198"设置为指向第一个未转换的字符。如果字符串的初始段不是浮点数的有效的表达方式,将 ``*endptr`` 设置为指向字符串的开头,引发 "
143199"ValueError 异常,并且返回 ``-1.0`` 。"
144200
145- #: ../../c-api/conversion.rst:70
201+ #: ../../c-api/conversion.rst:106
146202msgid ""
147203"If ``s`` represents a value that is too large to store in a float (for "
148204"example, ``\" 1e500\" `` is such a string on many platforms) then if "
@@ -157,21 +213,21 @@ msgstr ""
157213"在其他方面, ``overflow_exception`` 必须指向一个 Python 异常对象;引发异常并返回 ``-1.0`` "
158214"。在这两种情况下,设置 ``*endptr`` 指向转换值之后的第一个字符。"
159215
160- #: ../../c-api/conversion.rst:78
216+ #: ../../c-api/conversion.rst:114
161217msgid ""
162218"If any other error occurs during the conversion (for example an out-of-"
163219"memory error), set the appropriate Python exception and return ``-1.0``."
164220msgstr "如果在转换期间发生任何其他错误(比如一个内存不足的错误),设置适当的 Python 异常并且返回 ``-1.0`` 。"
165221
166- #: ../../c-api/conversion.rst:87
222+ #: ../../c-api/conversion.rst:123
167223msgid ""
168224"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
169225"*precision*, and *flags*."
170226msgstr ""
171227"将 :c:expr:`double` *val* 转换为一个使用给定的 *format_code*, *precision* 和 *flags* "
172228"的字符串。"
173229
174- #: ../../c-api/conversion.rst:90
230+ #: ../../c-api/conversion.rst:126
175231msgid ""
176232"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
177233"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
@@ -181,35 +237,35 @@ msgstr ""
181237"*格式码* 必须是以下其中之一, ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, ``'G'`` 或者 "
182238"``'r'``。对于 ``'r'`` , 提供的 *精度* 必须是0。``'r'`` 格式码指定了标准函数 :func:`repr` 格式。"
183239
184- #: ../../c-api/conversion.rst:95
240+ #: ../../c-api/conversion.rst:131
185241msgid ""
186242"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
187243"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
188244msgstr ""
189245"*flags* 可以为零或者其他值 ``Py_DTSF_SIGN``, ``Py_DTSF_ADD_DOT_0`` 或 ``Py_DTSF_ALT`` "
190246"或其组合:"
191247
192- #: ../../c-api/conversion.rst:98
248+ #: ../../c-api/conversion.rst:134
193249msgid ""
194250"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
195251"character, even if *val* is non-negative."
196252msgstr "``Py_DTSF_SIGN`` 表示总是在返回的字符串前附加一个符号字符,即使 *val* 为非负数。"
197253
198- #: ../../c-api/conversion.rst:101
254+ #: ../../c-api/conversion.rst:137
199255msgid ""
200256"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look"
201257" like an integer."
202258msgstr "``Py_DTSF_ADD_DOT_0`` 表示确保返回的字符串看起来不像是一个整数。"
203259
204- #: ../../c-api/conversion.rst:104
260+ #: ../../c-api/conversion.rst:140
205261msgid ""
206262"``Py_DTSF_ALT`` means to apply \" alternate\" formatting rules. See the "
207263"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
208264msgstr ""
209265"``Py_DTSF_ALT`` 表示应用 \" 替代的\" 格式化规则。 相关细节请参阅 :c:func:`PyOS_snprintf` ``'#'`` "
210266"定义文档。"
211267
212- #: ../../c-api/conversion.rst:108
268+ #: ../../c-api/conversion.rst:144
213269msgid ""
214270"If *ptype* is non-``NULL``, then the value it points to will be set to one "
215271"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
@@ -219,7 +275,7 @@ msgstr ""
219275"如果 *ptype* 不为 ``NULL``,则它指向的值将被设为 ``Py_DTST_FINITE``, ``Py_DTST_INFINITE`` 或"
220276" ``Py_DTST_NAN`` 中的一个,分别表示 *val* 是一个有限数字、无限数字或非数字。"
221277
222- #: ../../c-api/conversion.rst:112
278+ #: ../../c-api/conversion.rst:148
223279msgid ""
224280"The return value is a pointer to *buffer* with the converted string or "
225281"``NULL`` if the conversion failed. The caller is responsible for freeing the"
@@ -228,13 +284,13 @@ msgstr ""
228284"返回值是一个指向包含转换后字符串的 *buffer* 的指针,如果转换失败则为 ``NULL``。 调用方要负责调用 "
229285":c:func:`PyMem_Free` 来释放返回的字符串。"
230286
231- #: ../../c-api/conversion.rst:121
287+ #: ../../c-api/conversion.rst:157
232288msgid ""
233289"Case insensitive comparison of strings. The function works almost "
234290"identically to :c:func:`!strcmp` except that it ignores the case."
235291msgstr "不区分大小写的字符串比较。 除了忽略大小写之外,该函数的工作方式与 :c:func:`!strcmp` 相同。"
236292
237- #: ../../c-api/conversion.rst:127
293+ #: ../../c-api/conversion.rst:163
238294msgid ""
239295"Case insensitive comparison of strings. The function works almost "
240296"identically to :c:func:`!strncmp` except that it ignores the case."
0 commit comments