From 80ce1b4cc6ef1eb85d31cad1f3c641caba0a0f33 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:32:05 +0300 Subject: [PATCH 01/11] translate menu item --- src/sidebarReference.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sidebarReference.json b/src/sidebarReference.json index fd7a093c9..452239a31 100644 --- a/src/sidebarReference.json +++ b/src/sidebarReference.json @@ -369,7 +369,7 @@ "canary": true }, { - "title": "Server Actions", + "title": "Sunucu Eylemleri", "path": "/reference/rsc/server-actions", "canary": true }, From ab5d1c4f58efb33cdf97d680cda74da7868aff88 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:32:23 +0300 Subject: [PATCH 02/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 041f5e852..13f89a33d 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -1,11 +1,11 @@ --- -title: Server Actions +title: Sunucu Eylemleri canary: true --- -Server Actions allow Client Components to call async functions executed on the server. +Sunucu Eylemleri, İstemci Bileşenlerinin sunucuda yürütülen asenkron işlevleri çağırmasına olanak tanır. From f58979bda29f35f44eed0032ff55da820535d086 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:33:54 +0300 Subject: [PATCH 03/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 13f89a33d..27882a255 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -13,11 +13,11 @@ Sunucu Eylemleri, İstemci Bileşenlerinin sunucuda yürütülen asenkron işlev -#### How do I build support for Server Actions? {/*how-do-i-build-support-for-server-actions*/} +#### Sunucu Eylemleri için nasıl destek oluşturabilirim? {/*how-do-i-build-support-for-server-actions*/} -While Server Actions in React 19 are stable and will not break between major versions, the underlying APIs used to implement Server Actions in a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. +React 19'daki Sunucu Eylemleri kararlı ve büyük sürümler arasında kırılmayacak olsa da, bir React Sunucu Bileşenleri paketleyicisinde veya çatısında Sunucu Eylemlerini uygulamak için kullanılan temel API'ler semver'ı takip etmez ve React 19.x'teki küçük sürümler arasında kırılabilir. -To support Server Actions as a bundler or framework, we recommend pinning to a specific React version, or using the Canary release. We will continue working with bundlers and frameworks to stabilize the APIs used to implement Server Actions in the future. +Sunucu Eylemlerini bir paketleyici veya çerçeve olarak desteklemek için, belirli bir React sürümüne sabitlemenizi veya Canary sürümünü kullanmanızı öneririz. Gelecekte Sunucu Eylemlerini uygulamak için kullanılan API'leri stabilize etmek için paketleyiciler ve çerçevelerle çalışmaya devam edeceğiz. From 93325abeaff770bc6f5e4ba5430662c14e1d5811 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:35:34 +0300 Subject: [PATCH 04/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 27882a255..12bfa55d5 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -21,9 +21,9 @@ Sunucu Eylemlerini bir paketleyici veya çerçeve olarak desteklemek için, beli -When a Server Action is defined with the `"use server"` directive, your framework will automatically create a reference to the server function, and pass that reference to the Client Component. When that function is called on the client, React will send a request to the server to execute the function, and return the result. +Bir Sunucu Eylemi `“use server”` direktifi tanımlandığında, çatınız otomatik olarak sunucu işlevine bir referans oluşturacak ve bu referansı İstemci Bileşenine aktaracaktır. Bu işlev istemcide çağrıldığında, React işlevi yürütmek için sunucuya bir istek gönderecek ve sonucu return edecektir. -Server Actions can be created in Server Components and passed as props to Client Components, or they can be imported and used in Client Components. +Sunucu Eylemleri, Sunucu Bileşenlerinde oluşturulabilir ve İstemci Bileşenlerine destek olarak aktarılabilir veya İstemci Bileşenlerinde içe aktarılabilir ve kullanılabilir ### Creating a Server Action from a Server Component {/*creating-a-server-action-from-a-server-component*/} From 89d5cbdc9ce68f2841c82e5417795c8056376caf Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:37:49 +0300 Subject: [PATCH 05/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 12bfa55d5..9242f2177 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -25,17 +25,17 @@ Bir Sunucu Eylemi `“use server”` direktifi tanımlandığında, çatınız o Sunucu Eylemleri, Sunucu Bileşenlerinde oluşturulabilir ve İstemci Bileşenlerine destek olarak aktarılabilir veya İstemci Bileşenlerinde içe aktarılabilir ve kullanılabilir -### Creating a Server Action from a Server Component {/*creating-a-server-action-from-a-server-component*/} +### Sunucu Bileşeninden Sunucu Eylemi Oluşturma {/*creating-a-server-action-from-a-server-component*/} -Server Components can define Server Actions with the `"use server"` directive: +Sunucu Bileşenleri `“use server”` yönergesi ile Sunucu Eylemleri tanımlayabilir: ```js [[2, 7, "'use server'"], [1, 5, "createNoteAction"], [1, 12, "createNoteAction"]] -// Server Component +// Sunucu Bileşeni import Button from './Button'; function EmptyNote () { async function createNoteAction() { - // Server Action + // Sunucu Eylemi 'use server'; await db.notes.create(); @@ -45,7 +45,7 @@ function EmptyNote () { } ``` -When React renders the `EmptyNote` Server Component, it will create a reference to the `createNoteAction` function, and pass that reference to the `Button` Client Component. When the button is clicked, React will send a request to the server to execute the `createNoteAction` function with the reference provided: +React, `EmptyNote` Sunucu Bileşenini işlediğinde, `createNoteAction` fonksiyonuna bir referans oluşturacak ve bu referansı `Button` İstemci Bileşenine aktaracaktır. Butona tıklandığında, React, sağlanan referansla `createNoteAction` fonksiyonunu çalıştırmak için sunucuya bir istek gönderecektir: ```js {5} "use client"; @@ -53,11 +53,11 @@ When React renders the `EmptyNote` Server Component, it will create a reference export default function Button({onClick}) { console.log(onClick); // {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNoteAction'} - return + return } ``` -For more, see the docs for [`"use server"`](/reference/rsc/use-server). +Daha fazlası için [`“use server”`](/reference/rsc/use-server) dokümanlarına bakın. ### Importing Server Actions from Client Components {/*importing-server-actions-from-client-components*/} From fad9881722e30e55fcddecb1859a6a5c08905dbb Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:38:58 +0300 Subject: [PATCH 06/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 9242f2177..0f71248d3 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -60,9 +60,9 @@ export default function Button({onClick}) { Daha fazlası için [`“use server”`](/reference/rsc/use-server) dokümanlarına bakın. -### Importing Server Actions from Client Components {/*importing-server-actions-from-client-components*/} +### İstemci Bileşenlerinden Sunucu Eylemlerini İçe Aktarma {/*importing-server-actions-from-client-components*/} -Client Components can import Server Actions from files that use the `"use server"` directive: +İstemci Bileşenleri, `“use server”` direktifini kullanan dosyalardan Sunucu Eylemlerini içe aktarabilir: ```js [[1, 3, "createNoteAction"]] "use server"; @@ -73,7 +73,7 @@ export async function createNoteAction() { ``` -When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNoteAction` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNoteAction` function using the reference provided: +Paketleyici `EmptyNote` İstemci Bileşenini oluşturduğunda, paketteki `createNoteAction` işlevine bir referans oluşturacaktır. Butona tıklandığında React, sağlanan referansı kullanarak `createNoteAction` fonksiyonunu çalıştırmak için sunucuya bir istek gönderecektir: ```js [[1, 2, "createNoteAction"], [1, 5, "createNoteAction"], [1, 7, "createNoteAction"]] "use client"; @@ -86,7 +86,7 @@ function EmptyNote() { } ``` -For more, see the docs for [`"use server"`](/reference/rsc/use-server). +Daha fazlası için [`“use server”`](/reference/rsc/use-server) dokümanlarına bakın. ### Composing Server Actions with Actions {/*composing-server-actions-with-actions*/} From 2bd6adcc44ef68c525f6f3b38a86325b1a02eefc Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:40:24 +0300 Subject: [PATCH 07/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 0f71248d3..f4dc3710e 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -88,16 +88,16 @@ function EmptyNote() { Daha fazlası için [`“use server”`](/reference/rsc/use-server) dokümanlarına bakın. -### Composing Server Actions with Actions {/*composing-server-actions-with-actions*/} +### Sunucu Eylemlerini Eylemlerle Oluşturma {/*composing-server-actions-with-actions*/} -Server Actions can be composed with Actions on the client: +Sunucu Eylemleri, istemci üzerindeki Eylemlerle birlikte oluşturulabilir: ```js [[1, 3, "updateName"]] "use server"; export async function updateName(name) { if (!name) { - return {error: 'Name is required'}; + return {error: 'İsim gereklidir'}; } await db.users.updateName(name); } @@ -128,15 +128,15 @@ function UpdateName() { return (
- {state.error && Failed: {state.error}} + {state.error && Başarısız: {state.error}}
) } ``` -This allows you to access the `isPending` state of the Server Action by wrapping it in an Action on the client. +Bu, Sunucu Eyleminin `isPending` durumuna, istemcideki bir Eyleme sararak erişmenizi sağlar. -For more, see the docs for [Calling a Server Action outside of `
`](/reference/rsc/use-server#calling-a-server-action-outside-of-form) +Daha fazlası için [Sunucu Eylemini `` dışında çağırma](/reference/rsc/use-server#calling-a-server-action-outside-of-form) dokümanlarına bakın ### Form Actions with Server Actions {/*form-actions-with-server-actions*/} From 086c698e51271d3d8b150e359f9d085da2e93dc4 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:42:02 +0300 Subject: [PATCH 08/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index f4dc3710e..19ee3655b 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -138,11 +138,11 @@ Bu, Sunucu Eyleminin `isPending` durumuna, istemcideki bir Eyleme sararak erişm Daha fazlası için [Sunucu Eylemini `` dışında çağırma](/reference/rsc/use-server#calling-a-server-action-outside-of-form) dokümanlarına bakın -### Form Actions with Server Actions {/*form-actions-with-server-actions*/} +### Sunucu Eylemleri ile Form Eylemleri {/*form-actions-with-server-actions*/} -Server Actions work with the new Form features in React 19. +Sunucu Eylemleri, React 19'daki yeni Form özellikleri ile çalışır. -You can pass a Server Action to a Form to automatically submit the form to the server: +Formu otomatik olarak sunucuya göndermek için bir Form'a bir Sunucu Eylemi aktarabilirsiniz: ```js [[1, 3, "updateName"], [1, 7, "updateName"]] @@ -159,9 +159,9 @@ function UpdateName() { } ``` -When the Form submission succeeds, React will automatically reset the form. You can add `useActionState` to access the pending state, last response, or to support progressive enhancement. +Form gönderimi başarılı olduğunda, React formu otomatik olarak sıfırlayacaktır. Pending state, son yanıta erişmek veya aşamalı geliştirmeyi desteklemek için `useActionState` ekleyebilirsiniz. -For more, see the docs for [Server Actions in Forms](/reference/rsc/use-server#server-actions-in-forms). +Daha fazla bilgi için [Formlarda Sunucu Eylemleri](/reference/rsc/use-server#server-actions-in-forms) dokümanlarına bakın. ### Server Actions with `useActionState` {/*server-actions-with-use-action-state*/} From 051b244ec3fbd2f2283a548462eda257e387460d Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Tue, 14 Jan 2025 23:43:55 +0300 Subject: [PATCH 09/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 19ee3655b..79b8d8616 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -163,9 +163,9 @@ Form gönderimi başarılı olduğunda, React formu otomatik olarak sıfırlayac Daha fazla bilgi için [Formlarda Sunucu Eylemleri](/reference/rsc/use-server#server-actions-in-forms) dokümanlarına bakın. -### Server Actions with `useActionState` {/*server-actions-with-use-action-state*/} +### `UseActionState` ile Sunucu Eylemleri {/*server-actions-with-use-action-state*/} -You can compose Server Actions with `useActionState` for the common case where you just need access to the action pending state and last returned response: +Yalnızca pending state'ine ve son döndürülen yanıta erişmeniz gereken yaygın durumlar için Sunucu Eylemlerini `useActionState` ile oluşturabilirsiniz: ```js [[1, 3, "updateName"], [1, 6, "updateName"], [2, 6, "submitAction"], [2, 9, "submitAction"]] "use client"; @@ -178,13 +178,13 @@ function UpdateName() { return ( - {state.error && Failed: {state.error}} + {state.error && Başarısız: {state.error}} ); } ``` -When using `useActionState` with Server Actions, React will also automatically replay form submissions entered before hydration finishes. This means users can interact with your app even before the app has hydrated. +Sunucu Eylemleri ile `useActionState` kullanıldığında, React ayrıca hidrasyon tamamlanmadan önce girilen form gönderimlerini otomatik olarak yeniden oynatacaktır. Bu, kullanıcıların uygulama hidratlanmadan önce bile uygulamanızla etkileşime girebileceği anlamına gelir. For more, see the docs for [`useActionState`](/reference/react-dom/hooks/useFormState). From 66299f17a0524435cec7daa773910c04228e95e5 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Wed, 15 Jan 2025 00:02:27 +0300 Subject: [PATCH 10/11] translate server actions page --- src/content/reference/rsc/server-actions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/reference/rsc/server-actions.md b/src/content/reference/rsc/server-actions.md index 79b8d8616..87510165e 100644 --- a/src/content/reference/rsc/server-actions.md +++ b/src/content/reference/rsc/server-actions.md @@ -186,11 +186,11 @@ function UpdateName() { Sunucu Eylemleri ile `useActionState` kullanıldığında, React ayrıca hidrasyon tamamlanmadan önce girilen form gönderimlerini otomatik olarak yeniden oynatacaktır. Bu, kullanıcıların uygulama hidratlanmadan önce bile uygulamanızla etkileşime girebileceği anlamına gelir. -For more, see the docs for [`useActionState`](/reference/react-dom/hooks/useFormState). +Daha fazlası için [`useActionState`](/reference/react-dom/hooks/useFormState) dokümanlarına bakın. -### Progressive enhancement with `useActionState` {/*progressive-enhancement-with-useactionstate*/} +### `UseActionState` ile aşamalı iyileştirme {/*progressive-enhancement-with-useactionstate*/} -Server Actions also support progressive enhancement with the third argument of `useActionState`. +Sunucu Eylemleri ayrıca `useActionState` üçüncü bağımsız değişkeni ile aşamalı geliştirmeyi de destekler. ```js [[1, 3, "updateName"], [1, 6, "updateName"], [2, 6, "/name/update"], [3, 6, "submitAction"], [3, 9, "submitAction"]] "use client"; @@ -208,6 +208,6 @@ function UpdateName() { } ``` -When the permalink is provided to `useActionState`, React will redirect to the provided URL if the form is submitted before the JavaScript bundle loads. +permalink `useActionState` için sağlandığında, form JavaScript paketi yüklenmeden önce gönderilirse React sağlanan URL'ye yönlendirecektir. -For more, see the docs for [`useActionState`](/reference/react-dom/hooks/useFormState). +Daha fazlası için [`useActionState`](/reference/react-dom/hooks/useFormState) dokümanlarına bakın. From 7361657ddad72a544d5cfdab4d4788946f07029a Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Wed, 15 Jan 2025 00:03:07 +0300 Subject: [PATCH 11/11] translate react server components page --- src/content/reference/rsc/server-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/rsc/server-components.md b/src/content/reference/rsc/server-components.md index b68ad27b4..7e39fec0b 100644 --- a/src/content/reference/rsc/server-components.md +++ b/src/content/reference/rsc/server-components.md @@ -1,5 +1,5 @@ --- -title: React Server Components +title: React Sunucu Bileşenleri canary: true ---