Skip to content

Commit e39b179

Browse files
lilwad-0730claude
andcommitted
fix(c-api/hash): resolve review comments
Remove literal newlines inside msgstr that rendered as a stray space after full-width periods, keep the :ref: role separated with "\ " now that the newline before it is gone, and reword the Py_HashBuffer paragraph to avoid a long chain of modifiers. Also fix the typo "演算式名稱" to "演算法名稱". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e5faa23 commit e39b179

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

‎c-api/hash.po‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,15 @@ msgstr ""
4545

4646
#: ../../c-api/hash.rst:27
4747
msgid "The algorithm name is exposed by :data:`sys.hash_info.algorithm`."
48-
msgstr "演算式名稱由 :data:`sys.hash_info.algorithm` 公開。"
48+
msgstr "演算法名稱由 :data:`sys.hash_info.algorithm` 公開。"
4949

5050
#: ../../c-api/hash.rst:36
5151
msgid ""
5252
"Numerical values to compare to :c:macro:`Py_HASH_ALGORITHM` to determine "
5353
"which algorithm is used for hashing. The hash algorithm can be configured "
5454
"via the configure :option:`--with-hash-algorithm` option."
5555
msgstr ""
56-
"用來與 :c:macro:`Py_HASH_ALGORITHM` 比較的數值,以判斷使用哪一種雜湊演算"
57-
"法。\n"
56+
"用來與 :c:macro:`Py_HASH_ALGORITHM` 比較的數值,以判斷使用哪一種雜湊演算法。"
5857
"雜湊演算法可透過 configure 的 :option:`--with-hash-algorithm` 選項設定。"
5958

6059
#: ../../c-api/hash.rst:40
@@ -70,8 +69,8 @@ msgid ""
7069
"Buffers of length in range ``[1, Py_HASH_CUTOFF)`` are hashed using DJBX33A "
7170
"instead of the algorithm described by :c:macro:`Py_HASH_ALGORITHM`."
7271
msgstr ""
73-
"長度在 ``[1, Py_HASH_CUTOFF)`` 範圍內的緩衝區,會使用 DJBX33A 進行雜湊,\n"
74-
"而非 :c:macro:`Py_HASH_ALGORITHM` 所指定的演算法。"
72+
"長度在 ``[1, Py_HASH_CUTOFF)`` 範圍內的緩衝區,會使用 DJBX33A 進行雜湊,而非 "
73+
":c:macro:`Py_HASH_ALGORITHM` 所指定的演算法。"
7574

7675
#: ../../c-api/hash.rst:52
7776
msgid "A :c:macro:`!Py_HASH_CUTOFF` of 0 disables the optimization."
@@ -89,9 +88,8 @@ msgid ""
8988
"and 5 on 32-bit platforms should provide a decent safety margin."
9089
msgstr ""
9190
"32 位元的平台應使用比 64 位元的平台更小的門檻值,因為在 32 位元平台上更容易建"
92-
"立會發生雜湊碰撞的字串。\n"
93-
"若在 64 位元平台上將門檻值設為 7,在 32 位元平台上設為 5,應能提供適當的安全"
94-
"餘裕。"
91+
"立會發生雜湊碰撞的字串。若在 64 位元平台上將門檻值設為 7,在 32 位元平台上設"
92+
"為 5,應能提供適當的安全餘裕。"
9593

9694
#: ../../c-api/hash.rst:59
9795
msgid "This corresponds to the :data:`sys.hash_info.cutoff` constant."
@@ -194,19 +192,18 @@ msgid ""
194192
"of :class:`bytes`, :class:`memoryview`, and other built-in objects that "
195193
"implement the :ref:`buffer protocol <bufferobjects>`."
196194
msgstr ""
197-
"計算並回傳從位址 *ptr* 開始、長度為 *len* 位元組的緩衝區之雜湊值。\n"
198-
"此雜湊值會保證與 :class:`bytes`、:class:`memoryview` 及其他實作\n"
199-
":ref:`緩衝協定 <bufferobjects>` 的內建物件之雜湊值一致。"
195+
"計算並回傳從位址 *ptr* 開始、長度為 *len* 位元組的緩衝區之雜湊值。此雜湊值會"
196+
"保證與 :class:`bytes`、:class:`memoryview` 及其他實作\\ :ref:`緩衝協定 "
197+
"<bufferobjects>` 的內建物件之雜湊值一致。"
200198

201199
#: ../../c-api/hash.rst:162
202200
msgid ""
203201
"Use this function to implement hashing for immutable objects "
204202
"whose :c:member:`~PyTypeObject.tp_richcompare` function compares to another "
205203
"object's buffer."
206204
msgstr ""
207-
"使用此函式,對透過 :c:member:`~PyTypeObject.tp_richcompare` 函式與另一個物件的"
208-
"緩衝區\n"
209-
"進行比較的不可變物件實作其雜湊功能。"
205+
"使用此函式為不可變物件實作雜湊,這類物件的 "
206+
":c:member:`~PyTypeObject.tp_richcompare` 函式會與另一個物件的緩衝區進行比較。"
210207

211208
#: ../../c-api/hash.rst:166
212209
msgid "*len* must be greater than or equal to ``0``."

0 commit comments

Comments
 (0)