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

Skip to content

🌐 Add Japanese translation for Tutorial - Middleware#2255

Merged
tiangolo merged 5 commits into
fastapi:masterfrom
tokusumi:translation/add-ja-tutorial-middleware
Feb 7, 2021
Merged

🌐 Add Japanese translation for Tutorial - Middleware#2255
tiangolo merged 5 commits into
fastapi:masterfrom
tokusumi:translation/add-ja-tutorial-middleware

Conversation

@tokusumi

@tokusumi tokusumi commented Oct 27, 2020

Copy link
Copy Markdown
Contributor

This PR translates tutorial/middleware.md with Japanese.

@codecov

codecov Bot commented Oct 27, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2255 (78b129e) into master (5614b94) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #2255   +/-   ##
=========================================
  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 5614b94...78b129e. Read the comment docs.

@tokusumi tokusumi mentioned this pull request Oct 27, 2020
@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 4e72e49 at: https://5f985b1cf4a786097cc1cf21--fastapi.netlify.app

@tokusumi tokusumi changed the title Add Japanese translation for tutorial/middleware.md 🌐 Add Japanese translation for Tutorial - Middleware Oct 28, 2020

@delhi09 delhi09 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It looks mostly good.
I pointed out some details.

Comment thread docs/ja/docs/tutorial/middleware.md Outdated

* ミドルウェアはアプリケーションに届いたそれぞれの**リクエスト**を受け取ります。
* その後、その**リクエスト**に対して何かを実行したり、必要なコードを実行したりできます。
* 次に、アプリケーションの残りの部分**リクエスト**を渡して (*path operation* によって) 処理させます。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This sentence lacks "に" after "アプリケーションの残りの部分".

Comment thread docs/ja/docs/tutorial/middleware.md Outdated

**FastAPI** アプリケーションにミドルウェアを追加できます。

「ミドルウェア」は、特定の*path operation*によって処理される前に、すべての**リクエスト**に機能する関数です。また、それを返す前に、すべての**レスポンス**に機能します。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to modify "それ" to "レスポンス" because "それ" comes first, I don't know it refers to "レスポンス".

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.

It seems unnatural that the same word appears twice in one short sentence.
But I have updated this line to make it more natural, so please check it again.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

Comment thread docs/ja/docs/tutorial/middleware.md Outdated
!!! tip "豆知識"
<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">'X-'プレフィックスを使用</a>してカスタムの独自ヘッダーを追加できます。

ただし、ブラウザのクライアントに表示させたいカスタムヘッダーがある場合は、<a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">StarletteのCORSドキュメント</a>に記載されているパラメータ `expose_headers` を使用して、それらをCORSに追加する必要があります ([CORS (オリジン間リソース共有)](cors.md){.internal-link target=_blank})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"CORS設定に追加する必要があります" may be a little better.

Comment thread docs/ja/docs/tutorial/middleware.md Outdated

### `response` の前後

*path operation* が `request` を受け取る前に、 `request` と実行されるコードを追加できます。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"requestと共に or 一緒に" may be a little better.

@tokusumi

Copy link
Copy Markdown
Contributor Author

Thank you for your review! @delhi09
I applied your feedback and updated a few lines.
Please check again.

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 671e5f0 at: https://5fe314603702e706b1e7a3a7--fastapi.netlify.app

@delhi09 delhi09 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@sh0nk sh0nk 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.

Just a couple of suggestions to aim more natural representation!

Comment thread docs/ja/docs/tutorial/middleware.md Outdated
Comment thread docs/ja/docs/tutorial/middleware.md Outdated
Comment thread docs/ja/docs/tutorial/middleware.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 78b129e at: https://6001cf851287b966927b0359--fastapi.netlify.app

@tokusumi

Copy link
Copy Markdown
Contributor Author

Thank you for your review @sh0nk !
updated it. could you see again?

@sh0nk sh0nk 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.

LGTM 👍

@tiangolo

tiangolo commented Feb 7, 2021

Copy link
Copy Markdown
Member

Awesome! Thanks @tokusumi ! 🙇 🚀

And thank you @sh0nk and @delhi09 for the reviews. ☕ 🍰

@tiangolo tiangolo merged commit 5828043 into fastapi:master Feb 7, 2021
@tokusumi tokusumi deleted the translation/add-ja-tutorial-middleware branch May 5, 2021 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants