@@ -159,6 +159,9 @@ msgid ""
159159"functions directly! :c:type:`PyOS_sighandler_t` is a typedef alias for "
160160":c:type:`void (\\ *)(int)`."
161161msgstr ""
162+ "返回当前用于信号 *i* 的信号处理句柄。 这是一个对 :c:func:`sigaction` 或 :c:func:`signal` 的简单包装器。 "
163+ "请不要直接调用那两个函数! :c:type:`PyOS_sighandler_t` 是对应于 :c:type:`void (\\ *)(int)` 的 "
164+ "typedef 别名。"
162165
163166#: ../../c-api/sys.rst:114
164167msgid ""
@@ -168,20 +171,27 @@ msgid ""
168171":c:type:`PyOS_sighandler_t` is a typedef alias for :c:type:`void "
169172"(\\ *)(int)`."
170173msgstr ""
174+ "将用于信号 *i* 的信号处理句柄设为 *h*;返回旧的信号处理句柄。 这是一个对 :c:func:`sigaction` 或 "
175+ ":c:func:`signal` 的简单包装器。 请不要直接调用那两个函数! :c:type:`PyOS_sighandler_t` 是对应于 "
176+ ":c:type:`void (\\ *)(int)` 的 typedef 别名。"
171177
172178#: ../../c-api/sys.rst:122
173179msgid ""
174180"This function should not be called directly: use the :c:type:`PyConfig` API "
175181"with the :c:func:`PyConfig_SetBytesString` function which ensures that "
176182":ref:`Python is preinitialized <c-preinit>`."
177183msgstr ""
184+ "此函数不应当被直接调用:请使用 :c:type:`PyConfig` API 以及可确保 :ref:`对 Python 进行预初始化 "
185+ "<c-preinit>` 的 :c:func:`PyConfig_SetBytesString` 函数。"
178186
179187#: ../../c-api/sys.rst:126 ../../c-api/sys.rst:193
180188msgid ""
181189"This function must not be called before :ref:`Python is preinitialized "
182190"<c-preinit>` and so that the LC_CTYPE locale is properly configured: see the"
183191" :c:func:`Py_PreInitialize` function."
184192msgstr ""
193+ "此函数不可在This function must not be called before :ref:`对 Python 进行预初始化 "
194+ "<c-preinit>` 之前被调用以便正确地配置 LC_CTYPE 语言区域:请参阅 :c:func:`Py_PreInitialize` 函数。"
185195
186196#: ../../c-api/sys.rst:130
187197msgid ""
@@ -192,38 +202,48 @@ msgid ""
192202"character, the bytes are escaped using the surrogateescape error handler "
193203"instead of decoding them."
194204msgstr ""
205+ "使用 :term:`filesystem encoding and error handler` 来解码一个字节串。 如果错误处理句柄为 "
206+ ":ref:`surrogateescape 错误处理句柄 <surrogateescape>`,则不可解码的字节将被解码为 U+DC80..U+DCFF"
207+ " 范围内的字符;而如果一个字节序列可被解码为代理字符,则其中的字节会使用 surrogateescape 错误处理句柄来转义而不是解码它们。"
195208
196209#: ../../c-api/sys.rst:137
197210msgid ""
198211"Return a pointer to a newly allocated wide character string, use "
199212":c:func:`PyMem_RawFree` to free the memory. If size is not ``NULL``, write "
200213"the number of wide characters excluding the null character into ``*size``"
201214msgstr ""
215+ "返回一个指向新分配的由宽字符组成的字符串的指针,使用 :c:func:`PyMem_RawFree` 来释放内存。 如果 size 不为 "
216+ "``NULL``,则将排除了 null 字符的宽字符数量写入到 ``*size``"
202217
203218#: ../../c-api/sys.rst:141
204219msgid ""
205220"Return ``NULL`` on decoding error or memory allocation error. If *size* is "
206221"not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to "
207222"``(size_t)-2`` on decoding error."
208223msgstr ""
224+ "在解码错误或内存分配错误时返回 ``NULL``。 如果 *size* 不为 ``NULL``,则 ``*size`` 将在内存错误时设为 "
225+ "``(size_t)-1`` 或在解码错误时设为 ``(size_t)-2``。"
209226
210227#: ../../c-api/sys.rst:145 ../../c-api/sys.rst:185
211228msgid ""
212229"The :term:`filesystem encoding and error handler` are selected by "
213230":c:func:`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and "
214231":c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`."
215232msgstr ""
233+ ":term:`filesystem encoding and error handler` 是由 :c:func:`PyConfig_Read` "
234+ "来选择的: 参见 :c:type:`PyConfig` 的 :c:member:`~PyConfig.filesystem_encoding` 和 "
235+ ":c:member:`~PyConfig.filesystem_errors` 等成员。"
216236
217237#: ../../c-api/sys.rst:149
218238msgid ""
219239"Decoding errors should never happen, unless there is a bug in the C library."
220- msgstr ""
240+ msgstr "解码错误绝对不应当发生,除非 C 库有程序缺陷。 "
221241
222242#: ../../c-api/sys.rst:152
223243msgid ""
224244"Use the :c:func:`Py_EncodeLocale` function to encode the character string "
225245"back to a byte string."
226- msgstr ""
246+ msgstr "请使用 :c:func:`Py_EncodeLocale` 函数来将字符串编码回字节串。 "
227247
228248#: ../../c-api/sys.rst:157
229249msgid ""
0 commit comments