🌐 Add Chinese translation for docs/zh/docs/advanced/events.md#12512
Merged
Conversation
Contributor
|
📝 Docs preview for commit 020a16f at: https://4fc6775f.fastapitiangolo.pages.dev Modified Pages |
docs/zh/docs/advanced/events.md
YGuang233
reviewed
Nov 13, 2024
|
|
||
| /// info | "说明" | ||
|
|
||
| 有关事件处理器的详情,请参阅 <a href="https://www.starlette.io/events/" class="external-link" target="_blank">Starlette 官档 - 事件</a>。 |
There was a problem hiding this comment.
https://www.starlette.io/events/这个地址也需要修改,改为https://www.starlette.io/lifespan/
Contributor
|
📝 Docs preview for commit ae035e2 at: https://01582b6c.fastapitiangolo.pages.dev Modified Pages |
| 但在我们上面的例子里,我们并不是直接使用,而是传递给 FastAPI 来供其使用。 | ||
|
|
||
| `FastAPI()` 的 `lifespan` 参数接受一个**异步上下文管理器**,所以我们可以把我们新定义的上下文管理器 `lifespan` 传给它。 | ||
|
|
Contributor
There was a problem hiding this comment.
相较英文文档,此处缺少了一个传入lifespan参数的示例代码块
Contributor
Author
There was a problem hiding this comment.
你说得对,谢谢你的指正。我会修改这个错误。
Contributor
|
📝 Docs preview for commit 1883c59 at: https://66ee39b1.fastapitiangolo.pages.dev Modified Pages |
Contributor
|
📝 Docs preview for commit 5064771 at: https://7501cedc.fastapitiangolo.pages.dev Modified Pages |
Contributor
|
📝 Docs preview for commit 2d18b2a at: https://f057b3fc.fastapitiangolo.pages.dev Modified Pages |
Member
|
Thank you! @ZhibangYue 🚀 |
gerry-sabar
pushed a commit
to gerry-sabar/fastapi
that referenced
this pull request
Dec 18, 2024
s-rigaud
pushed a commit
to s-rigaud/fastapi
that referenced
this pull request
Jan 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Chinese translation for docs/zh/docs/advanced/events.md
为【事件:启动 - 关闭】一章进行了更新,使之与英文最新版同步。