Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 Add Korean translation for docs/ko/docs/tutorial/request-forms.md #2908

Closed
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
60 changes: 60 additions & 0 deletions docs/ko/docs/tutorial/request-forms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 폼 데이터

JSON 대신에 폼 데이터 필드를 받을 필요가 있을 때, `폼`을 사용할 수 있습니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
JSON 대신에 폼 데이터 필드를 받을 필요가 있을 때, ``을 사용할 수 있습니다.
JSON 대신에 폼 데이터 필드를 받을 필요가 있을 때, `Form`을 사용할 수 있습니다.

The Form is a syntax of FastAPI.


!!! info "정보"
폼을 사용하기 위해서는 일단 <a href="https://andrew-d.github.io/python-multipart/" class="external-link" target="_blank">`python-multipart`</a>를 설치해야 합니다.

E.g. `pip install python-multipart`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
E.g. `pip install python-multipart`.
예를 들면 다음과 같은 방식입니다. `pip install python-multipart`.

use less English as you can.

Check #2017 . I think it is more convenient for beginners to elaborate the meaning of E. g..


## `폼` 임포트
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## `` 임포트
## `Form` 임포트


`fastapi`에서 `Form`을 임포트합니다:

```Python hl_lines="1"
{!../../../docs_src/request_forms/tutorial001.py!}
```

## `폼` 매개변수 정의하기
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## `` 매개변수 정의하기
## `Form` 매개변수 정의

I prefer 정의 because it is pure noun.


`본문`이나 `쿼리`와 같은 방법으로 폼 매개변수도 생성합니다:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`본문`이나 `쿼리`와 같은 방법으로 폼 매개변수도 생성합니다:
`Body`이나 `Query`와 같은 방법으로 폼 매개변수도 생성합니다:



```Python hl_lines="7"
{!../../../docs_src/request_forms/tutorial001.py!}
```

예를 들어, Oauth2 사양을 사용할 수 있는 ("비밀번호 흐름"이라고 불리는) 방법은 `username` 과 `password`를 폼데이터로 보내는 것이 필수입니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
예를 들어, Oauth2 사양을 사용할 수 있는 ("비밀번호 흐름"이라고 불리는) 방법은 `username``password`폼데이터로 보내는 것이 필수입니다.
예를 들어, OAuth2 사양을 사용할 수 있는 ("비밀번호 흐름"이라고 불리는) 방법은 반드시 `username``password`폼 필드로 전달해야 합니다.



이 <abbr title="specification">사양</abbr>은 정확히 `username` 과 `password`라고 된 필드들이 필요하고 JSON이 아닌 폼 필드로 보내야 합니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
이 <abbr title="specification">사양</abbr>은 정확히 `username``password`라고 된 필드들이 필요하고 JSON이 아닌 폼 필드로 보내야 합니다.
이 <abbr title="사양">사양</abbr>은 정확히 `username``password`라고 된 필드들이 필요하고 JSON이 아닌 폼 필드로 보내야 합니다.

Although the word 사양 is duplicated because of spec, I think less English is better way.


`폼`만 있으면 `본문`(`쿼리`, `경로`, `쿠키`)와 마찬가지로 같은 메타데이터와 유효성 검사를 선언할 수 있습니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``만 있으면 `본문`(`쿼리`, `경로`, `쿠키`)와 마찬가지로 같은 메타데이터와 유효성 검사를 선언할 수 있습니다.
`Form`만 있으면 `Body` (그리고 `Query`, `Path`, `Cookie`) 와 동일한 메타데이터와 검증을 선언할 수 있습니다.

Here, the Form and Body ... are not a noun, these are FastAPI syntax. Also, 마찬가지로 같은 is duplicated the meaning.


!!! info "정보"
`폼`은 `본문`을 직접적으로 상속받은 클래스입니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``은 `본문`을 직접적으로 상속받은 클래스입니다.
`Form`은 `Body`를 직접적으로 상속받은 클래스입니다.


!!! tip "팁"
`Form` 없이는 매개변수가 쿼리 매개변수나 본문(JSON) 매개변수로 해석 되기 때문에 폼 본문을 선언하기 위해서는 `Form`을 명시적으로 상용하는 것이 필요합니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`Form` 없이는 매개변수가 쿼리 매개변수나 본문(JSON) 매개변수로 해석 되기 때문에 폼 본문을 선언하기 위해서는 `Form`을 명시적으로 상용하는 것이 필요합니다.
`Form` 없이는 매개변수가 쿼리 매개변수나 본문 (JSON) 매개변수로 해석 되기 때문에, 폼 본문을 선언하기 위해서는, `Form`을 명시적으로 사용해야 합니다.



## "폼 필드"에 대해

HTML 폼(`<form></form>`)이 서버로 데이터를 보내는 방법은 일반적으로 그 데이터를 위해 JSON과는 다른 "특별한" 인코딩 방법을 사용합니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
HTML 폼(`<form></form>`)이 서버로 데이터를 보내는 방법은 일반적으로 그 데이터를 위해 JSON과는 다른 "특별한" 인코딩 방법을 사용합니다.
HTML 폼 (`<form></form>`) 이 서버로 데이터를 보낼 때 일반적으로 그 데이터를 위해 JSON과는 다른, "특별한" 인코딩 방법을 사용합니다.


**FastAPI** JSON 대신에 정확한 곳에서 그 데이터를 읽을 수 있어야 합니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
**FastAPI** JSON 대신에 정확한 곳에서 그 데이터를 읽을 수 있어야 합니다.
**FastAPI** JSON 대신에 올바른 위치에서 해당 데이터를 읽을 수 있게 합니다.


!!! note "기술적인 세부사항"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
!!! note "기술적인 세부사항"
!!! note "기술적 세부사항"

Check 파이썬 공식 한국어 문서에 없는 용어 중 현재 사용하고 있는 용어 in #3167 .

폼으로부터 받은 데이터는 일반적으로 "media type" `application/x-www-form-urlencoded`을 이용해서 암호화 됩니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
폼으로부터 받은 데이터는 일반적으로 "media type" `application/x-www-form-urlencoded`을 이용해서 암호화 됩니다.
폼으로부터 받은 데이터는 일반적으로 "미디어 유형" `application/x-www-form-urlencoded`을 이용해서 암호화 됩니다.


폼이 파일을 포함하고 있을 때는 `multipart/form-data`로 암호화 됩니다. 다음 챕터에서 파일 다루기에 대해 읽을 수 있을 겁니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
폼이 파일을 포함하고 있을 때는 `multipart/form-data`로 암호화 됩니다. 다음 챕터에서 파일 다루기에 대해 읽을있을 겁니다.
폼이 파일을 포함하고 있을 때, `multipart/form-data`로 암호화 됩니다. 다음 장에서 파일을 다루는 방법에 대해 확인할있습니다.


이런 암호화와 폼필드에 대해 더 읽고싶다면, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>을 참고하세요.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
이런 암호화와 폼필드에 대해 더 읽고싶다면, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> web docs for <code>POST</code></a>을 참고하세요.
이런 암호화와 폼 필드에 대해 더 읽고싶다면, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><code>POST</code>에 관한 <abbr title="Mozilla Developer Network">MDN</abbr> 웹 문서</a>를 참고하기 바랍니다.


!!! warning "주의"
*경로 동작*에서 다양한 폼 파라미터를 선언할 수 있지만 요청은 `application/json` 대신에 `application/x-www-form-urlencoded`을 이용해 암호화 된 본문을 가지기 때문에 JSON으로 받기를 예상하는 `본문`필드 또한 선언할 수 없습니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
*경로 동작*에서 다양한 폼 파라미터를 선언할 수 있지만 요청은 `application/json` 대신에 `application/x-www-form-urlencoded`을 이용해 암호화 된 본문을 가지기 때문에 JSON으로 받기를 예상하는 `본문`필드 또한 선언할 수 없습니다.
*경로 작동*에 다양한 폼 매개변수를 선언할 수 있지만, 요청은 `application/json` 대신에 `application/x-www-form-urlencoded`을 사용하여 암호화 된 본문을 가지기 때문에, JSON으로 전달 받을 것이라 예상하는 `Body` 필드 또한 선언할 수 없습니다.

동작 is for living things and 작동 is for kind of machines. Check 파이썬 공식 한국어 문서에 없는 용어 중 현재 사용하고 있는 용어 in #3167

이는 **FastAPI**의 한계가 아니라 HTTP 통신의 일부입니다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
이는 **FastAPI**의 한계가 아니라 HTTP 통신의 일부입니다.
이는 **FastAPI**의 한계가 아닌, HTTP 통신의 일부입니다.

The origin document separates the sentence by using comma(,)


## 요약

입력 매개변수로 폼 데이터를 선언할 때에는 `Form`을 사용하세요.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
입력 매개변수로 폼 데이터를 선언할 때에는 `Form`사용하세요.
입력 매개변수로 폼 데이터를 선언할 때에는 `Form`사용하기 바랍니다.

비격식체(Informal)인 해요체를 지양하고 격식체(Formal)인 합쇼체를 지향합니다.

Check #2017 .

2 changes: 2 additions & 0 deletions docs/ko/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ nav:
- tr: /tr/
- uk: /uk/
- zh: /zh/
- 자습서 - 사용자 안내서:
-tutorial/request-forms.md
markdown_extensions:
- toc:
permalink: true
Expand Down