From bd418b504dca91f99692d2a9c7e089ba2cadd932 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Fri, 11 Aug 2023 02:13:58 +0800 Subject: [PATCH 1/2] feat: translate `library/__future__.po` --- library/__future__.po | 78 ++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 24 deletions(-) diff --git a/library/__future__.po b/library/__future__.po index bcca6e9a8f..307a78aa3e 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -1,15 +1,15 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2023, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: +# Matt Wang , 2023 msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-21 17:35+0000\n" -"PO-Revision-Date: 2016-01-31 07:12+0000\n" -"Last-Translator: Liang-Bo Wang \n" +"PO-Revision-Date: 2023-08-11 02:12+0000\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -20,7 +20,7 @@ msgstr "" #: ../../library/__future__.rst:2 msgid ":mod:`__future__` --- Future statement definitions" -msgstr "" +msgstr ":mod:`__future__` --- Future 陳述式定義" #: ../../library/__future__.rst:7 msgid "**Source code:** :source:`Lib/__future__.py`" @@ -28,13 +28,13 @@ msgstr "**原始碼:**\\ :source:`Lib/__future__.py`" #: ../../library/__future__.rst:11 msgid ":mod:`__future__` is a real module, and serves three purposes:" -msgstr "" +msgstr ":mod:`__future__` 是一個真正的模組,有三個用途:" #: ../../library/__future__.rst:13 msgid "" "To avoid confusing existing tools that analyze import statements and expect " "to find the modules they're importing." -msgstr "" +msgstr "為了避免混淆分析引入陳述式並預期要找到它們正在引入之模組的現有工具。" #: ../../library/__future__.rst:16 msgid "" @@ -42,6 +42,9 @@ msgid "" "2.1 at least yield runtime exceptions (the import of :mod:`__future__` will " "fail, because there was no module of that name prior to 2.1)." msgstr "" +"確保 :ref:`future 陳述式 `\\ 在 2.1 之前的版本中運行至少會產生 " +"runtime 例外( :mod:`__future__` 的引入將會失敗,因為 2.1 之前沒有該名稱的模" +"組)。" #: ../../library/__future__.rst:20 msgid "" @@ -50,22 +53,26 @@ msgid "" "and can be inspected programmatically via importing :mod:`__future__` and " "examining its contents." msgstr "" +"記錄何時出現不相容的變更,以及何時開始強制執行這些變更。這是一種可執行文件的" +"形式,可以透過引入 :mod:`__future__` 並檢查其內容以程式化的方式進行檢查。" #: ../../library/__future__.rst:25 msgid "Each statement in :file:`__future__.py` is of the form::" -msgstr "" +msgstr ":file:`__future__.py` 中的每個陳述式的形式如下: ::" #: ../../library/__future__.rst:31 msgid "" "where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both " "are 5-tuples of the same form as :data:`sys.version_info`::" msgstr "" +"通常,*OptionalRelease* 會小於 *MandatoryRelease*,且兩者都是與 :data:`sys." +"version_info` 形式相同的 5 元組 (5-tuple): ::" #: ../../library/__future__.rst:41 msgid "" "*OptionalRelease* records the first release in which the feature was " "accepted." -msgstr "" +msgstr "*OptionalRelease* 記錄接受該功能的第一個版本。" #: ../../library/__future__.rst:43 msgid "" @@ -73,6 +80,8 @@ msgid "" "*MandatoryRelease* predicts the release in which the feature will become " "part of the language." msgstr "" +"如果 *MandatoryRelease* 尚未發生,*MandatoryRelease* 會預測該功能將成為該語言" +"一部分的版本。" #: ../../library/__future__.rst:47 msgid "" @@ -81,18 +90,22 @@ msgid "" "statement to use the feature in question, but may continue to use such " "imports." msgstr "" +"否則 *MandatoryRelease* 會記錄該功能是何時成為語言的一部分;在該版本或之後的" +"版本中,模組不再需要 future 聲明來使用相關功能,但可以繼續使用此種引入方式。" #: ../../library/__future__.rst:51 msgid "" "*MandatoryRelease* may also be ``None``, meaning that a planned feature got " "dropped." -msgstr "" +msgstr "*MandatoryRelease* 也可能是 ``None``,這意味著計劃中的功能被丟棄。" #: ../../library/__future__.rst:54 msgid "" "Instances of class :class:`_Feature` have two corresponding methods, :meth:" "`getOptionalRelease` and :meth:`getMandatoryRelease`." msgstr "" +":class:`_Feature` 類別的實例有兩個相應的方法::meth:`getOptionalRelease` 和 :" +"meth:`getMandatoryRelease`。" #: ../../library/__future__.rst:57 msgid "" @@ -101,6 +114,9 @@ msgid "" "dynamically compiled code. This flag is stored in the :attr:`compiler_flag` " "attribute on :class:`_Feature` instances." msgstr "" +"*CompilerFlag* 是(位元欄位 (bitfield))旗標,應在第四個引數中傳遞給內建函" +"式 :func:`compile` 以在動態編譯的程式碼中啟用該功能。此旗標存儲在 :class:" +"`_Feature` 實例上的 :attr:`compiler_flag` 屬性中。" #: ../../library/__future__.rst:62 msgid "" @@ -108,22 +124,24 @@ msgid "" "its introduction in Python 2.1 the following features have found their way " "into the language using this mechanism:" msgstr "" +"不會從 :mod:`__future__` 中刪除任何功能描述。自從在 Python 2.1 中引入以來,以" +"下功能已透過這種機制引入到該語言中:" #: ../../library/__future__.rst:67 msgid "feature" -msgstr "" +msgstr "功能" #: ../../library/__future__.rst:67 msgid "optional in" -msgstr "" +msgstr "可選的" #: ../../library/__future__.rst:67 msgid "mandatory in" -msgstr "" +msgstr "強制性的" #: ../../library/__future__.rst:67 msgid "effect" -msgstr "" +msgstr "影響" #: ../../library/__future__.rst:69 msgid "nested_scopes" @@ -139,11 +157,11 @@ msgstr "2.2" #: ../../library/__future__.rst:69 msgid ":pep:`227`: *Statically Nested Scopes*" -msgstr "" +msgstr ":pep:`227`: *靜態巢狀作用域 (Statically Nested Scopes)*" #: ../../library/__future__.rst:72 msgid "generators" -msgstr "" +msgstr "generators" #: ../../library/__future__.rst:72 msgid "2.2.0a1" @@ -155,11 +173,11 @@ msgstr "2.3" #: ../../library/__future__.rst:72 msgid ":pep:`255`: *Simple Generators*" -msgstr "" +msgstr ":pep:`255`: *簡單產生器 (Simple Generators)*" #: ../../library/__future__.rst:75 msgid "division" -msgstr "" +msgstr "division" #: ../../library/__future__.rst:75 msgid "2.2.0a2" @@ -172,7 +190,7 @@ msgstr "3.0" #: ../../library/__future__.rst:75 msgid ":pep:`238`: *Changing the Division Operator*" -msgstr "" +msgstr ":pep:`238`: *更改除法運算子 (Changing the Division Operator)*" #: ../../library/__future__.rst:78 msgid "absolute_import" @@ -185,6 +203,8 @@ msgstr "2.5.0a1" #: ../../library/__future__.rst:78 msgid ":pep:`328`: *Imports: Multi-Line and Absolute/Relative*" msgstr "" +":pep:`328`: *引入:多列與絕對/相對 (Imports: Multi-Line and Absolute/" +"Relative)*" #: ../../library/__future__.rst:81 msgid "with_statement" @@ -196,7 +216,7 @@ msgstr "2.6" #: ../../library/__future__.rst:81 msgid ":pep:`343`: *The \"with\" Statement*" -msgstr "" +msgstr ":pep:`343`: *\"with\" 陳述式 (The \"with\" Statement)*" #: ../../library/__future__.rst:84 msgid "print_function" @@ -208,7 +228,7 @@ msgstr "2.6.0a2" #: ../../library/__future__.rst:84 msgid ":pep:`3105`: *Make print a function*" -msgstr "" +msgstr ":pep:`3105`: *使 print 成為一個函式 (Make print a function)*" #: ../../library/__future__.rst:87 msgid "unicode_literals" @@ -217,6 +237,7 @@ msgstr "unicode_literals" #: ../../library/__future__.rst:87 msgid ":pep:`3112`: *Bytes literals in Python 3000*" msgstr "" +":pep:`3112`: *Python 3000 中的位元組字面值 (Bytes literals in Python 3000)*" #: ../../library/__future__.rst:90 msgid "generator_stop" @@ -233,10 +254,12 @@ msgstr "3.7" #: ../../library/__future__.rst:90 msgid ":pep:`479`: *StopIteration handling inside generators*" msgstr "" +":pep:`479`: *產生器內部的 StopIteration 處理 (StopIteration handling inside " +"generators)*" #: ../../library/__future__.rst:93 msgid "annotations" -msgstr "" +msgstr "annotations" #: ../../library/__future__.rst:93 msgid "3.7.0b1" @@ -248,7 +271,7 @@ msgstr "TBD [1]_" #: ../../library/__future__.rst:93 msgid ":pep:`563`: *Postponed evaluation of annotations*" -msgstr "" +msgstr ":pep:`563`: *推遲對註釋的求值 (Postponed evaluation of annotations)*" #: ../../library/__future__.rst:100 msgid "" @@ -260,6 +283,13 @@ msgid "" "python-dev@python.org/message/VIZEBX5EYMSYIJNDBF6DMUMZOCWHARSO/>`__). No " "final decision has been made yet. See also :pep:`563` and :pep:`649`." msgstr "" +"之前原本計劃在 Python 3.10 中強制使用 ``from __future__ import " +"annotations``,但 Python 指導委員會 (Python Steering Council) 兩次決議推遲這" +"一變動(`Python 3.10 的公告 `__;`Python 3.11 的" +"公告 `__)。還尚未做出最終決定。另請參閱 :pep:" +"`563` 和 :pep:`649`。" #: ../../library/__future__.rst:110 msgid ":ref:`future`" @@ -267,4 +297,4 @@ msgstr ":ref:`future`" #: ../../library/__future__.rst:111 msgid "How the compiler treats future imports." -msgstr "" +msgstr "編譯器如何處理 future 引入。" From 98c3218e93480977689cfb39612f1c5cdb108392 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Sat, 12 Aug 2023 09:10:56 +0800 Subject: [PATCH 2/2] fix library/__future__.po based on review comments --- library/__future__.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/__future__.po b/library/__future__.po index 307a78aa3e..7ed9891f84 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -72,7 +72,7 @@ msgstr "" msgid "" "*OptionalRelease* records the first release in which the feature was " "accepted." -msgstr "*OptionalRelease* 記錄接受該功能的第一個版本。" +msgstr "*OptionalRelease* 記錄該功能首次發布時的 Python 版本。" #: ../../library/__future__.rst:43 msgid "" @@ -80,7 +80,7 @@ msgid "" "*MandatoryRelease* predicts the release in which the feature will become " "part of the language." msgstr "" -"如果 *MandatoryRelease* 尚未發生,*MandatoryRelease* 會預測該功能將成為該語言" +"如果 *MandatoryRelease* 尚未發布,*MandatoryRelease* 會預測該功能將成為該語言" "一部分的版本。" #: ../../library/__future__.rst:47 @@ -133,11 +133,11 @@ msgstr "功能" #: ../../library/__future__.rst:67 msgid "optional in" -msgstr "可選的" +msgstr "可選的版本" #: ../../library/__future__.rst:67 msgid "mandatory in" -msgstr "強制性的" +msgstr "強制性的版本" #: ../../library/__future__.rst:67 msgid "effect" @@ -288,7 +288,7 @@ msgstr "" "一變動(`Python 3.10 的公告 `__;`Python 3.11 的" "公告 `__)。還尚未做出最終決定。另請參閱 :pep:" +"VIZEBX5EYMSYIJNDBF6DMUMZOCWHARSO/>`__)。目前還尚未做出決定。另請參閱 :pep:" "`563` 和 :pep:`649`。" #: ../../library/__future__.rst:110