Skip to content

Commit bcbf796

Browse files
Copilotmattwang44
andcommitted
Translate byte order, format characters tables and explanations
Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com>
1 parent ff086ac commit bcbf796

File tree

1 file changed

+41
-18
lines changed

1 file changed

+41
-18
lines changed

library/struct.po

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,30 +194,32 @@ msgid ""
194194
"indicate the byte order, size and alignment of the packed data, according to "
195195
"the following table:"
196196
msgstr ""
197+
"或者,格式字串的第一個字元可以用來指示打包資料的位元組順序、大小和對齊,\\"
198+
"如下表所示:"
197199

198200
#: ../../library/struct.rst:148
199201
msgid "Character"
200-
msgstr ""
202+
msgstr "字元"
201203

202204
#: ../../library/struct.rst:148
203205
msgid "Byte order"
204-
msgstr ""
206+
msgstr "位元組順序"
205207

206208
#: ../../library/struct.rst:148
207209
msgid "Size"
208-
msgstr ""
210+
msgstr "大小"
209211

210212
#: ../../library/struct.rst:148
211213
msgid "Alignment"
212-
msgstr ""
214+
msgstr "對齊"
213215

214216
#: ../../library/struct.rst:150
215217
msgid "``@``"
216218
msgstr "``@``"
217219

218220
#: ../../library/struct.rst:150 ../../library/struct.rst:152
219221
msgid "native"
220-
msgstr ""
222+
msgstr "原生"
221223

222224
#: ../../library/struct.rst:152
223225
msgid "``=``"
@@ -226,58 +228,59 @@ msgstr "``=``"
226228
#: ../../library/struct.rst:152 ../../library/struct.rst:154
227229
#: ../../library/struct.rst:156 ../../library/struct.rst:158
228230
msgid "standard"
229-
msgstr ""
231+
msgstr "標準"
230232

231233
#: ../../library/struct.rst:152 ../../library/struct.rst:154
232234
#: ../../library/struct.rst:156 ../../library/struct.rst:158
233235
msgid "none"
234-
msgstr ""
236+
msgstr ""
235237

236238
#: ../../library/struct.rst:154
237239
msgid "``<``"
238240
msgstr "``<``"
239241

240242
#: ../../library/struct.rst:154
241243
msgid "little-endian"
242-
msgstr ""
244+
msgstr "小端序"
243245

244246
#: ../../library/struct.rst:156
245247
msgid "``>``"
246248
msgstr "``>``"
247249

248250
#: ../../library/struct.rst:156
249251
msgid "big-endian"
250-
msgstr ""
252+
msgstr "大端序"
251253

252254
#: ../../library/struct.rst:158
253255
msgid "``!``"
254256
msgstr "``!``"
255257

256258
#: ../../library/struct.rst:158
257259
msgid "network (= big-endian)"
258-
msgstr ""
260+
msgstr "網路(= 大端序)"
259261

260262
#: ../../library/struct.rst:161
261263
msgid "If the first character is not one of these, ``'@'`` is assumed."
262-
msgstr ""
264+
msgstr "如果第一個字元不是這些字元之一,則假設為 ``'@'``。"
263265

264266
#: ../../library/struct.rst:165
265267
msgid ""
266268
"The number 1023 (``0x3ff`` in hexadecimal) has the following byte "
267269
"representations:"
268270
msgstr ""
271+
"數字 1023(十六進位為 ``0x3ff``)具有以下位元組表示法:"
269272

270273
#: ../../library/struct.rst:167
271274
msgid "``03 ff`` in big-endian (``>``)"
272-
msgstr ""
275+
msgstr "大端序(``>``)為 ``03 ff``"
273276

274277
#: ../../library/struct.rst:168
275278
msgid "``ff 03`` in little-endian (``<``)"
276-
msgstr ""
279+
msgstr "小端序(``<``)為 ``ff 03``"
277280

278281
#: ../../library/struct.rst:170
279282
msgid "Python example:"
280-
msgstr ""
283+
msgstr "Python 範例:"
281284

282285
#: ../../library/struct.rst:178
283286
msgid ""
@@ -286,36 +289,48 @@ msgid ""
286289
"endian; IBM z and many legacy architectures are big-endian. "
287290
"Use :data:`sys.byteorder` to check the endianness of your system."
288291
msgstr ""
292+
"原生位元組順序是大端序或小端序,取決於主機系統。例如,Intel x86、AMD64 (x86-64) \\"
293+
"和 Apple M1 是小端序;IBM z 和許多舊架構是大端序。使用\\ :data:`sys.byteorder` \\"
294+
"來檢查您系統的位元組順序。"
289295

290296
#: ../../library/struct.rst:183
291297
msgid ""
292298
"Native size and alignment are determined using the C compiler's ``sizeof`` "
293299
"expression. This is always combined with native byte order."
294300
msgstr ""
301+
"原生大小和對齊是使用 C 編譯器的 ``sizeof`` 表達式來決定的。這總是與原生位元組順序\\"
302+
"結合使用。"
295303

296304
#: ../../library/struct.rst:186
297305
msgid ""
298306
"Standard size depends only on the format character; see the table in "
299307
"the :ref:`format-characters` section."
300308
msgstr ""
309+
"標準大小僅取決於格式字元;請參見\\ :ref:`format-characters` 區段中的表格。"
301310

302311
#: ../../library/struct.rst:189
303312
msgid ""
304313
"Note the difference between ``'@'`` and ``'='``: both use native byte order, "
305314
"but the size and alignment of the latter is standardized."
306315
msgstr ""
316+
"請注意 ``'@'`` 和 ``'='`` 之間的差異:兩者都使用原生位元組順序,但後者的大小和\\"
317+
"對齊是標準化的。"
307318

308319
#: ../../library/struct.rst:192
309320
msgid ""
310321
"The form ``'!'`` represents the network byte order which is always big-"
311322
"endian as defined in `IETF RFC 1700 <IETF RFC 1700_>`_."
312323
msgstr ""
324+
"``'!'`` 形式表示網路位元組順序,根據 `IETF RFC 1700 <IETF RFC 1700_>`_ 的定義,\\"
325+
"它總是大端序。"
313326

314327
#: ../../library/struct.rst:195
315328
msgid ""
316329
"There is no way to indicate non-native byte order (force byte-swapping); use "
317330
"the appropriate choice of ``'<'`` or ``'>'``."
318331
msgstr ""
332+
"沒有方法來指示非原生位元組順序(強制位元組交換);請使用適當的 ``'<'`` 或 ``'>'`` \\"
333+
"選擇。"
319334

320335
#: ../../library/struct.rst:198 ../../library/struct.rst:277
321336
msgid "Notes:"
@@ -326,23 +341,27 @@ msgid ""
326341
"Padding is only automatically added between successive structure members. No "
327342
"padding is added at the beginning or the end of the encoded struct."
328343
msgstr ""
344+
"填充只會在連續的結構成員之間自動加入。編碼結構的開頭或結尾不會加入填充。"
329345

330346
#: ../../library/struct.rst:203
331347
msgid ""
332348
"No padding is added when using non-native size and alignment, e.g. with '<', "
333349
"'>', '=', and '!'."
334350
msgstr ""
351+
"使用非原生大小和對齊時,例如使用 '<'、'>'、'=' 和 '!' 時,不會加入填充。"
335352

336353
#: ../../library/struct.rst:206
337354
msgid ""
338355
"To align the end of a structure to the alignment requirement of a particular "
339356
"type, end the format with the code for that type with a repeat count of "
340357
"zero. See :ref:`struct-examples`."
341358
msgstr ""
359+
"要將結構的結尾對齊到特定型別的對齊需求,請以該型別的代碼結束格式,重複次數為零。\\"
360+
"請參見\\ :ref:`struct-examples`。"
342361

343362
#: ../../library/struct.rst:214
344363
msgid "Format Characters"
345-
msgstr ""
364+
msgstr "格式字元"
346365

347366
#: ../../library/struct.rst:216
348367
msgid ""
@@ -353,22 +372,26 @@ msgid ""
353372
"``'!'`` or ``'='``. When using native size, the size of the packed value is "
354373
"platform-dependent."
355374
msgstr ""
375+
"格式字元具有以下意義;在給定型別的情況下,C 和 Python 數值之間的轉換應該是顯而\\"
376+
"易見的。「標準大小」欄位指的是使用標準大小時打包數值的位元組大小;也就是說,\\"
377+
"當格式字串以 ``'<'``、``'>'``、``'!'`` 或 ``'='`` 其中之一開始時。使用原生大小時,\\"
378+
"打包數值的大小取決於平台。"
356379

357380
#: ../../library/struct.rst:224
358381
msgid "Format"
359-
msgstr ""
382+
msgstr "格式"
360383

361384
#: ../../library/struct.rst:224
362385
msgid "C Type"
363386
msgstr "C Type"
364387

365388
#: ../../library/struct.rst:224
366389
msgid "Python type"
367-
msgstr ""
390+
msgstr "Python 型別"
368391

369392
#: ../../library/struct.rst:224
370393
msgid "Standard size"
371-
msgstr ""
394+
msgstr "標準大小"
372395

373396
#: ../../library/struct.rst:224
374397
msgid "Notes"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy