From 91ee219383093a4a911b01f0c5bb79fb86073bd2 Mon Sep 17 00:00:00 2001 From: timmy Date: Fri, 22 Dec 2023 09:28:16 +0800 Subject: [PATCH 01/12] working on ssl --- library/ssl.po | 52 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index 8e79b9969d..6475c8c33a 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-29 00:03+0000\n" -"PO-Revision-Date: 2023-12-21 08:33+0800\n" +"PO-Revision-Date: 2023-12-22 09:26+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -102,8 +102,8 @@ msgid "" "created through the :meth:`SSLContext.wrap_socket` method." msgstr "" "對於更複雜的應用程式,:class:`ssl.SSLContext` 類別有助於管理設定及認證,然後" -"可以透過 :meth:`SSLContext.wrap_socket` 方法建立的 SSL socket 繼承這些設" -"定和認證。" +"可以透過 :meth:`SSLContext.wrap_socket` 方法建立的 SSL socket 繼承這些設定和" +"認證。" #: ../../library/ssl.rst:53 msgid "Updated to support linking with OpenSSL 1.1.0" @@ -148,18 +148,27 @@ msgstr "" #: ../../library/ssl.rst:82 msgid "Client socket example with default context and IPv4/IPv6 dual stack::" msgstr "" +"使用預設內容及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例:\n" +"\n" +"::" #: ../../library/ssl.rst:95 msgid "Client socket example with custom context and IPv4::" msgstr "" +"使用自訂內容及 IPv4 的客戶端 socket範例:\n" +"\n" +"::" #: ../../library/ssl.rst:107 msgid "Server socket example listening on localhost IPv4::" msgstr "" +"在本地 IPv4 上監聽伺服器 socket 的範例:\n" +"\n" +"::" #: ../../library/ssl.rst:121 msgid "Context creation" -msgstr "" +msgstr "內容建立" #: ../../library/ssl.rst:123 msgid "" @@ -174,6 +183,8 @@ msgid "" "represent a higher security level than when calling the :class:`SSLContext` " "constructor directly." msgstr "" +"回傳一個新的 :class:`SSLContext` 物件,使用給定 *purpose* 的預設值。這些設定" +"是由 :mod:`ssl` 選擇,通常比直接使用 :class:`SSLContext` 有更高的安全性。" #: ../../library/ssl.rst:133 msgid "" @@ -182,6 +193,9 @@ msgid "" "If all three are :const:`None`, this function can choose to trust the " "system's default CA certificates instead." msgstr "" +"*cafile*, *capath*, *cadata* 是用來選擇用於憑證認證的 CA 憑證,就像 :meth:" +"`SSLContext.load_verify_locations` 一樣。如果三個值都是 :const:`None`,此函式" +"會自動選擇系統預設的 CA 憑證。" #: ../../library/ssl.rst:139 msgid "" @@ -194,6 +208,13 @@ msgid "" "or uses :meth:`SSLContext.load_default_certs` to load default CA " "certificates." msgstr "" +"這些設定包含:data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:" +"data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高加密密碼套件但不包含 " +"RC4 和未經身份驗證的密碼套件。如果將 *purpose* 設定為 :const:`~Purpose." +"SERVER_AUTH`,則會把 :data:`~SSLContext.verify_mode` 設為 :data:" +"`CERT_REQUIRED` 並使用設定的 CA 憑證(當 *cafile*、*capath*、或 *cadata* 其中" +"一個值有被設定時) 或使用預設的 CA 憑證 :meth:`SSLContext." +"load_default_certs` 。" #: ../../library/ssl.rst:148 msgid "" @@ -201,6 +222,8 @@ msgid "" "variable :envvar:`SSLKEYLOGFILE` is set, :func:`create_default_context` " "enables key logging." msgstr "" +"當系統有支援 :attr:`~SSLContext.keylog_filename` 並且有設定環境變數 :envvar:" +"`SSLKEYLOGFILE` 時 :func:`create_default_context` 會啟用密鑰記錄(logging)。" #: ../../library/ssl.rst:153 msgid "" @@ -208,12 +231,16 @@ msgid "" "restrictive values anytime without prior deprecation. The values represent " "a fair balance between compatibility and security." msgstr "" +"協定、選項、密碼和其它設定可以在不捨棄舊值的情況下直接更改成新的值,這些值代" +"表了在兼容性和安全性之間取得的合理平衡。" #: ../../library/ssl.rst:157 msgid "" "If your application needs specific settings, you should create a :class:" "`SSLContext` and apply the settings yourself." msgstr "" +"如果您的應用程式需要特殊的設定,您應該要自行建立一個 :class:`SSLContext` 並自" +"行調整設定。" #: ../../library/ssl.rst:161 msgid "" @@ -225,28 +252,37 @@ msgid "" "org/wiki/POODLE>`_. If you still wish to continue to use this function but " "still allow SSL 3.0 connections you can re-enable them using::" msgstr "" +"如果您發現某些舊的客戶端或伺服器常適用此函式建立的 :class:`SSLContext` 連線" +"時,收到 \"Protocol or cipher suite mismatch\" 錯誤,這可能是因為他們的系統僅" +"支援 SSL3.0,然而 SSL3.0 已被此函式用 :data:`OP_NO_SSLv3` 排除。目前廣泛認為 " +"SSL3.0 已經 `被完全破解 `_\\。如果您仍" +"然希望在允許 SSL3.0 連線的情況下使用此函式,可以使用下面的方法:\n" +"\n" +"::" #: ../../library/ssl.rst:177 msgid "RC4 was dropped from the default cipher string." -msgstr "" +msgstr "把 RC4 從預設密碼中捨棄。" #: ../../library/ssl.rst:181 msgid "ChaCha20/Poly1305 was added to the default cipher string." -msgstr "" +msgstr "把 ChaCha20/Poly1305 加入預設密碼。" #: ../../library/ssl.rst:183 msgid "3DES was dropped from the default cipher string." -msgstr "" +msgstr "把 3DES 從預設密碼中捨棄。" #: ../../library/ssl.rst:187 msgid "Support for key logging to :envvar:`SSLKEYLOGFILE` was added." -msgstr "" +msgstr "增加了 :envvar:`SSLKEYLOGFILE` 對密鑰記錄(logging)的支持。" #: ../../library/ssl.rst:191 msgid "" "The context now uses :data:`PROTOCOL_TLS_CLIENT` or :data:" "`PROTOCOL_TLS_SERVER` protocol instead of generic :data:`PROTOCOL_TLS`." msgstr "" +"當前內容使用 :data:`PROTOCOL_TLS_CLIENT` 協定或 :data:`PROTOCOL_TLS_SERVER` " +"協定而非通用的 :data:`PROTOCOL_TLS`。" #: ../../library/ssl.rst:197 msgid "Exceptions" From 47f9699bacccff5eb3b1b3696e55b977b16af059 Mon Sep 17 00:00:00 2001 From: timmy Date: Mon, 25 Dec 2023 08:34:22 +0800 Subject: [PATCH 02/12] rebase --- library/ssl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index 6475c8c33a..fdf4740922 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 00:03+0000\n" -"PO-Revision-Date: 2023-12-22 09:26+0800\n" +"POT-Creation-Date: 2023-12-21 18:18+0000\n" +"PO-Revision-Date: 2023-12-21 08:33+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" From 174fd643527333c3d46f221ea4376473e427923e Mon Sep 17 00:00:00 2001 From: timmy Date: Mon, 25 Dec 2023 08:52:06 +0800 Subject: [PATCH 03/12] fix error --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index fdf4740922..f7045b33ec 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -208,7 +208,7 @@ msgid "" "or uses :meth:`SSLContext.load_default_certs` to load default CA " "certificates." msgstr "" -"這些設定包含:data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:" +"這些設定包含::data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:" "data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高加密密碼套件但不包含 " "RC4 和未經身份驗證的密碼套件。如果將 *purpose* 設定為 :const:`~Purpose." "SERVER_AUTH`,則會把 :data:`~SSLContext.verify_mode` 設為 :data:" From 38046f9e9b8d335efa3806f6e8eaa9e82d88d349 Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:48:43 +0800 Subject: [PATCH 04/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index 3bfb75d7f1..9b749a8e65 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -274,7 +274,7 @@ msgstr "把 3DES 從預設密碼中捨棄。" #: ../../library/ssl.rst:187 msgid "Support for key logging to :envvar:`SSLKEYLOGFILE` was added." -msgstr "增加了 :envvar:`SSLKEYLOGFILE` 對密鑰記錄(logging)的支持。" +msgstr "增加了 :envvar:`SSLKEYLOGFILE` 對密鑰記錄 (logging)的支持。" #: ../../library/ssl.rst:191 msgid "" From f968d919561def8f22ded1ca39cb6c9f450fbced Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:49:04 +0800 Subject: [PATCH 05/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index 9b749a8e65..fd94f35a6a 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -255,7 +255,7 @@ msgstr "" "如果您發現某些舊的客戶端或伺服器常適用此函式建立的 :class:`SSLContext` 連線" "時,收到 \"Protocol or cipher suite mismatch\" 錯誤,這可能是因為他們的系統僅" "支援 SSL3.0,然而 SSL3.0 已被此函式用 :data:`OP_NO_SSLv3` 排除。目前廣泛認為 " -"SSL3.0 已經 `被完全破解 `_\\。如果您仍" +"SSL3.0 已經\\ `被完全破解 `_。如果您仍" "然希望在允許 SSL3.0 連線的情況下使用此函式,可以使用下面的方法:\n" "\n" "::" From a368dce32a82a00e6337a2720f38e0583b289f72 Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:49:37 +0800 Subject: [PATCH 06/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index fd94f35a6a..30848cff75 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -239,7 +239,7 @@ msgid "" "If your application needs specific settings, you should create a :class:" "`SSLContext` and apply the settings yourself." msgstr "" -"如果您的應用程式需要特殊的設定,您應該要自行建立一個 :class:`SSLContext` 並自" +"如果你的應用程式需要特殊的設定,你應該要自行建立一個 :class:`SSLContext` 並自" "行調整設定。" #: ../../library/ssl.rst:161 From 0a7943fde8ac1c60a2dbcf65558bf2a36feb9a60 Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:50:04 +0800 Subject: [PATCH 07/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index 30848cff75..d97531fe5a 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -232,7 +232,7 @@ msgid "" "a fair balance between compatibility and security." msgstr "" "協定、選項、密碼和其它設定可以在不捨棄舊值的情況下直接更改成新的值,這些值代" -"表了在兼容性和安全性之間取得的合理平衡。" +"表了在相容性和安全性之間取得的合理平衡。" #: ../../library/ssl.rst:157 msgid "" From 248f08e2cd2db290074a8958e58bf39d247ae7fe Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:50:41 +0800 Subject: [PATCH 08/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index d97531fe5a..afd3c9ab20 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -223,7 +223,7 @@ msgid "" "enables key logging." msgstr "" "當系統有支援 :attr:`~SSLContext.keylog_filename` 並且有設定環境變數 :envvar:" -"`SSLKEYLOGFILE` 時 :func:`create_default_context` 會啟用密鑰記錄(logging)。" +"`SSLKEYLOGFILE` 時 :func:`create_default_context` 會啟用密鑰日誌記錄 (logging)。" #: ../../library/ssl.rst:153 msgid "" From 01680ec01133e911382f6658c7bf632824cbfa0c Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:54:31 +0800 Subject: [PATCH 09/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index afd3c9ab20..370ca5b6e4 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -212,7 +212,7 @@ msgstr "" "data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高加密密碼套件但不包含 " "RC4 和未經身份驗證的密碼套件。如果將 *purpose* 設定為 :const:`~Purpose." "SERVER_AUTH`,則會把 :data:`~SSLContext.verify_mode` 設為 :data:" -"`CERT_REQUIRED` 並使用設定的 CA 憑證(當 *cafile*、*capath*、或 *cadata* 其中" +"`CERT_REQUIRED` 並使用設定的 CA 憑證(當 *cafile*、*capath* 或 *cadata* 其中" "一個值有被設定時) 或使用預設的 CA 憑證 :meth:`SSLContext." "load_default_certs` 。" From 0ceeb476906923a0e513b76b7fb16354dfb2174e Mon Sep 17 00:00:00 2001 From: timmy0123 <48618505+timmy0123@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:54:42 +0800 Subject: [PATCH 10/12] Update library/ssl.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/ssl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index 370ca5b6e4..5575b2b47a 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -208,8 +208,8 @@ msgid "" "or uses :meth:`SSLContext.load_default_certs` to load default CA " "certificates." msgstr "" -"這些設定包含::data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:" -"data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高加密密碼套件但不包含 " +"這些設定包含::data:`PROTOCOL_TLS_CLIENT` 或 :data:`PROTOCOL_TLS_SERVER`、:" +"data:`OP_NO_SSLv2`、以及 :data:`OP_NO_SSLv3`,使用高加密密碼套件但不包含 " "RC4 和未經身份驗證的密碼套件。如果將 *purpose* 設定為 :const:`~Purpose." "SERVER_AUTH`,則會把 :data:`~SSLContext.verify_mode` 設為 :data:" "`CERT_REQUIRED` 並使用設定的 CA 憑證(當 *cafile*、*capath* 或 *cadata* 其中" From b745d7e94157138e7948165239d3cbd99499d1c1 Mon Sep 17 00:00:00 2001 From: timmy Date: Tue, 26 Dec 2023 08:20:23 +0800 Subject: [PATCH 11/12] Update --- library/ssl.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ssl.po b/library/ssl.po index 3bfb75d7f1..e0698fa5eb 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -143,19 +143,19 @@ msgid "" "returns a new context with secure default settings." msgstr "" ":class:`SSLSocket` 實例必須使用 :meth:`SSLContext.wrap_socket` 方法來建立。輔" -"助函式 :func:`create_default_context` 會回傳有安全預設設定的新內容。" +"助函式 :func:`create_default_context` 會回傳有安全預設設定的新語境。" #: ../../library/ssl.rst:82 msgid "Client socket example with default context and IPv4/IPv6 dual stack::" msgstr "" -"使用預設內容及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例:\n" +"使用預設語境及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例:\n" "\n" "::" #: ../../library/ssl.rst:95 msgid "Client socket example with custom context and IPv4::" msgstr "" -"使用自訂內容及 IPv4 的客戶端 socket範例:\n" +"使用自訂語境及 IPv4 的客戶端 socket範例:\n" "\n" "::" @@ -168,7 +168,7 @@ msgstr "" #: ../../library/ssl.rst:121 msgid "Context creation" -msgstr "內容建立" +msgstr "語境建立" #: ../../library/ssl.rst:123 msgid "" @@ -281,7 +281,7 @@ msgid "" "The context now uses :data:`PROTOCOL_TLS_CLIENT` or :data:" "`PROTOCOL_TLS_SERVER` protocol instead of generic :data:`PROTOCOL_TLS`." msgstr "" -"當前內容使用 :data:`PROTOCOL_TLS_CLIENT` 協定或 :data:`PROTOCOL_TLS_SERVER` " +"當前語境使用 :data:`PROTOCOL_TLS_CLIENT` 協定或 :data:`PROTOCOL_TLS_SERVER` " "協定而非通用的 :data:`PROTOCOL_TLS`。" #: ../../library/ssl.rst:197 From babd9e6221f4bf5b9d1b6ac0de5041300aa248a1 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Tue, 26 Dec 2023 15:29:19 +0800 Subject: [PATCH 12/12] Apply suggestions from code review --- library/ssl.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ssl.po b/library/ssl.po index 0b4ca1ff28..845b55ae3a 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -143,7 +143,7 @@ msgid "" "returns a new context with secure default settings." msgstr "" ":class:`SSLSocket` 實例必須使用 :meth:`SSLContext.wrap_socket` 方法來建立。輔" -"助函式 :func:`create_default_context` 會回傳有安全預設設定的新語境。" +"助函式 :func:`create_default_context` 會回傳有安全預設設定的新語境 (context)。" #: ../../library/ssl.rst:82 msgid "Client socket example with default context and IPv4/IPv6 dual stack::"