From 633775ea8c4cefba24df4ab257605d0376bf53cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Fri, 10 May 2024 00:39:29 +0300 Subject: [PATCH 1/4] copies original file as is, with no translation --- docs/tr/docs/tutorial/cookie-params.md | 97 ++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 docs/tr/docs/tutorial/cookie-params.md diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md new file mode 100644 index 0000000000000..3436a7df397f8 --- /dev/null +++ b/docs/tr/docs/tutorial/cookie-params.md @@ -0,0 +1,97 @@ +# Cookie Parameters + +You can define Cookie parameters the same way you define `Query` and `Path` parameters. + +## Import `Cookie` + +First import `Cookie`: + +=== "Python 3.10+" + + ```Python hl_lines="3" + {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} + ``` + +=== "Python 3.9+" + + ```Python hl_lines="3" + {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} + ``` + +=== "Python 3.8+" + + ```Python hl_lines="3" + {!> ../../../docs_src/cookie_params/tutorial001_an.py!} + ``` + +=== "Python 3.10+ non-Annotated" + + !!! tip + Prefer to use the `Annotated` version if possible. + + ```Python hl_lines="1" + {!> ../../../docs_src/cookie_params/tutorial001_py310.py!} + ``` + +=== "Python 3.8+ non-Annotated" + + !!! tip + Prefer to use the `Annotated` version if possible. + + ```Python hl_lines="3" + {!> ../../../docs_src/cookie_params/tutorial001.py!} + ``` + +## Declare `Cookie` parameters + +Then declare the cookie parameters using the same structure as with `Path` and `Query`. + +The first value is the default value, you can pass all the extra validation or annotation parameters: + +=== "Python 3.10+" + + ```Python hl_lines="9" + {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!} + ``` + +=== "Python 3.9+" + + ```Python hl_lines="9" + {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!} + ``` + +=== "Python 3.8+" + + ```Python hl_lines="10" + {!> ../../../docs_src/cookie_params/tutorial001_an.py!} + ``` + +=== "Python 3.10+ non-Annotated" + + !!! tip + Prefer to use the `Annotated` version if possible. + + ```Python hl_lines="7" + {!> ../../../docs_src/cookie_params/tutorial001_py310.py!} + ``` + +=== "Python 3.8+ non-Annotated" + + !!! tip + Prefer to use the `Annotated` version if possible. + + ```Python hl_lines="9" + {!> ../../../docs_src/cookie_params/tutorial001.py!} + ``` + +!!! note "Technical Details" + `Cookie` is a "sister" class of `Path` and `Query`. It also inherits from the same common `Param` class. + + But remember that when you import `Query`, `Path`, `Cookie` and others from `fastapi`, those are actually functions that return special classes. + +!!! info + To declare cookies, you need to use `Cookie`, because otherwise the parameters would be interpreted as query parameters. + +## Recap + +Declare cookies with `Cookie`, using the same common pattern as `Query` and `Path`. From b12d805d21ae506c09389fe8ca4f8c2f6de9206d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Fri, 10 May 2024 00:57:19 +0300 Subject: [PATCH 2/4] Translation completed, ready to PR. --- docs/tr/docs/tutorial/cookie-params.md | 41 +++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md index 3436a7df397f8..2f4f94c993446 100644 --- a/docs/tr/docs/tutorial/cookie-params.md +++ b/docs/tr/docs/tutorial/cookie-params.md @@ -1,10 +1,10 @@ -# Cookie Parameters +# Çerez (Cookie) Parametreleri -You can define Cookie parameters the same way you define `Query` and `Path` parameters. +`Query` ve `Path` parametrelerini tanımladığınız şekilde Cookie parametreleri tanımlayabilirsiniz. ## Import `Cookie` -First import `Cookie`: +Öncelikle, `Cookie`'yi projenize dahil edin: === "Python 3.10+" @@ -26,8 +26,8 @@ First import `Cookie`: === "Python 3.10+ non-Annotated" - !!! tip - Prefer to use the `Annotated` version if possible. + !!! tip "İpucu" + Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. ```Python hl_lines="1" {!> ../../../docs_src/cookie_params/tutorial001_py310.py!} @@ -35,18 +35,18 @@ First import `Cookie`: === "Python 3.8+ non-Annotated" - !!! tip - Prefer to use the `Annotated` version if possible. + !!! tip "İpucu" + Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. ```Python hl_lines="3" {!> ../../../docs_src/cookie_params/tutorial001.py!} ``` -## Declare `Cookie` parameters +## `Cookie` Parametrelerini Tanımlayın -Then declare the cookie parameters using the same structure as with `Path` and `Query`. +Cookie parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın: -The first value is the default value, you can pass all the extra validation or annotation parameters: +İlk değer varsayılan değerdir; tüm ekstra doğrulama veya belirteç parametrelerini kullanabilirsiniz: === "Python 3.10+" @@ -68,8 +68,8 @@ The first value is the default value, you can pass all the extra validation or a === "Python 3.10+ non-Annotated" - !!! tip - Prefer to use the `Annotated` version if possible. + !!! tip "İpucu" + Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. ```Python hl_lines="7" {!> ../../../docs_src/cookie_params/tutorial001_py310.py!} @@ -77,21 +77,22 @@ The first value is the default value, you can pass all the extra validation or a === "Python 3.8+ non-Annotated" - !!! tip - Prefer to use the `Annotated` version if possible. + !!! tip "İpucu" + Mümkün mertebe 'Annotated' sınıfını kullanmaya çalışın. ```Python hl_lines="9" {!> ../../../docs_src/cookie_params/tutorial001.py!} ``` -!!! note "Technical Details" +!!! note "Teknik Detaylar" `Cookie` is a "sister" class of `Path` and `Query`. It also inherits from the same common `Param` class. + `Cookie` sınıfı `Path` ve `Query` sınıflarının kardeşidir. Diğerleri gibi `Param` sınıfını miras alan bir sınıftır. - But remember that when you import `Query`, `Path`, `Cookie` and others from `fastapi`, those are actually functions that return special classes. + Ancak `fastapi`'dan projenize dahil ettiğiniz `Query`, `Path`, `Cookie` ve diğerleri aslında özel sınıflar döndüren birer fonksiyondur. -!!! info - To declare cookies, you need to use `Cookie`, because otherwise the parameters would be interpreted as query parameters. +!!! info "Bilgi" + Çerez tanımlamak için `Cookie` sınıfını kullanmanız gerekmektedir, aksi taktirde parametreler sorgu parametreleri olarak yorumlanır. -## Recap +## Özet -Declare cookies with `Cookie`, using the same common pattern as `Query` and `Path`. +Çerez tanımlamalarını `Cookie` sınıfını kullanarak `Query` ve `Path` tanımlar gibi tanımlayın. From 6fe40c8854fba597e88925ba46a3c249f07ecaf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Fri, 10 May 2024 02:40:30 +0300 Subject: [PATCH 3/4] Update docs/tr/docs/tutorial/cookie-params.md --- docs/tr/docs/tutorial/cookie-params.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md index 2f4f94c993446..aeefb1bcf06f5 100644 --- a/docs/tr/docs/tutorial/cookie-params.md +++ b/docs/tr/docs/tutorial/cookie-params.md @@ -44,7 +44,7 @@ ## `Cookie` Parametrelerini Tanımlayın -Cookie parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın: +Cookie parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın. İlk değer varsayılan değerdir; tüm ekstra doğrulama veya belirteç parametrelerini kullanabilirsiniz: From d7f1aebe2b0a56ff4d9be3983ba3c3cba1cdae31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Sezer=20Ta=C5=9Fan?= <13135006+hasansezertasan@users.noreply.github.com> Date: Sat, 11 May 2024 22:10:49 +0300 Subject: [PATCH 4/4] Fix some errros. --- docs/tr/docs/tutorial/cookie-params.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/tr/docs/tutorial/cookie-params.md b/docs/tr/docs/tutorial/cookie-params.md index aeefb1bcf06f5..4a66f26ebd091 100644 --- a/docs/tr/docs/tutorial/cookie-params.md +++ b/docs/tr/docs/tutorial/cookie-params.md @@ -1,6 +1,6 @@ # Çerez (Cookie) Parametreleri -`Query` ve `Path` parametrelerini tanımladığınız şekilde Cookie parametreleri tanımlayabilirsiniz. +`Query` (Sorgu) ve `Path` (Yol) parametrelerini tanımladığınız şekilde çerez parametreleri tanımlayabilirsiniz. ## Import `Cookie` @@ -44,7 +44,7 @@ ## `Cookie` Parametrelerini Tanımlayın -Cookie parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın. +Çerez parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın. İlk değer varsayılan değerdir; tüm ekstra doğrulama veya belirteç parametrelerini kullanabilirsiniz: @@ -85,7 +85,6 @@ Cookie parametrelerini `Path` veya `Query` tanımlaması yapar gibi tanımlayın ``` !!! note "Teknik Detaylar" - `Cookie` is a "sister" class of `Path` and `Query`. It also inherits from the same common `Param` class. `Cookie` sınıfı `Path` ve `Query` sınıflarının kardeşidir. Diğerleri gibi `Param` sınıfını miras alan bir sınıftır. Ancak `fastapi`'dan projenize dahil ettiğiniz `Query`, `Path`, `Cookie` ve diğerleri aslında özel sınıflar döndüren birer fonksiyondur.