Skip to content

🌐 Add Chinese translation for docs/zh/docs/advanced/events.md#12512

Merged
alejsdev merged 9 commits into
fastapi:masterfrom
ZhibangYue:translate-zhCN
Dec 17, 2024
Merged

🌐 Add Chinese translation for docs/zh/docs/advanced/events.md#12512
alejsdev merged 9 commits into
fastapi:masterfrom
ZhibangYue:translate-zhCN

Conversation

@ZhibangYue

Copy link
Copy Markdown
Contributor

Add Chinese translation for docs/zh/docs/advanced/events.md
为【事件:启动 - 关闭】一章进行了更新,使之与英文最新版同步。

@github-actions github-actions Bot added the lang-all Translations label Oct 23, 2024
@github-actions

Copy link
Copy Markdown
Contributor

@alejsdev alejsdev changed the title Add Chinese translation for docs/zh/docs/advanced/events.md 🌐 Add Chinese translation for docs/zh/docs/advanced/events.md Oct 23, 2024
@alejsdev alejsdev added lang-zh Chinese translations awaiting-review labels Oct 23, 2024
Comment thread docs/zh/docs/advanced/events.md Outdated

/// info | "说明"

有关事件处理器的详情,请参阅 <a href="https://www.starlette.io/events/" class="external-link" target="_blank">Starlette 官档 - 事件</a>。

@YGuang233 YGuang233 Nov 13, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.starlette.io/events/这个地址也需要修改,改为https://www.starlette.io/lifespan/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YGuang233 你说得对,谢谢你的指正。我会修改这个错误。

@github-actions

Copy link
Copy Markdown
Contributor

但在我们上面的例子里,我们并不是直接使用,而是传递给 FastAPI 来供其使用。

`FastAPI()` 的 `lifespan` 参数接受一个**异步上下文管理器**,所以我们可以把我们新定义的上下文管理器 `lifespan` 传给它。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

相较英文文档,此处缺少了一个传入lifespan参数的示例代码块

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你说得对,谢谢你的指正。我会修改这个错误。

@github-actions

Copy link
Copy Markdown
Contributor

@Zhongheng-Cheng Zhongheng-Cheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@alejsdev alejsdev merged commit a559f8f into fastapi:master Dec 17, 2024
@alejsdev

Copy link
Copy Markdown
Member

Thank you! @ZhibangYue 🚀
And thanks for the reviews @YGuang233 @Zhongheng-Cheng 🔍

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-1 lang-all Translations lang-zh Chinese translations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants