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

Skip to content

Commit 6ee0543

Browse files
[po] auto sync
1 parent 51326f8 commit 6ee0543

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

c-api/codec.po

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ msgid ""
127127
"unencodable characters/undecodable bytes and *name* is specified as the "
128128
"error parameter in the call to the encode/decode function."
129129
msgstr ""
130+
"在给定的 *name* 之下注册错误处理回调函数 *error*。 该回调函数将在一个编解码器遇到无法编码的字符/无法解码的字节数据并且 *name* "
131+
"被指定为 encode/decode 函数调用的 error 形参时由该编解码器来调用。"
130132

131133
#: ../../c-api/codec.rst:80
132134
msgid ""
@@ -140,6 +142,10 @@ msgid ""
140142
"giving the offset in the original string at which encoding/decoding should "
141143
"be resumed."
142144
msgstr ""
145+
"该回调函数会接受一个 :exc:`UnicodeEncodeError`, :exc:`UnicodeDecodeError` 或 "
146+
":exc:`UnicodeTranslateError` 的实例作为单独参数,其中包含关于有问题字符或字节序列及其在原始序列的偏移量信息(请参阅 "
147+
":ref:`unicodeexceptions` 了解提取此信息的函数详情)。 "
148+
"该回调函数必须引发给定的异常,或者返回一个包含有问题序列及相应替换序列的二元组,以及一个表示偏移量的整数,该整数指明应在什么位置上恢复编码/解码操作。"
143149

144150
#: ../../c-api/codec.rst:90
145151
msgid "Return ``0`` on success, ``-1`` on error."
@@ -151,29 +157,31 @@ msgid ""
151157
"special case ``NULL`` can be passed, in which case the error handling "
152158
"callback for \"strict\" will be returned."
153159
msgstr ""
160+
"查找在 *name* 之下注册的错误处理回调函数。 作为特例还可以传入 ``NULL``,在此情况下将返回针对 \"strict\" "
161+
"的错误处理回调函数。"
154162

155163
#: ../../c-api/codec.rst:100
156164
msgid "Raise *exc* as an exception."
157-
msgstr ""
165+
msgstr "引发 *exc* 作为异常。"
158166

159167
#: ../../c-api/codec.rst:104
160168
msgid "Ignore the unicode error, skipping the faulty input."
161-
msgstr ""
169+
msgstr "忽略 unicode 错误,跳过错误的输入。"
162170

163171
#: ../../c-api/codec.rst:108
164172
msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``."
165-
msgstr ""
173+
msgstr "使用 ``?`` 或 ``U+FFFD`` 替换 unicode 编码错误。"
166174

167175
#: ../../c-api/codec.rst:112
168176
msgid "Replace the unicode encode error with XML character references."
169-
msgstr ""
177+
msgstr "使用 XML 字符引用替换 unicode 编码错误。"
170178

171179
#: ../../c-api/codec.rst:116
172180
msgid ""
173181
"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` "
174182
"and ``\\U``)."
175-
msgstr ""
183+
msgstr "使用反斜杠转义符 (``\\x``, ``\\u`` 和 ``\\U``) 替换 unicode 编码错误。"
176184

177185
#: ../../c-api/codec.rst:121
178186
msgid "Replace the unicode encode error with ``\\N{...}`` escapes."
179-
msgstr ""
187+
msgstr "使用 ``\\N{...}`` 转义符替换 unicode 编码错误。"

0 commit comments

Comments
 (0)