diff --git a/tutorial/appetite.po b/tutorial/appetite.po index 54ee7d8a27..55aceab567 100644 --- a/tutorial/appetite.po +++ b/tutorial/appetite.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2018, Python Software Foundation +# Copyright (C) 2001-2021, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -7,10 +7,10 @@ # Liang-Bo Wang , 2016 msgid "" msgstr "" -"Project-Id-Version: Python 3.7\n" +"Project-Id-Version: Python 3.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-06-26 18:54+0800\n" -"PO-Revision-Date: 2017-09-22 18:27+0000\n" +"PO-Revision-Date: 2021-06-06 13:25+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -19,6 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 2.4.3\n" #: ../../tutorial/appetite.rst:5 msgid "Whetting Your Appetite" @@ -81,10 +82,10 @@ msgid "" "in Python as in those languages." msgstr "" "Python 即便易用也是個貨真價實的程式語言。它提供比 shell 腳本、批次檔更多樣的" -"程式架構與更多的支援。另一方面,Python 提供比 C 更豐富的錯語檢查。相較於 C ," +"程式架構與更多的支援。另一方面,Python 提供比 C 更豐富的錯語檢查。相較於 C," "Python 作為一個「非常高階的程式語言」,它內建了高階的資料型別如彈性的數列與字" -"典。因為這些多用途的資料型別, Python 適用解決比 Awk (甚至是 Perl)能處理的" -"更多問題上。至少在許多事情中,使用 Python 處理起來跟其他語言是同樣容易的。" +"典。因為這些多用途的資料型別,Python 適用解決比 Awk(甚至是 Perl)能處理的更" +"多問題上。至少在許多事情中,使用 Python 處理起來跟其他語言是同樣容易的。" #: ../../tutorial/appetite.rst:37 msgid "" @@ -96,9 +97,9 @@ msgid "" "interface toolkits like Tk." msgstr "" "Python 允許你把程式切割成許多模組 (module) 並將他們重覆運用至其他 Python 程式" -"中。Python 自帶了一個很大集合的標準模組,它們能做為你程式的基礎 --- 或把它們" -"當作一開始學寫 Python 程式的範例。有些模組提供了如檔案 I/O、系統呼叫、socket " -"的功能,甚至提供了 Tk 等圖形介面工具庫 (GUI toolkit) 的介面。" +"中。Python 自帶了一個很大集合的標準模組,它們能做為你程式的基礎——或把它們當作" +"一開始學寫 Python 程式的範例。有些模組提供了如檔案 I/O、系統呼叫、socket 的功" +"能,甚至提供了 Tk 等圖形介面工具庫 (GUI toolkit) 的介面。" #: ../../tutorial/appetite.rst:44 msgid "" @@ -126,17 +127,17 @@ msgstr "" msgid "" "the high-level data types allow you to express complex operations in a " "single statement;" -msgstr "Python 高階的資料型別能在一陳述句 (statement) 中表達很複雜的操作;" +msgstr "Python 高階的資料型別能在一陳述式 (statement) 中表達很複雜的操作;" #: ../../tutorial/appetite.rst:57 msgid "" "statement grouping is done by indentation instead of beginning and ending " "brackets;" -msgstr "陳述句的段落以縮排為區格而非括號;" +msgstr "陳述式的段落以縮排為區隔而非括號;" #: ../../tutorial/appetite.rst:60 msgid "no variable or argument declarations are necessary." -msgstr "不需要宣告變數和引數;" +msgstr "不需要宣告變數和引數。" #: ../../tutorial/appetite.rst:62 msgid "" @@ -150,7 +151,7 @@ msgid "" msgstr "" "Python 是\\ *可擴充的*\\ :如果你會寫 C 程式,那麼要加個新的內建函式或模組到" "直譯器中是很容易的。無論是為了用最快速的執行速度完成一些關鍵的操作,或是讓 " -"Python 連結到一些僅以二進元形式 (binary form) 釋出的程式庫(例如特定供應商的" +"Python 連結到一些僅以二進位形式 (binary form) 釋出的程式庫(例如特定供應商的" "繪圖程式庫)。如果你想更多這樣的結合,你其實也可以把 Python 直譯器連結到用 C " "寫的應用程式,並在該應用程式中使用 Python 寫擴充或者作為下達指令的語言。" @@ -191,6 +192,6 @@ msgid "" "advanced concepts like exceptions and user-defined classes." msgstr "" "接下來的教學裡,將會透過許多範例介紹 Python 語言與其系統的諸多特色。一開始是" -"簡單的表示句 (expression)、陳述句 (statement) 和資料型別 (data type);接著是" -"函式(function) 與模組 (module);最後會接觸一些較進階的主題如例外狀況 " +"簡單的運算式 (expression)、陳述式 (statement) 和資料型別 (data type);接著是" +"函式 (function) 與模組 (module);最後會接觸一些較進階的主題如例外 " "(exception) 與使用者自定義類別 (class)。" diff --git a/tutorial/stdlib.po b/tutorial/stdlib.po index ff0405cbdb..da82eb3f9b 100644 --- a/tutorial/stdlib.po +++ b/tutorial/stdlib.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2018, Python Software Foundation +# Copyright (C) 2001-2021, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -8,12 +8,13 @@ # woodrow-shen , 2015-2016 # Jason , 2016 # 文俊 高 , 2016 +# Steven Hsu , 2021 msgid "" msgstr "" -"Project-Id-Version: Python 3.7\n" +"Project-Id-Version: Python 3.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-06-20 18:08+0800\n" -"PO-Revision-Date: 2018-10-13 15:32+0800\n" +"PO-Revision-Date: 2021-06-29 23:01+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -22,7 +23,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.2\n" +"X-Generator: Poedit 2.4.3\n" #: ../../tutorial/stdlib.rst:5 msgid "Brief Tour of the Standard Library" @@ -47,8 +48,8 @@ msgid "" "This will keep :func:`os.open` from shadowing the built-in :func:`open` " "function which operates much differently." msgstr "" -"務必使用 ``import os`` 而非 ``from os import *``。這將避免因系統不同而實作有" -"差異的 :func:`os.open` 覆蓋內建函式 :func:`open`。" +"務必使用 ``import os`` 而非 ``from os import *``。這將避免因系統不同而有實作" +"差異的 :func:`os.open` 覆蓋內建函式 :func:`open`\\ 。" #: ../../tutorial/stdlib.rst:29 msgid "" @@ -56,26 +57,32 @@ msgid "" "interactive aids for working with large modules like :mod:`os`::" msgstr "" "在使用 :mod:`os` 諸如此類大型模組時搭配內建函式 :func:`dir` 和 :func:`help` " -"是非常有用的::" +"是非常有用的:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:38 msgid "" "For daily file and directory management tasks, the :mod:`shutil` module " "provides a higher level interface that is easier to use::" msgstr "" -"對於日常檔案和目錄管理任務, :mod:`shutil` 模組提供了更容易使用的高階介面:\n" +"對於日常檔案和目錄管理任務,\\ :mod:`shutil` 模組提供了更容易使用的高階介" +"面:\n" "\n" "::" #: ../../tutorial/stdlib.rst:51 msgid "File Wildcards" -msgstr "檔案之萬用字元" +msgstr "檔案之萬用字元 (File Wildcards)" #: ../../tutorial/stdlib.rst:53 msgid "" "The :mod:`glob` module provides a function for making file lists from " "directory wildcard searches::" -msgstr " :mod:`glob` 模組提供了一函式可以從目錄萬用字元中搜尋並產生檔案列表::" +msgstr "" +":mod:`glob` 模組提供了一函式可以從目錄萬用字元中搜尋並產生檔案列表:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:64 msgid "Command Line Arguments" @@ -88,9 +95,11 @@ msgid "" "For instance the following output results from running ``python demo.py one " "two three`` at the command line::" msgstr "" -"通用工具腳本常需要處理命令列引數。這些引數會以串列形式存放在 :mod:`sys` 模組" -"的 *argv* 此變數中。例如在命令列執行 ``python demo.py one two three`` 會有以" -"下輸出結果::" +"通用工具腳本常需要處理命令列引數。這些引數會以 list(串列)形式存放在 :mod:" +"`sys` 模組的 *argv* 屬性中。例如在命令列執行 ``python demo.py one two " +"three`` 會有以下輸出結果:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:75 msgid "" @@ -98,6 +107,10 @@ msgid "" "process command line arguments. The following script extracts one or more " "filenames and an optional number of lines to be displayed::" msgstr "" +":mod:`argparse` 模組提供了一種更複雜的機制來處理命令列引數。以下腳本可擷取一" +"個或多個檔案名稱,並可選擇要顯示的行數:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:88 msgid "" @@ -105,6 +118,9 @@ msgid "" "txt``, the script sets ``args.lines`` to ``5`` and ``args.filenames`` to " "``['alpha.txt', 'beta.txt']``." msgstr "" +"當 ``python top.py --lines=5 alpha.txt beta.txt`` 在命令列執行時,該腳本會將 " +"``args.lines`` 設為 ``5``,並將 ``args.filenames`` 設為 ``['alpha.txt', " +"'beta.txt']``。" #: ../../tutorial/stdlib.rst:96 msgid "Error Output Redirection and Program Termination" @@ -116,8 +132,10 @@ msgid "" "*stderr*. The latter is useful for emitting warnings and error messages to " "make them visible even when *stdout* has been redirected::" msgstr "" -":mod:`sys` 模組也有 *stdin*,*stdout*,和 *stderr* 等變數。即使當 *stdout* 被" -"重新導向時,後者 *stderr* 可輸出發送警告和錯誤訊息。" +":mod:`sys` 模組也有 *stdin*,*stdout*,和 *stderr* 等屬性。即使當 *stdout* 被" +"重新導向時,後者 *stderr* 可輸出警告和錯誤訊息:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:105 msgid "The most direct way to terminate a script is to use ``sys.exit()``." @@ -134,15 +152,19 @@ msgid "" "succinct, optimized solutions::" msgstr "" ":mod:`re` 模組提供正規表示式 (regular expression) 做進階的字串處理。當要處理" -"複雜的比對以及操作時,正規表示式是簡潔且經過最佳化的解決方案。" +"複雜的比對以及操作時,正規表示式是簡潔且經過最佳化的解決方案:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:123 msgid "" "When only simple capabilities are needed, string methods are preferred " "because they are easier to read and debug::" msgstr "" -"當只需要簡單的字串操作時,因為可讀性以及方便除錯,字串本身的方法是比較建議" -"的。" +"當只需要簡單的字串操作時,因為可讀性以及方便除錯,字串本身的 method 是比較建" +"議的:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:133 msgid "Mathematics" @@ -152,11 +174,17 @@ msgstr "數學相關" msgid "" "The :mod:`math` module gives access to the underlying C library functions " "for floating point math::" -msgstr ":mod:`math` 模組提供了 C 函式庫中底層的浮點數運算的函式。" +msgstr "" +":mod:`math` 模組提供了 C 函式庫中底層的浮點數運算的函式:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:144 msgid "The :mod:`random` module provides tools for making random selections::" -msgstr ":mod:`random` 模組提供了隨機選擇的工具。" +msgstr "" +":mod:`random` 模組提供了隨機選擇的工具:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:156 msgid "" @@ -164,13 +192,15 @@ msgid "" "mean, median, variance, etc.) of numeric data::" msgstr "" ":mod:`statistics` 模組提供了替數值資料計算基本統計量(包括平均、中位數、變異" -"量數等)的功能。" +"量數等)的功能:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:168 msgid "" "The SciPy project has many other modules for numerical " "computations." -msgstr "Scipy 專案 上也有許多數值計算相關的模組。" +msgstr "SciPy 專案 上也有許多數值計算相關的模組。" #: ../../tutorial/stdlib.rst:174 msgid "Internet Access" @@ -183,11 +213,13 @@ msgid "" "retrieving data from URLs and :mod:`smtplib` for sending mail::" msgstr "" "Python 中有許多存取網路以及處理網路協定。最簡單的兩個例子包括 :mod:`urllib." -"request` 模組可以從網址抓取資料以及 :mod:`smtplib` 可以用來寄郵件。::" +"request` 模組可以從網址抓取資料以及 :mod:`smtplib` 可以用來寄郵件:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:199 msgid "(Note that the second example needs a mailserver running on localhost.)" -msgstr "(注意第二個例子中需要在本地端執行一個郵件伺服器)" +msgstr "(注意第二個例子中需要在本地端執行一個郵件伺服器。)" #: ../../tutorial/stdlib.rst:205 msgid "Dates and Times" @@ -201,9 +233,11 @@ msgid "" "for output formatting and manipulation. The module also supports objects " "that are timezone aware. ::" msgstr "" -":mod:`datetime` 模組中有許多類別供以操作日期以及時間,從簡單從複雜都有。模組" -"支援日期與時間的運算,而實作的重點是有效率的成員擷取以達到輸出格式化以及操" -"作。模組也提供支援時區換算的類別。" +":mod:`datetime` 模組提供許多 class 可以操作日期以及時間,從簡單從複雜都有。模" +"組支援日期與時間的運算,而實作的重點是有效率的成員擷取以達到輸出格式化以及操" +"作。模組也提供支援時區換算的類別。\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:231 msgid "Data Compression" @@ -215,8 +249,9 @@ msgid "" "modules including: :mod:`zlib`, :mod:`gzip`, :mod:`bz2`, :mod:`lzma`, :mod:" "`zipfile` and :mod:`tarfile`. ::" msgstr "" -"常見的解壓縮以及壓縮格式都有直接支援。 包括: :mod:`zlib` , :mod:" -"`gzip` , :mod:`bz2`, :mod:`lzma` ,:mod:`zipfile` 以及 :mod:`tarfile` 。\n" +"常見的解壓縮以及壓縮格式都有直接支援的模組。包括:\\ :mod:`zlib`\\ 、\\ :mod:" +"`gzip`\\ 、\\ :mod:`bz2`\\ 、\\ :mod:`lzma`\\ 、\\ :mod:`zipfile` 以及 :mod:" +"`tarfile`\\ 。\n" "\n" "::" @@ -230,8 +265,8 @@ msgid "" "performance of different approaches to the same problem. Python provides a " "measurement tool that answers those questions immediately." msgstr "" -"有一些 Python 使用者很想了解同個問題的不同實作方法的效能差異。 Python 提供評" -"估了效能差異的工具。" +"有一些 Python 使用者很想了解同個問題的不同實作方法的效能差異。Python 提供了評" +"估效能差異的工具。" #: ../../tutorial/stdlib.rst:259 msgid "" @@ -239,8 +274,10 @@ msgid "" "feature instead of the traditional approach to swapping arguments. The :mod:" "`timeit` module quickly demonstrates a modest performance advantage::" msgstr "" -"舉例來說, 有人可能會試著用 tuple 的打包機制來交換引數代替傳統的方式。 :mod:" -"`timeit` 模組可以迅速地展示效能的進步。" +"舉例來說,有人可能會試著用 tuple 的打包機制來交換引數代替傳統的方式。\\ :mod:" +"`timeit` 模組可以迅速地展示效能的進步:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:269 msgid "" @@ -248,9 +285,9 @@ msgid "" "and :mod:`pstats` modules provide tools for identifying time critical " "sections in larger blocks of code." msgstr "" -"相對於 :mod:`timeit` 模組提供這麼細的粒度,:mod:`profile` 模組以及 :mod:" -"`pstats` 模組則提供了一些在大型的程式碼識別關鍵臨界區間(Critical Section)的" -"工具。" +"相對於 :mod:`timeit` 模組提供這麼細的粒度,\\ :mod:`profile` 模組以及 :mod:" +"`pstats` 模組則提供了一些在大型的程式碼識別時間使用上關鍵的區塊 (time " +"critical section) 的工具。" #: ../../tutorial/stdlib.rst:277 msgid "Quality Control" @@ -262,8 +299,8 @@ msgid "" "function as it is developed and to run those tests frequently during the " "development process." msgstr "" -"達到高品質軟體的一個方法當開發時對每個函式寫測試以及在開發過程中要不斷的跑這" -"些測試。" +"達到高品質軟體的一個方法,是在開發時對每個函式寫測試,以及在開發過程中要不斷" +"地跑這些測試。" #: ../../tutorial/stdlib.rst:283 msgid "" @@ -274,9 +311,10 @@ msgid "" "example and it allows the doctest module to make sure the code remains true " "to the documentation::" msgstr "" -":mod:`doctest` 模組提供了一個工具, 掃描模組並根據程式中內嵌的文件字符串執行" -"測試。測試構造如同簡單的將它的輸出結果剪下並貼上到文件字符串中。 通過用戶提供" -"的例子, 它強化了文件, 允許 doctest 模塊組認代碼的結果是否與文件一致:\n" +":mod:`doctest` 模組提供了一個工具,掃描模組並根據程式中內嵌的文件字串執行測" +"試。撰寫測試如同簡單地將它的呼叫及輸出結果剪下並貼上到文件字串中。透過提供範" +"例給使用者,它強化了說明文件,並允許 doctest 模組確認程式碼的結果與說明文件一" +"致:\n" "\n" "::" @@ -286,8 +324,10 @@ msgid "" "module, but it allows a more comprehensive set of tests to be maintained in " "a separate file::" msgstr "" -":mod:`unittest` 模組不像 :mod:`doctest` 模組這般容易, 但是它提供了更完整的測" -"試集並且可以整合在不同的檔案間。" +":mod:`unittest` 模組不像 :mod:`doctest` 模組這般容易,但是它讓你可以在另外一" +"個檔案裡撰寫更完整的測試集:\n" +"\n" +"::" #: ../../tutorial/stdlib.rst:323 msgid "Batteries Included" @@ -299,8 +339,8 @@ msgid "" "the sophisticated and robust capabilities of its larger packages. For " "example:" msgstr "" -"\"batteries included\" 是 Python設計哲學。\\ 它的好處是可以透過這些套件使用" -"複雜與強大的功能。\\ 例如:" +"\"Batteries included\" 是 Python 的設計哲學。這個理念可以透過使用它的大型套" +"件,感受複雜與強大的功能,來得到印證。例如:" #: ../../tutorial/stdlib.rst:328 msgid "" @@ -308,9 +348,9 @@ msgid "" "remote procedure calls into an almost trivial task. Despite the modules " "names, no direct knowledge or handling of XML is needed." msgstr "" -"使用 :mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模組實現遠端控制看似變更為" -"容易。 使用前也不需要先了解相關知識或是掌握 XML 的技能就能直接透過名稱使用模" -"組。 " +"使用 :mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模組使實作遠端控制變得更為" +"容易。使用前也不需要先了解相關知識或是掌握 XML 的技能,就能直接透過名稱使用模" +"組。" #: ../../tutorial/stdlib.rst:332 msgid "" @@ -322,9 +362,9 @@ msgid "" "and header protocols." msgstr "" "函式庫 :mod:`email` 套件用來管理 MIME 和其他 :rfc:`2822` 相關電子郵件訊息的文" -"件。 相異於其他電子郵件套件 :mod:`smtplib` 和 :mod:`poplib` 這些實際用來發送" -"與接收訊息, 擁有更完整的工具設置提供建置與解析複雜訊息的結構(包含附件檔案)" -"和實現網路傳送之間的解碼與標頭協定。 " +"件。相異於 :mod:`smtplib` 和 :mod:`poplib` 這些實際用來發送與接收訊息的模組," +"email 套件擁有更完整的工具設置提供建置與解析複雜訊息的結構(包含附件檔案)和" +"實作網路傳送之間的解碼與標頭協定。" #: ../../tutorial/stdlib.rst:339 msgid "" @@ -336,10 +376,11 @@ msgid "" "these modules and packages greatly simplify data interchange between Python " "applications and other tools." msgstr "" -"函式庫 :mod:`json` 套件提供 JSON 資料解析強大的交換格式。 :mod:`csv` 模組則提" -"供直接讀寫以逗號分隔值的檔案格式,支援一般資料庫與電子表格。 :mod:`xml.etree." -"ElementTree` , :mod:`xml.dom` 與 :mod:`xml.sax` 套件則支援 XML 流程。 綜觀所" -"有, 這些模組和套件都簡化了 Python 應用程式與其他工具之間的資料交換。 " +":mod:`json` 套件對 JSON 資料交換格式的解析,提供強大的支援。\\ :mod:`csv` 模" +"組則提供直接讀寫以逗號分隔值的檔案格式,支援一般資料庫與電子表格。\\ :mod:" +"`xml.etree.ElementTree`\\ 、\\ :mod:`xml.dom` 與 :mod:`xml.sax` 套件則支援 " +"XML 的處理。綜觀所有,這些模組和套件都簡化了 Python 應用程式與其他工具之間的" +"資料交換。" #: ../../tutorial/stdlib.rst:348 msgid "" @@ -347,16 +388,16 @@ msgid "" "providing a persistent database that can be updated and accessed using " "slightly nonstandard SQL syntax." msgstr "" -":mod:`sqllite3` 套件作為包覆 SQLite 資料庫的函式庫, 提供一個一致性的資料庫用" -"來更新與操作使用些微非標準的 SQL 語法。 " +":mod:`sqllite3` 模組是 SQLite 資料庫函式庫的一層包裝,提供一個具持久性的資料" +"庫,可以使用稍微非標準的 SQL 語法來對它進行更新與存取。" #: ../../tutorial/stdlib.rst:352 msgid "" "Internationalization is supported by a number of modules including :mod:" "`gettext`, :mod:`locale`, and the :mod:`codecs` package." msgstr "" -"有數種支援國際化模組 :mod:`gettext`\\ ,\\ :mod:`locale`\\ ,和 :mod:" -"`codecs` 等套件。 " +"有數種支援國際化的模組,包括 :mod:`gettext`\\ 、\\ :mod:`locale` 和 :mod:" +"`codecs` 等套件。" #~ msgid "" #~ "The :mod:`getopt` module processes *sys.argv* using the conventions of "