Skip to content

Commit

Permalink
resolve fuzzy entries
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwang44 committed Dec 29, 2024
1 parent 951548b commit cc91a25
Show file tree
Hide file tree
Showing 37 changed files with 685 additions and 261 deletions.
8 changes: 4 additions & 4 deletions c-api/object.po
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ msgstr ""

#: ../../c-api/object.rst:20
msgid "Constant Identifier"
msgstr ""
msgstr "常數識別字"

#: ../../c-api/object.rst:20
msgid "Value"
msgstr ""
msgstr "數值"

#: ../../c-api/object.rst:20
msgid "Returned object"
msgstr ""
msgstr "回傳物件"

#: ../../c-api/object.rst:22 ../../c-api/object.rst:27
msgid "``0``"
Expand Down Expand Up @@ -126,7 +126,7 @@ msgstr ""

#: ../../c-api/object.rst:42
msgid "In CPython, all of these constants are :term:`immortal`."
msgstr ""
msgstr "在 CPython 中,所有這些常數都是\\ :term:`不滅 <immortal>`\\ 的。"

#: ../../c-api/object.rst:47
msgid ""
Expand Down
2 changes: 1 addition & 1 deletion faq/library.po
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ msgstr "``uniform(a, b)`` 會選擇 [a, b) 範圍內的浮點數。"
#: ../../faq/library.rst:805
msgid ""
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
msgstr "``normalvariate(mean, sdev)`` 對常態(高斯)分佈進行採樣 (sample)。"
msgstr "``normalvariate(mean, sdev)`` 對常態(高斯)分佈進行取樣 (sample)。"

#: ../../faq/library.rst:807
msgid "Some higher-level functions operate on sequences directly, such as:"
Expand Down
11 changes: 8 additions & 3 deletions faq/programming.po
Original file line number Diff line number Diff line change
Expand Up @@ -4205,7 +4205,7 @@ msgid ""
msgstr ""
"模組可以透過查看預定義的全域變數 ``__name__`` 來找出自己的模組名稱。如果它的"
"值為``'__main__'``,則該程式作為腳本運行。許多通常透過引入使用的模組還提供命"
"令行界面或自檢,只有在檢查 ``__name__`` 後才執行此程式碼: ::"
"令行介面或自檢,只有在檢查 ``__name__`` 後才執行此程式碼: ::"

#: ../../faq/programming.rst:2134
msgid ""
Expand All @@ -4216,11 +4216,16 @@ msgid ""
"if __name__ == '__main__':\n"
" main()"
msgstr ""
"def main():\n"
" print('Running test...')\n"
" ...\n"
"\n"
"if __name__ == '__main__':\n"
" main()"

#: ../../faq/programming.rst:2143
#, fuzzy
msgid "How can I have modules that mutually import each other?"
msgstr "我怎樣才能擁有相互引入的模組?"
msgstr "要怎樣才能擁有相互引入的模組?"

#: ../../faq/programming.rst:2145
msgid "Suppose you have the following modules:"
Expand Down
45 changes: 38 additions & 7 deletions howto/argparse-optparse.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,41 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"

#: ../../howto/argparse-optparse.rst:8
#, fuzzy
msgid "Migrating ``optparse`` code to ``argparse``"
msgstr "升級 optparse 程式碼"
msgstr "將 ``optparse`` 程式碼遷移到 ``argparse``"

#: ../../howto/argparse-optparse.rst:10
msgid ""
"The :mod:`argparse` module offers several higher level features not natively "
"provided by the :mod:`optparse` module, including:"
msgstr ""
":mod:`argparse` 模組提供了一些高階功能,這些功能在 :mod:`optparse` 模組中並未"
"原生提供,包括:"

#: ../../howto/argparse-optparse.rst:13
msgid "Handling positional arguments."
msgstr ""
msgstr "處理位置引數。"

#: ../../howto/argparse-optparse.rst:14
msgid "Supporting subcommands."
msgstr ""
msgstr "支援子命令。"

#: ../../howto/argparse-optparse.rst:15
msgid "Allowing alternative option prefixes like ``+`` and ``/``."
msgstr ""
msgstr "允許替代選項前綴,如 ``+`` 和 ``/``。"

#: ../../howto/argparse-optparse.rst:16
msgid "Handling zero-or-more and one-or-more style arguments."
msgstr ""
"處理零或多個 (zero-or-more) 和一個或多個 (and one-or-more) 樣式的引數。"

#: ../../howto/argparse-optparse.rst:17
msgid "Producing more informative usage messages."
msgstr ""
msgstr "產生更多資訊的使用訊息。"

#: ../../howto/argparse-optparse.rst:18
msgid "Providing a much simpler interface for custom ``type`` and ``action``."
msgstr ""
msgstr "為自訂 ``type`` 和 ``action`` 提供了一個更簡單的介面。"

#: ../../howto/argparse-optparse.rst:20
msgid ""
Expand All @@ -60,32 +62,44 @@ msgid ""
"named options and positional arguments in the declarative interface mean "
"that the API has diverged from that of ``optparse`` over time."
msgstr ""
"最初 :mod:`argparse` 模組試圖保持與 :mod:`optparse` 的相容性,但在基礎設計上"
"的存在差異 -- 支援宣告式 (declarative) 命令列選項處理 (同時將位置引數處理留給"
"應用程式的程式碼) 和在宣告式介面中支援命名選項 (named options) 和位置引數 -- "
"代表 API 隨著時間的推移已經與 ``optparse`` API 分歧。"

#: ../../howto/argparse-optparse.rst:27
msgid ""
"As described in :ref:`choosing-an-argument-parser`, applications that are "
"currently using :mod:`optparse` and are happy with the way it works can just "
"continue to use ``optparse``."
msgstr ""
"如 :ref:`choosing-an-argument-parser` 中所述,目前使用 :mod:`optparse` 並對其"
"運作方式滿意的應用程式可以繼續使用 ``optparse``。"

#: ../../howto/argparse-optparse.rst:31
msgid ""
"Application developers that are considering migrating should also review the "
"list of intrinsic behavioural differences described in that section before "
"deciding whether or not migration is desirable."
msgstr ""
"在決定是否遷移之前,應用程式開發人員應該先檢閱該段落中描述的內在行為差異清"
"單,來決定是否值得遷移。"

#: ../../howto/argparse-optparse.rst:35
msgid ""
"For applications that do choose to migrate from :mod:`optparse` to :mod:"
"`argparse`, the following suggestions should be helpful:"
msgstr ""
"對於選擇從 :mod:`optparse` 遷移到 :mod:`argparse` 的應用程式,以下建議應會有"
"所幫助:"

#: ../../howto/argparse-optparse.rst:38
msgid ""
"Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:"
"`ArgumentParser.add_argument` calls."
msgstr ""
"將所有 :meth:`optparse.OptionParser.add_option` 呼叫替換為 :meth:"
"`ArgumentParser.add_argument` 呼叫。"

#: ../../howto/argparse-optparse.rst:41
msgid ""
Expand All @@ -94,42 +108,59 @@ msgid ""
"for the positional arguments. Keep in mind that what was previously called "
"``options``, now in the :mod:`argparse` context is called ``args``."
msgstr ""
"將 ``(options, args) = parser.parse_args()`` 替換為 ``args = parser."
"parse_args()``,並為位置引數新增額外的 :meth:`ArgumentParser.add_argument` 呼"
"叫。請記住,以前稱為 ``options`` 的東西,在 :mod:`argparse` 情境中現在稱為 "
"``args``。"

#: ../../howto/argparse-optparse.rst:46
msgid ""
"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :"
"meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:"
"`~ArgumentParser.parse_args`."
msgstr ""
"使用 :meth:`~ArgumentParser.parse_intermixed_args` 來替換掉 :meth:`optparse."
"OptionParser.disable_interspersed_args`,而不是使用 :meth:`~ArgumentParser."
"parse_args`。"

#: ../../howto/argparse-optparse.rst:50
msgid ""
"Replace callback actions and the ``callback_*`` keyword arguments with "
"``type`` or ``action`` arguments."
msgstr ""
"將回呼動作和 ``callback_*`` 關鍵字引數替換為 ``type`` 或 ``action`` 引數。"

#: ../../howto/argparse-optparse.rst:53
msgid ""
"Replace string names for ``type`` keyword arguments with the corresponding "
"type objects (e.g. int, float, complex, etc)."
msgstr ""
"將 ``type`` 關鍵字引數的字串名稱替換為相應的類型物件 (例如 int、float、"
"complex 等)。"

#: ../../howto/argparse-optparse.rst:56
msgid ""
"Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse."
"OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`."
msgstr ""
"將 :class:`optparse.Values` 替換為 :class:`Namespace`,並將 :exc:`optparse."
"OptionError` 和 :exc:`optparse.OptionValueError` 替換為 :exc:"
"`ArgumentError`。"

#: ../../howto/argparse-optparse.rst:60
msgid ""
"Replace strings with implicit arguments such as ``%default`` or ``%prog`` "
"with the standard Python syntax to use dictionaries to format strings, that "
"is, ``%(default)s`` and ``%(prog)s``."
msgstr ""
"將隱式引數的字串,如 ``%default`` 或 ``%prog`` 替換為使用字典來格式化字串的標"
"準 Python 語法,即 ``%(default)s`` 和 ``%(prog)s``。"

#: ../../howto/argparse-optparse.rst:64
msgid ""
"Replace the OptionParser constructor ``version`` argument with a call to "
"``parser.add_argument('--version', action='version', version='<the "
"version>')``."
msgstr ""
"將 OptionParser 建構函式的 ``version`` 引數替換為呼叫 ``parser."
"add_argument('--version', action='version', version='<the version>')``。"
16 changes: 6 additions & 10 deletions howto/argparse.po
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ msgid ""
"``optparse``, so some aspects of this tutorial will also be relevant to "
"``optparse`` users."
msgstr ""
"標準函式庫包含另外兩個與命令列參數處理直接相關的函式庫:較低階的 :mod:"
"`optparse` 模組(可能需要更多程式碼來為給定應用程式設定,但也允許應用程式要"
"求 ``argparse`` 不支援的行為),以及非常低階的 :mod:`getopt`\\ (專門用作 C "
"程式設計師可用的 :c:func:`!getopt` 函式系列的等價)。雖然這個指南並未直接涵蓋"
"這些模組,但 ``argparse`` 的許多核心概念最初來自於 ``optparse``,因此本教學的"
"某些部分也適用於 ``optparse`` 使用者。"

#: ../../howto/argparse.rst:29
msgid "Concepts"
Expand Down Expand Up @@ -1733,13 +1739,3 @@ msgid ""
msgstr ""
":mod:`argparse` 模組提供的功能比此篇內容的要多得多。它的文件非常詳細與透徹並"
"有很多範例。讀完本教學後,你應該可以輕鬆消化它們,而不會感到不知所措。"

#~ msgid ""
#~ "There are two other modules that fulfill the same task, namely :mod:"
#~ "`getopt` (an equivalent for ``getopt()`` from the C language) and the "
#~ "deprecated :mod:`optparse`. Note also that :mod:`argparse` is based on :"
#~ "mod:`optparse`, and therefore very similar in terms of usage."
#~ msgstr ""
#~ "另外還有兩個模組可以完成相同的任務,即 :mod:`getopt`\\ (相當於 C 語言中"
#~ "的 ``getopt()``)和已棄用的 :mod:`optparse`。另請注意,:mod:`argparse` 是"
#~ "基於 :mod:`optparse` 的,因此在用法上非常相似。"
23 changes: 11 additions & 12 deletions howto/free-threading-python.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
Expand All @@ -20,7 +19,7 @@ msgstr ""

#: ../../howto/free-threading-python.rst:5
msgid "Python experimental support for free threading"
msgstr ""
msgstr "Python 自由執行緒的實驗性支援"

#: ../../howto/free-threading-python.rst:7
msgid ""
Expand Down Expand Up @@ -54,7 +53,7 @@ msgstr ""

#: ../../howto/free-threading-python.rst:28
msgid "Installation"
msgstr ""
msgstr "安裝"

#: ../../howto/free-threading-python.rst:30
msgid ""
Expand Down Expand Up @@ -130,7 +129,7 @@ msgstr "https://hugovk.github.io/free-threaded-wheels/"

#: ../../howto/free-threading-python.rst:75
msgid "Thread safety"
msgstr ""
msgstr "執行緒安全"

#: ../../howto/free-threading-python.rst:77
msgid ""
Expand All @@ -153,7 +152,7 @@ msgstr ""

#: ../../howto/free-threading-python.rst:94
msgid "Known limitations"
msgstr ""
msgstr "已知限制"

#: ../../howto/free-threading-python.rst:96
msgid ""
Expand All @@ -162,7 +161,7 @@ msgstr ""

#: ../../howto/free-threading-python.rst:99
msgid "Immortalization"
msgstr ""
msgstr "不滅化 (Immortalization)"

#: ../../howto/free-threading-python.rst:101
msgid ""
Expand All @@ -182,23 +181,23 @@ msgstr ""
#: ../../howto/free-threading-python.rst:109
msgid ""
":ref:`function <user-defined-funcs>` objects declared at the module level"
msgstr ""
msgstr "在模組層級宣告的\\ :ref:`函式 <user-defined-funcs>`\\ 物件"

#: ../../howto/free-threading-python.rst:110
msgid ":ref:`method <instance-methods>` descriptors"
msgstr ""
msgstr ":ref:`方法 <instance-methods>`\\ 描述器"

#: ../../howto/free-threading-python.rst:111
msgid ":ref:`code <code-objects>` objects"
msgstr ""
msgstr ":ref:`程式碼 <code-objects>`\\ 物件"

#: ../../howto/free-threading-python.rst:112
msgid ":term:`module` objects and their dictionaries"
msgstr ""
msgstr ":term:`模組 <module>`\\ 物件及其字典"

#: ../../howto/free-threading-python.rst:113
msgid ":ref:`classes <classes>` (type objects)"
msgstr ""
msgstr ":ref:`類別 <classes>`\\ (型別物件)"

#: ../../howto/free-threading-python.rst:115
msgid ""
Expand Down Expand Up @@ -241,7 +240,7 @@ msgstr ""

#: ../../howto/free-threading-python.rst:143
msgid "Single-threaded performance"
msgstr ""
msgstr "單執行緒效能"

#: ../../howto/free-threading-python.rst:145
msgid ""
Expand Down
Loading

0 comments on commit cc91a25

Please sign in to comment.