-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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 Japanese translation for docs/ja/docs/tutorial/extra-data-types.md
#1932
🌐 Add Japanese translation for docs/ja/docs/tutorial/extra-data-types.md
#1932
Conversation
…/ryuckel/fastapi into feature/add-japanese-translation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1932 +/- ##
===========================================
Coverage 100.00% 100.00%
===========================================
Files 540 239 -301
Lines 13969 7079 -6890
===========================================
- Hits 13969 7079 -6890 ☔ View full report in Codecov by Sentry. |
📝 Docs preview for commit b4499be at: https://5f3ea0beca4acadefcb906e4--fastapi.netlify.app |
* `datetime.timedelta`: | ||
* Pythonの`datetime.timedelta`です。 | ||
* リクエストとレスポンスでは合計秒数の`float`で表現されます。 | ||
* Pydanticでは「ISO 8601 time diff encodig」として表現することも可能です。<a href="https://pydantic-docs.helpmanual.io/#json-serialisation" class="external-link" target="_blank">詳細はドキュメントを参照してください</a>。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Pydanticでは「ISO 8601 time diff encoding」として表現することも可能です。<a href="https://pydantic-docs.helpmanual.io/#json-serialisation" class="external-link" target="_blank">詳細はドキュメントを参照してください</a>。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません。これの修正箇所はどこでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(タイポです)
encodig -> encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
�Thank you.
I fixed it!
* `Decimal`: | ||
* Pythonの標準的な`Decimal`です。 | ||
* リクエストやレスポンスでは`float`と同じように扱います。 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Pydanticの全ての有効な型はこちらで確認できます: Pydantic data types。
|
||
ここでは、上記の型のいくつかを使用したパラメータを持つ*path operation*の例を示します。 | ||
|
||
```Python hl_lines="1 2 11 12 13 14 15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hl_lines="1 2 12 13 14 15 16"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hl_lines
supports ranges (i.e, 12-16) and would be more readable / maintainable. issue for reference: #1859
|
||
関数内のパラメータは自然なデータ型を持っていることに注意してください。そして、以下のように通常の日付操作を行うことができます: | ||
|
||
```Python hl_lines="17 18" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hl_lines="18 19"
📝 Docs preview for commit 88149f0 at: https://5f41609f542704c0e46ccfad--fastapi.netlify.app |
@tokusumi |
📝 Docs preview for commit b3f73c0 at: https://5f422578442f8e3725c9c20d--fastapi.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📝 Docs preview for commit 3c5064c at: https://5f4cc07683248de318f6ba65--fastapi.netlify.app |
📝 Docs preview for commit a1301a1 at: https://5f9aa4105f755e2598dac251--fastapi.netlify.app |
There was a problem hiding this comment.
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.
* Pythonの`datetime.date`です。 | ||
* リクエストとレスポンスはISO 8601形式の`str`で表現されます: `2008-09-15` | ||
* `datetime.time`: | ||
* Pythonの`datetime.time`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"です。" is better at the view of the consistency.
* 生成されたスキーマは`str`で`binary`の「フォーマット」持つことを指定します。 | ||
* `Decimal`: | ||
* Pythonの標準的な`Decimal`です。 | ||
* リクエストやレスポンスでは`float`と同じように扱います。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"扱われます。" is better at the view of the consistency.
docs/ja/docs/tutorial/extra-data-types.md
📝 Docs preview for commit 549e720 at: https://6499cb481d7654047104dee1--fastapi.netlify.app |
📝 Docs preview for commit 9231c79 at: https://fb5c19c5.fastapitiangolo.pages.dev |
Thank you! @SwftAlpc 😃 And everyone else for the reviews 🚀✨ |
This PR translates the tutorial/extra-data-types.md to Japanese.
Please review tutorial/extra-data-types.md.
Issue #1571 generates a new directory to support Japanese.PR #1656 generates a new directory for tutorial.
I will fix dependency after #1571 & #1656 are merged.