# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2023, Xorbits Inc.
# This file is distributed under the same license as the Xinference package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Xinference\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-07 15:03+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: zh_TW <LL@li.org>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Generated-By: Babel 2.18.0\n"

#: ../../source/development/contributing_codebase.rst:3
msgid "Contributing to the code base"
msgstr "程式碼庫開發指南"

#: ../../source/development/contributing_codebase.rst:6
msgid "Table of contents:"
msgstr "目錄"

#: ../../source/development/contributing_codebase.rst:9
msgid "Code standards"
msgstr "程式碼規範"

#: ../../source/development/contributing_codebase.rst:11
msgid ""
"Writing good code is not just about what you write. It is also about *how* "
"you write it. During Continuous Integration testing, several tools will be "
"run to check your code for stylistic errors. Good style is a requirement for"
" submitting code to Xinference."
msgstr ""
"寫出好的程式碼不僅在於你寫了什麼，更在於你是如何寫的。在持續整合測試期間，會有多個工具來檢查您的程式碼是否存在風格錯誤。良好的程式設計風格是提交程式碼到"
" Xinference 的要求之一。"

#: ../../source/development/contributing_codebase.rst:15
msgid ""
"In addition, it is important that we do not make sudden changes to the code "
"that could have the potential to break a lot of user code as a result. "
"Therefore we need it to be as backwards compatible as possible to avoid mass"
" breakages."
msgstr "此外，不要對程式碼進行突然的更改，這可能會導致大量用戶程式碼出現問題。所以，我們需要盡可能地保持向後相容，以避免大規模的故障。"

#: ../../source/development/contributing_codebase.rst:20
msgid "Autofixing formatting errors"
msgstr "自動修復格式錯誤"

#: ../../source/development/contributing_codebase.rst:22
msgid ""
"Moreover, Continuous Integration will run code formatting checks like "
"``black``, ``flake8``, ``isort``, and others using `pre-commit hooks "
"<https://pre-commit.com/>`_ Any warnings generated by these checks will "
"cause the Continuous Integration to fail. Therefore, it is advisable to run "
"the check yourself before submitting code. This can be done by installing "
"``pre-commit``::"
msgstr "此外，持續整合將使用 `pre-commit hooks <https://pre-commit.com/>`_ 執行如 ``black``"
"、``flake8``、``isort`` 等程式碼格式檢查工具。任何由這些檢查產生的警告都將導致持續整合失敗。因此，建議在提交程式碼之前自"
"行執行這些檢查。可以在 Xinference 倉儲的根目錄下安裝 ``pre-commit`` 來完成此操作::"

#: ../../source/development/contributing_codebase.rst:30
msgid "and then running::"
msgstr "然後執行命令::"

#: ../../source/development/contributing_codebase.rst:34
msgid ""
"from the root of the Xinference repository. This setup ensures that all "
"styling checks are automatically executed each time you commit changes "
"without your needing to run each one manually. In addition, using ``pre-"
"commit`` will also allow you to more easily remain up-to-date with our code "
"checks as they change."
msgstr ""
"安裝好後，就能確保每次提交變更時，都會自動執行所有的樣式檢查，無需手動逐一執行。此外，使用 ``pre-commit`` "
"也能讓您更輕鬆地在我們的程式碼檢查發生變更時保持同步。"

#: ../../source/development/contributing_codebase.rst:39
msgid ""
"Note that if needed, you can skip these checks with ``git commit --no-"
"verify``."
msgstr "請注意，如果需要，您可以透過使用 ``git commit --no-verify`` 指令來跳過這些檢查。"

#: ../../source/development/contributing_codebase.rst:41
msgid ""
"If you don't want to use ``pre-commit`` as part of your workflow, you can "
"still use it to run its checks with::"
msgstr "如果您不想將 ``pre-commit`` 作為工作流程的一部分，仍然可以執行以下命令來使用它進行檢查::"

#: ../../source/development/contributing_codebase.rst:46
#: ../../source/development/contributing_codebase.rst:52
msgid "without needing to have done ``pre-commit install`` beforehand."
msgstr "而不需要事先執行 ``pre-commit install``。"

#: ../../source/development/contributing_codebase.rst:48
msgid ""
"If you want to run checks on all recently committed files on upstream/main "
"you can use::"
msgstr "如果您想在所有最近提交的檔案上執行檢查，您可以使用以下命令::"

#: ../../source/development/contributing_codebase.rst:56
msgid ""
"You may consider periodically running ``pre-commit gc`` to clean up repos "
"which are no longer used."
msgstr "您可以考慮定期執行 ``pre-commit gc`` 指令來清理不再使用的儲存庫。"

#: ../../source/development/contributing_codebase.rst:61
msgid ""
"If you have conflicting installations of ``virtualenv``, if could lead to "
"errors - refer to `here <https://github.com/pypa/virtualenv/issues/1875>`_."
msgstr ""
"如果您安裝了衝突的 ``virtualenv`` 版本，可能會導致錯誤 - 可以參考 `這裡 "
"<https://github.com/pypa/virtualenv/issues/1875>`_ 。"

#: ../../source/development/contributing_codebase.rst:64
msgid ""
"Also, due to a `bug in virtualenv "
"<https://github.com/pypa/virtualenv/issues/1986>`_, you may run into issues "
"if you're using conda. To solve this, you can downgrade ``virtualenv`` to "
"version ``20.0.33``."
msgstr ""
"此外，由於 ``virtualenv`` 中的一個 `錯誤 "
"<https://github.com/pypa/virtualenv/issues/1986>`_ ，如果您使用 "
"conda，可能會遇到問題。要解決這個問題，您可以將 ``virtualenv`` 降級到版本 ``20.0.33``。"

#: ../../source/development/contributing_codebase.rst:69
msgid "Backwards compatibility"
msgstr "向後兼容"

#: ../../source/development/contributing_codebase.rst:71
msgid ""
"Please try to maintain backward compatibility. If you think breakage is "
"necessary, clearly state why as part of the pull request. Also, be careful "
"when changing method signatures and add deprecation warnings where needed. "
"Also, add the deprecated sphinx directive to the deprecated functions or "
"methods."
msgstr ""
"請盡量保持向後相容性。如果您認為必須進行變更，請在拉取請求中清楚說明原因。同時，在更改方法簽名時要小心，並在需要時加入棄用警告。此外，為棄用的函式或方法加入棄用的"
" Sphinx 指令。"

#: ../../source/development/contributing_codebase.rst:76
msgid "You'll also need to"
msgstr "此外，您還需要"

#: ../../source/development/contributing_codebase.rst:78
msgid ""
"Write a new test that asserts a warning is issued when calling with the "
"deprecated argument"
msgstr "編寫一個新的測試範例，斷言在呼叫帶有棄用參數時會發出警告。"

#: ../../source/development/contributing_codebase.rst:79
msgid ""
"Update all of Xinference existing tests and code to use the new argument"
msgstr "更新所有 Xinference 現有的測試範例和程式碼，以使用新的參數。"

#: ../../source/development/contributing_codebase.rst:82
msgid "Type hints"
msgstr "類型提示"

#: ../../source/development/contributing_codebase.rst:84
msgid ""
"Xinference strongly encourages the use of :pep:`484` style type hints. New "
"development should contain type hints and pull requests to annotate existing"
" code are accepted as well!"
msgstr ""
"Xinference 強烈鼓勵使用 :pep:`484` 風格的類型提示。新的開發應包含類型提示，並且對現有程式碼進行註解的拉取請求也是可以接受的！"

#: ../../source/development/contributing_codebase.rst:88
msgid "Test-driven development"
msgstr "測試驅動開發"

#: ../../source/development/contributing_codebase.rst:90
msgid ""
"Xinference is serious about testing and strongly encourages contributors to "
"embrace `test-driven development (TDD) <https://en.wikipedia.org/wiki/Test-"
"driven_development>`_. This development process \"relies on the repetition "
"of a very short development cycle: first the developer writes an (initially "
"failing) automated test case that defines a desired improvement or new "
"function, then produces the minimum amount of code to pass that test.\" So, "
"before actually writing any code, you should write your tests. Often the "
"test can be taken from the original GitHub issue. However, it is always "
"worth considering additional use cases and writing corresponding tests."
msgstr ""
"Xinference 非常重視測試，並強烈鼓勵貢獻者採用 `測試驅動開發 (TDD) "
"<https://en.wikipedia.org/wiki/Test-"
"driven_development>`_。這種開發過程「依賴於非常短的開發週期重複：首先，開發者編寫一個（初始為失敗的）自動化測試案例來定義所需的改進或新功能，然後用最少的程式碼來通過該測試。」因此，在實際撰寫任何程式碼之前，您應該先編寫您的測試案例。通常，測試案例可以從原始的"
" GitHub issue 中獲取。然而，值得考慮額外的情況並編寫相應的測試案例。"

#: ../../source/development/contributing_codebase.rst:99
msgid ""
"Adding tests is frequently requested after code is pushed to Xinference. "
"Thus, it is worth getting in the habit of writing tests ahead of time so "
"this is never an issue."
msgstr "在將程式碼推送到 Xinference 之後，經常會要求添加測試範例。因此，養成提前編寫測試範例的習慣非常重要，這樣就不會出現問題。"

#~ msgid "Pre-commit"
#~ msgstr "Pre-commit"
