Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🌐 Add Chinese translation for Tutorial - Bigger Applications - Multiple Files#2453

Merged
tiangolo merged 4 commits into
fastapi:masterfrom
waynerv:add-chinese-translation-for-bigger-application.md
Feb 7, 2021
Merged

🌐 Add Chinese translation for Tutorial - Bigger Applications - Multiple Files#2453
tiangolo merged 4 commits into
fastapi:masterfrom
waynerv:add-chinese-translation-for-bigger-application.md

Conversation

@waynerv

@waynerv waynerv commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

@RunningIkkyu @maoyibo @yanever Please take a look.

@waynerv waynerv mentioned this pull request Dec 1, 2020
@codecov

codecov Bot commented Dec 1, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2453 (fe583ac) into master (f031973) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2453   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          243       243           
  Lines         7419      7419           
=========================================
  Hits          7419      7419           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb40e27...fe583ac. Read the comment docs.

@github-actions

github-actions Bot commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 26a42ed at: https://5fc614470da6790de33d084c--fastapi.netlify.app

@tiangolo tiangolo added awaiting-review lang-all Translations lang-zh Chinese translations labels Dec 2, 2020
Comment thread docs/zh/docs/tutorial/bigger-applications.md Outdated

### 导入 `APIRouter`

你可以导入它并通过与 `FastAPI` 类相同的方式创建一个「实例」:

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.

个人感觉 ‘the same way’ 应该包括导入这一步,不过影响不大 :bowtie:

Suggested change
你可以导入它并通过与 `FastAPI` 类相同的方式创建一个「实例」:
与使用 `FastAPI` 类的方式相同,你可以导入它并创建一个「实例」:

{!../../../docs_src/bigger_applications/app/routers/users.py!}
```

### *路径操作*和 `APIRouter`

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.

和下面翻译统一。with 此处翻译为‘使用‘感觉更合适。

Suggested change
### *路径操作* `APIRouter`
### 包含 `APIRouter`*路径操作*


然后你可以使用它来声明*路径操作*。

通过与使用 `FastAPI` 类相同的方式使用它:

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.

Suggested change
通过与使用 `FastAPI` 类相同的方式使用它:
与使用 `FastAPI` 类相同的方式使用它:

Comment thread docs/zh/docs/tutorial/bigger-applications.md Outdated
!!! tip
最后的这个路径操作将包含标签的组合:`["items","custom"]`。

并且在文档中也会有两个响应,一个为 `404`,一个为 `403`。

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.

Suggested change
并且在文档中也会有两个响应,一个为 `404`,一个为 `403`。
并且在文档中也会有两个响应,一个对应 `404`,一个对应 `403`。

Comment thread docs/zh/docs/tutorial/bigger-applications.md Outdated
Comment thread docs/zh/docs/tutorial/bigger-applications.md Outdated
{!../../../docs_src/bigger_applications/app/main.py!}
```

### 包含 `users` 和 `items` 的 `APIRouter`

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.

include 虽然是‘包含‘的意思,但是这里直接翻译为‘包含‘感觉不太符合中文习惯。如果意译是否可以翻译为“添加”?

后面这段话,也说明了 include_router() 函数确实是‘添加‘路由到主程序。

With app.include_router() we can add each APIRouter to the main FastAPI application.

Comment thread docs/zh/docs/tutorial/bigger-applications.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 2779ec5 at: https://5ffe5f2ed9428c4ce1fb85cf--fastapi.netlify.app

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit fe583ac at: https://5ffe6300de7c32599ff43f2c--fastapi.netlify.app

@tiangolo tiangolo changed the title Add Chinese translation for Tutorial - Bigger Applications - Multiple Files 🌐 Add Chinese translation for Tutorial - Bigger Applications - Multiple Files Feb 7, 2021
@tiangolo

tiangolo commented Feb 7, 2021

Copy link
Copy Markdown
Member

Thanks @waynerv! 👏 👏 🚀

And thanks for the reviews @yanever , @blt232018 , and @Laineyzhang55 ☕ 🍰

@tiangolo tiangolo merged commit 0af6cbe into fastapi:master Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants