From dab7f5b3de6ec7b3b1c1209db4c9b4659b1e8f2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jun 2026 06:58:51 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Update=20translations=20for=20zh?= =?UTF-8?q?-hant=20(update-outdated)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-hant/docs/index.md | 8 ++++---- docs/zh-hant/docs/tutorial/body-multiple-params.md | 4 ++-- docs/zh-hant/docs/tutorial/cookie-params.md | 10 +++++----- docs/zh-hant/docs/tutorial/debugging.md | 2 +- .../docs/tutorial/path-operation-configuration.md | 4 ++-- .../docs/tutorial/path-params-numeric-validations.md | 4 ++-- docs/zh-hant/docs/tutorial/request-files.md | 4 ++-- docs/zh-hant/docs/tutorial/request-forms-and-files.md | 2 +- docs/zh-hant/docs/tutorial/response-status-code.md | 4 ++-- docs/zh-hant/docs/tutorial/testing.md | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/zh-hant/docs/index.md b/docs/zh-hant/docs/index.md index 09974e59d..5a45a69c7 100644 --- a/docs/zh-hant/docs/index.md +++ b/docs/zh-hant/docs/index.md @@ -479,7 +479,7 @@ item: Item * 來自不同來源的**參數**宣告:例如 **headers**、**cookies**、**form fields** 和 **files**。 * 如何設定**驗證限制**,如 `maximum_length` 或 `regex`。 -* 一個非常強大且易用的 **依賴注入** 系統。 +* 一個非常強大且易用的 **依賴注入** 系統。 * 安全與驗證,包含支援 **OAuth2** 搭配 **JWT tokens** 與 **HTTP Basic** 驗證。 * 宣告**深度巢狀 JSON 模型**的進階(但同樣簡單)技巧(感謝 Pydantic)。 * 與 [Strawberry](https://strawberry.rocks) 及其他函式庫的 **GraphQL** 整合。 @@ -492,9 +492,7 @@ item: Item ### 部署你的應用(可選) { #deploy-your-app-optional } -你也可以選擇將 FastAPI 應用部署到 [FastAPI Cloud](https://fastapicloud.com),如果你還沒加入,去登記等候名單吧。🚀 - -如果你已經有 **FastAPI Cloud** 帳號(我們已從等候名單邀請你 😉),你可以用一個指令部署你的應用。 +你可以選擇只用一個指令,將 FastAPI 應用部署到 [FastAPI Cloud](https://fastapicloud.com)。🚀
@@ -510,6 +508,8 @@ Deploying to FastAPI Cloud...
+CLI 會自動偵測你的 FastAPI 應用並將其部署到雲端。若你尚未登入,系統會開啟瀏覽器以完成驗證流程。 + 就這樣!現在你可以在該 URL 造訪你的應用。✨ #### 關於 FastAPI Cloud { #about-fastapi-cloud } diff --git a/docs/zh-hant/docs/tutorial/body-multiple-params.md b/docs/zh-hant/docs/tutorial/body-multiple-params.md index 1c334f51f..e511b2ea5 100644 --- a/docs/zh-hant/docs/tutorial/body-multiple-params.md +++ b/docs/zh-hant/docs/tutorial/body-multiple-params.md @@ -108,7 +108,7 @@ q: str | None = None {* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *} -/// info | 注意 +/// note | 注意 `Body` 也具有與 `Query`、`Path` 以及之後你會看到的其他工具相同的額外驗證與中繼資料參數。 @@ -123,7 +123,7 @@ q: str | None = None 但如果你想讓它像宣告多個 Body 參數時那樣,期望一個帶有 `item` 鍵、其內含模型內容的 JSON,你可以使用 `Body` 的特殊參數 `embed`: ```Python -item: Item = Body(embed=True) +item: Annotated[Item, Body(embed=True)] ``` 如下: diff --git a/docs/zh-hant/docs/tutorial/cookie-params.md b/docs/zh-hant/docs/tutorial/cookie-params.md index cc9d4b682..e24a87ede 100644 --- a/docs/zh-hant/docs/tutorial/cookie-params.md +++ b/docs/zh-hant/docs/tutorial/cookie-params.md @@ -24,19 +24,19 @@ /// -/// info +/// note 要宣告 cookies,你需要使用 `Cookie`,否則參數會被當作查詢參數(query parameters)來解析。 /// -/// info +/// note -請注意,由於瀏覽器以特殊且在背後處理的方式管理 cookies,它們通常不允許 JavaScript 輕易存取它們。 +請注意,由於**瀏覽器會以特殊方式並在背後處理 cookies**,因此**不**容易讓 **JavaScript** 觸碰到它們。 -如果你前往位於 `/docs` 的 API 文件介面,你可以在你的路徑操作(path operations)的文件中看到 cookies 的說明。 +如果你前往位於 `/docs` 的 **API 文件介面**,你可以在你的*路徑操作(path operations)*中看到 cookies 的**文件**。 -但即使你填入資料並點擊「Execute」,由於該文件介面是以 JavaScript 運作,cookies 不會被送出,你會看到一則錯誤訊息,就好像你沒有填任何值一樣。 +但即使你**填入資料**並點擊「Execute」,由於該文件介面是以 **JavaScript** 運作,cookies 不會被送出,你會看到一則**錯誤**訊息,就好像你沒有填任何值一樣。 /// diff --git a/docs/zh-hant/docs/tutorial/debugging.md b/docs/zh-hant/docs/tutorial/debugging.md index 1230ed6cc..9501dec5c 100644 --- a/docs/zh-hant/docs/tutorial/debugging.md +++ b/docs/zh-hant/docs/tutorial/debugging.md @@ -72,7 +72,7 @@ from myapp import app 就不會被執行。 -/// info | 說明 +/// note 想了解更多,參考 [Python 官方文件](https://docs.python.org/3/library/__main__.html)。 diff --git a/docs/zh-hant/docs/tutorial/path-operation-configuration.md b/docs/zh-hant/docs/tutorial/path-operation-configuration.md index 9ca738a98..8461f2521 100644 --- a/docs/zh-hant/docs/tutorial/path-operation-configuration.md +++ b/docs/zh-hant/docs/tutorial/path-operation-configuration.md @@ -72,13 +72,13 @@ {* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[18] *} -/// info | 資訊 +/// note | 注意 請注意,`response_description` 專指回應,而 `description` 則是針對整個「路徑操作」的一般描述。 /// -/// check | 檢查 +/// tip OpenAPI 規範要求每個「路徑操作」都必須有一個回應描述。 diff --git a/docs/zh-hant/docs/tutorial/path-params-numeric-validations.md b/docs/zh-hant/docs/tutorial/path-params-numeric-validations.md index 68eb837e9..fd8bf0cec 100644 --- a/docs/zh-hant/docs/tutorial/path-params-numeric-validations.md +++ b/docs/zh-hant/docs/tutorial/path-params-numeric-validations.md @@ -8,7 +8,7 @@ {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *} -/// info +/// note FastAPI 在 0.95.0 版加入並開始推薦使用 `Annotated`。 @@ -131,7 +131,7 @@ Python 不會對這個 `*` 做任何事,但它會知道後續的所有參數 * `lt`:小於(`l`ess `t`han) * `le`:小於或等於(`l`ess than or `e`qual) -/// info +/// note 你之後會看到的 `Query`、`Path` 與其他類別,都是共同父類別 `Param` 的子類別。 diff --git a/docs/zh-hant/docs/tutorial/request-files.md b/docs/zh-hant/docs/tutorial/request-files.md index 4e20544ea..1d95bf0cd 100644 --- a/docs/zh-hant/docs/tutorial/request-files.md +++ b/docs/zh-hant/docs/tutorial/request-files.md @@ -2,7 +2,7 @@ 你可以使用 `File` 定義由用戶端上傳的檔案。 -/// info +/// note 若要接收上傳的檔案,請先安裝 [`python-multipart`](https://github.com/Kludex/python-multipart)。 @@ -28,7 +28,7 @@ $ pip install python-multipart {* ../../docs_src/request_files/tutorial001_an_py310.py hl[9] *} -/// info +/// note `File` 是直接繼承自 `Form` 的類別。 diff --git a/docs/zh-hant/docs/tutorial/request-forms-and-files.md b/docs/zh-hant/docs/tutorial/request-forms-and-files.md index c508bf7f7..2db9e283b 100644 --- a/docs/zh-hant/docs/tutorial/request-forms-and-files.md +++ b/docs/zh-hant/docs/tutorial/request-forms-and-files.md @@ -2,7 +2,7 @@ 你可以使用 `File` 與 `Form` 同時定義檔案與表單欄位。 -/// info +/// note 要接收上傳的檔案與/或表單資料,請先安裝 [`python-multipart`](https://github.com/Kludex/python-multipart)。 diff --git a/docs/zh-hant/docs/tutorial/response-status-code.md b/docs/zh-hant/docs/tutorial/response-status-code.md index 9ac2e41da..9ed047fa5 100644 --- a/docs/zh-hant/docs/tutorial/response-status-code.md +++ b/docs/zh-hant/docs/tutorial/response-status-code.md @@ -18,7 +18,7 @@ 參數 `status_code` 接受一個數字作為 HTTP 狀態碼。 -/// info | 資訊 +/// note | 注意 `status_code` 也可以接收一個 `IntEnum`,例如 Python 的 [`http.HTTPStatus`](https://docs.python.org/3/library/http.html#http.HTTPStatus)。 @@ -27,7 +27,7 @@ 它會: * 在回應中傳回該狀態碼。 -* 在 OpenAPI 結構中如此記錄(因此也會反映在使用者介面中): +* 在 OpenAPI 構架中如此記錄(因此也會反映在使用者介面中): diff --git a/docs/zh-hant/docs/tutorial/testing.md b/docs/zh-hant/docs/tutorial/testing.md index f6bef5d96..ab9dac93c 100644 --- a/docs/zh-hant/docs/tutorial/testing.md +++ b/docs/zh-hant/docs/tutorial/testing.md @@ -8,7 +8,7 @@ ## 使用 `TestClient` { #using-testclient } -/// info +/// note 要使用 `TestClient`,請先安裝 [`httpx`](https://www.python-httpx.org)。 @@ -144,7 +144,7 @@ $ pip install httpx 關於如何把資料傳給後端(使用 `httpx` 或 `TestClient`),更多資訊請參考 [HTTPX 文件](https://www.python-httpx.org)。 -/// info +/// note 請注意,`TestClient` 接收的是可轉為 JSON 的資料,而不是 Pydantic models。