From a40d658459ab1ed84cb9c1e5d29783a52b35adb9 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:37:46 +0300 Subject: [PATCH 01/10] translate children page --- src/content/reference/react/Children.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 81a28c5b3..7b99dd5a4 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -1,16 +1,16 @@ --- -title: Children +title: Children (Alt Eleman) --- -Using `Children` is uncommon and can lead to fragile code. [See common alternatives.](#alternatives) +`Children` kullanımı nadirdir ve kırılgan koda yol açabilir. [Yaygın alternatiflere bakın.](#alternatives) -`Children` lets you manipulate and transform the JSX you received as the [`children` prop.](/learn/passing-props-to-a-component#passing-jsx-as-children) +`Children`, [`children` prop'u olarak aldığınız JSX'i değiştirmenize ve dönüştürmenize olanak tanır](/learn/passing-props-to-a-component#passing-jsx-as-children) ```js const mappedChildren = Children.map(children, child => @@ -27,11 +27,11 @@ const mappedChildren = Children.map(children, child => --- -## Reference {/*reference*/} +## Başvuru Dokümanı {/*reference*/} ### `Children.count(children)` {/*children-count*/} -Call `Children.count(children)` to count the number of children in the `children` data structure. +Children veri yapısındaki alt eleman sayısını saymak için `Children.count(children)` öğesini çağırın. ```js src/RowList.js active import { Children } from 'react'; @@ -39,26 +39,26 @@ import { Children } from 'react'; function RowList({ children }) { return ( <> -

Total rows: {Children.count(children)}

+

Toplam satır: {Children.count(children)}

... ); } ``` -[See more examples below.](#counting-children) +[Aşağıda daha fazla örneğe bakın.](#counting-children) -#### Parameters {/*children-count-parameters*/} +#### Parametreler {/*children-count-parameters*/} -* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component. +* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. #### Returns {/*children-count-returns*/} -The number of nodes inside these `children`. +Bu `children` içindeki node'ların sayısı. -#### Caveats {/*children-count-caveats*/} +#### Uyarılar {/*children-count-caveats*/} -- Empty nodes (`null`, `undefined`, and Booleans), strings, numbers, and [React elements](/reference/react/createElement) count as individual nodes. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. +- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elemanları](/reference/react/createElement) ayrı node'lar olarak sayılır. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. --- From 20b552e494c0c7868e17c833f3c8b79cccd76870 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:39:30 +0300 Subject: [PATCH 02/10] translate children page --- src/content/reference/react/Children.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 7b99dd5a4..a70a8ef25 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -58,7 +58,7 @@ Bu `children` içindeki node'ların sayısı. #### Uyarılar {/*children-count-caveats*/} -- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elemanları](/reference/react/createElement) ayrı node'lar olarak sayılır. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. +- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elemanları](/reference/react/createElement) ayrı node'lar olarak sayılır. Diziler tek tek node'lar olarak sayılmaz, ancak alt elemanları sayılır. **Çaprazlama React öğelerinden daha derine gitmez:** bunlar işlenmez ve alt öğeleri çaprazlanmaz. [Fragments](/reference/react/Fragment) geçilmez. --- From 215c98c6255e5e1c38ba01983e6efcbab0e8ec4b Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:40:08 +0300 Subject: [PATCH 03/10] translate children page --- src/content/reference/react/Children.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index a70a8ef25..79649586d 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -64,7 +64,7 @@ Bu `children` içindeki node'ların sayısı. ### `Children.forEach(children, fn, thisArg?)` {/*children-foreach*/} -Call `Children.forEach(children, fn, thisArg?)` to run some code for each child in the `children` data structure. +Children veri yapısındaki her alt eleman için bazı kodlar çalıştırmak üzere `Children.forEach(children, fn, thisArg?)` öğesini çağırın. ```js src/RowList.js active import { Children } from 'react'; @@ -78,7 +78,7 @@ function SeparatorList({ children }) { // ... ``` -[See more examples below.](#running-some-code-for-each-child) +[Aşağıda daha fazla örneğe bakın](#running-some-code-for-each-child) #### Parameters {/*children-foreach-parameters*/} From b4f2fdbf9dedb114963f08aa1d81dc9e1607082b Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:41:14 +0300 Subject: [PATCH 04/10] translate children page --- src/content/reference/react/Children.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 79649586d..44dbad7ef 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -80,10 +80,10 @@ function SeparatorList({ children }) { [Aşağıda daha fazla örneğe bakın](#running-some-code-for-each-child) -#### Parameters {/*children-foreach-parameters*/} +#### Parametreler {/*children-foreach-parameters*/} -* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component. -* `fn`: The function you want to run for each child, similar to the [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call. +* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. +* `fn`: Her çocuk için çalıştırmak istediğiniz işlev, [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback'e benzer. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call. * **optional** `thisArg`: The [`this` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) with which the `fn` function should be called. If omitted, it's `undefined`. #### Returns {/*children-foreach-returns*/} From c01a73d0046fcec6665a96e9e0faaf92c9a71c7d Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:44:04 +0300 Subject: [PATCH 05/10] translate children page --- src/content/reference/react/Children.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 44dbad7ef..968c470a7 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -83,14 +83,14 @@ function SeparatorList({ children }) { #### Parametreler {/*children-foreach-parameters*/} * `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. -* `fn`: Her çocuk için çalıştırmak istediğiniz işlev, [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback'e benzer. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call. -* **optional** `thisArg`: The [`this` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) with which the `fn` function should be called. If omitted, it's `undefined`. +* `fn`: Her çocuk için çalıştırmak istediğiniz işlev, [array `forEach` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) callback'e benzer. İlk argüman olarak alt eleman ve ikinci argüman olarak indeksi ile çağrılacaktır. İndeks `0`dan başlar ve her çağrıda artar. +* **isteğe bağlı** `thisArg`: `fn` fonksiyonunun çağrılması gereken [`this` değeri](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this). Atlanırsa, `tanımlanmamış` olur. #### Returns {/*children-foreach-returns*/} -`Children.forEach` returns `undefined`. +`Children.forEach` öğesi `undefined` döndürür. -#### Caveats {/*children-foreach-caveats*/} +#### Uyarılar {/*children-foreach-caveats*/} - Empty nodes (`null`, `undefined`, and Booleans), strings, numbers, and [React elements](/reference/react/createElement) count as individual nodes. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. From 1faedad1ff89dc2395e63c39d1f70848ff151153 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:44:34 +0300 Subject: [PATCH 06/10] translate children page --- src/content/reference/react/Children.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 968c470a7..125fed6fc 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -92,7 +92,7 @@ function SeparatorList({ children }) { #### Uyarılar {/*children-foreach-caveats*/} -- Empty nodes (`null`, `undefined`, and Booleans), strings, numbers, and [React elements](/reference/react/createElement) count as individual nodes. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. +- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elements](/reference/react/createElement) ayrı node'lar olarak sayılır. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. --- From 964fb67ea322ef70c2627ac181313bcc5c844948 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 21:45:19 +0300 Subject: [PATCH 07/10] translate children page --- src/content/reference/react/Children.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 125fed6fc..ba1542438 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -92,7 +92,7 @@ function SeparatorList({ children }) { #### Uyarılar {/*children-foreach-caveats*/} -- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elements](/reference/react/createElement) ayrı node'lar olarak sayılır. Arrays don't count as individual nodes, but their children do. **The traversal does not go deeper than React elements:** they don't get rendered, and their children aren't traversed. [Fragments](/reference/react/Fragment) don't get traversed. +- Boş node'lar (`null`, `undefined` ve Booleans), string'ler, sayılar ve [React elements](/reference/react/createElement) ayrı node'lar olarak sayılır. Diziler tek tek node'lar olarak sayılmaz, ancak alt elemanları sayılır. **Çaprazlama React öğelerinden daha derine gitmez:** bunlar işlenmez ve alt öğeleri çaprazlanmaz. [Fragments](/referans/react/Fragment) çaprazlanmaz. --- From d8630344e4264ea6022f184e45854f463925772d Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 22:39:51 +0300 Subject: [PATCH 08/10] translate children page --- src/content/reference/react/Children.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index ba1542438..50d5a4270 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -10,7 +10,7 @@ title: Children (Alt Eleman) -`Children`, [`children` prop'u olarak aldığınız JSX'i değiştirmenize ve dönüştürmenize olanak tanır](/learn/passing-props-to-a-component#passing-jsx-as-children) +`Children`, [`children` prop'u](/learn/passing-props-to-a-component#passing-jsx-as-children) olarak aldığınız JSX'i değiştirmenize ve dönüştürmenize olanak tanır ```js const mappedChildren = Children.map(children, child => From b98b4ca5a32ed35460e603c52a3241b705e3c79b Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Mon, 20 Jan 2025 22:48:36 +0300 Subject: [PATCH 09/10] translate children page --- src/content/reference/react/Children.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 50d5a4270..337583c05 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -98,7 +98,7 @@ function SeparatorList({ children }) { ### `Children.map(children, fn, thisArg?)` {/*children-map*/} -Call `Children.map(children, fn, thisArg?)` to map or transform each child in the `children` data structure. +Alt eleman veri yapısındaki her alt elemani eşlemek veya dönüştürmek için `Children.map(children, fn, thisArg?)` öğesini çağırın. ```js src/RowList.js active import { Children } from 'react'; @@ -116,11 +116,11 @@ function RowList({ children }) { } ``` -[See more examples below.](#transforming-children) +[Aşağıda daha fazla örneğe bakınız.](#transforming-children) #### Parameters {/*children-map-parameters*/} -* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component. +* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. * `fn`: The mapping function, similar to the [array `map` method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) callback. It will be called with the child as the first argument and its index as the second argument. The index starts at `0` and increments on each call. You need to return a React node from this function. This may be an empty node (`null`, `undefined`, or a Boolean), a string, a number, a React element, or an array of other React nodes. * **optional** `thisArg`: The [`this` value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) with which the `fn` function should be called. If omitted, it's `undefined`. @@ -149,9 +149,9 @@ function Box({ children }) { // ... ``` -#### Parameters {/*children-only-parameters*/} +#### Parametreler {/*children-only-parameters*/} -* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component. +* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. #### Returns {/*children-only-returns*/} @@ -167,7 +167,7 @@ Otherwise, throws an error. ### `Children.toArray(children)` {/*children-toarray*/} -Call `Children.toArray(children)` to create an array out of the `children` data structure. +Alt eleman veri yapısından bir dizi oluşturmak için `Children.toArray(çocuklar)` öğesini çağırın. ```js src/ReversedList.js active import { Children } from 'react'; @@ -178,15 +178,15 @@ export default function ReversedList({ children }) { // ... ``` -#### Parameters {/*children-toarray-parameters*/} +#### Parametreler {/*children-toarray-parameters*/} -* `children`: The value of the [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) received by your component. +* `children`: Bileşeniniz tarafından alınan [`children` prop](/learn/passing-props-to-a-component#passing-jsx-as-children) değeri. #### Returns {/*children-toarray-returns*/} -Returns a flat array of elements in `children`. +`children` içindeki elemanların düz bir dizisini döndürür. -#### Caveats {/*children-toarray-caveats*/} +#### Uyarılar {/*children-toarray-caveats*/} - Empty nodes (`null`, `undefined`, and Booleans) will be omitted in the returned array. **The returned elements' keys will be calculated from the original elements' keys and their level of nesting and position.** This ensures that flattening the array does not introduce changes in behavior. From 63edea0d18b49d8392e768eadbd7ec0a6c420561 Mon Sep 17 00:00:00 2001 From: anilcanboga Date: Thu, 23 Jan 2025 21:56:12 +0300 Subject: [PATCH 10/10] translate children page --- src/content/reference/react/Children.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/reference/react/Children.md b/src/content/reference/react/Children.md index 337583c05..99ef68bec 100644 --- a/src/content/reference/react/Children.md +++ b/src/content/reference/react/Children.md @@ -141,7 +141,7 @@ Otherwise, returns a flat array consisting of the nodes you've returned from the ### `Children.only(children)` {/*children-only*/} -Call `Children.only(children)` to assert that `children` represent a single React element. +Alt elemanların tek bir React öğesini temsil ettiğini doğrulamak için `Children.only(children)` öğesini çağırın. ```js function Box({ children }) { @@ -155,13 +155,13 @@ function Box({ children }) { #### Returns {/*children-only-returns*/} -If `children` [is a valid element,](/reference/react/isValidElement) returns that element. +Eğer `children` [geçerli bir eleman ise,](/reference/react/isValidElement) bu elemanı döndürür. -Otherwise, throws an error. +Aksi takdirde hata verir. -#### Caveats {/*children-only-caveats*/} +#### Uyarılar {/*children-only-caveats*/} -- This method always **throws if you pass an array (such as the return value of `Children.map`) as `children`.** In other words, it enforces that `children` is a single React element, not that it's an array with a single element. +- Bu yöntem **`children` olarak bir dizi (örneğin, `Children.map`'in dönüş değeri) geçirirseniz her zaman hata fırlatır.** Başka bir deyişle, `children`'ın tek bir React öğesi olmasını zorunlu kılar, ancak bu bir öğe içeren bir dizi olması anlamına gelmez. --- @@ -188,15 +188,15 @@ export default function ReversedList({ children }) { #### Uyarılar {/*children-toarray-caveats*/} -- Empty nodes (`null`, `undefined`, and Booleans) will be omitted in the returned array. **The returned elements' keys will be calculated from the original elements' keys and their level of nesting and position.** This ensures that flattening the array does not introduce changes in behavior. +- Boş node'lar (`null`, `undefined` ve Booleans) döndürülen dizide atlanacaktır. **Döndürülen öğelerin anahtarları, orijinal öğelerin anahtarlarından, iç içe geçme düzeylerinden ve konumlarından hesaplanacaktır.** Bu, dizinin düzleştirilmesinin davranışta değişikliklere yol açmamasını sağlar. --- -## Usage {/*usage*/} +## Kullanım {/*usage*/} -### Transforming children {/*transforming-children*/} +### Children'ı dönüştürmek {/*transforming-children*/} -To transform the children JSX that your component [receives as the `children` prop,](/learn/passing-props-to-a-component#passing-jsx-as-children) call `Children.map`: +Bileşeninizin [`children` prop`u olarak aldığı](/learn/passing-props-to-a-component#passing-jsx-as-children) JSX çocuklarını dönüştürmek için `Children.map` çağrısını yapın: ```js {6,10} import { Children } from 'react'; @@ -214,7 +214,7 @@ function RowList({ children }) { } ``` -In the example above, the `RowList` wraps every child it receives into a `
` container. For example, let's say the parent component passes three `

` tags as the `children` prop to `RowList`: +Yukarıdaki örnekte, `RowList` aldığı her children'ı bir `

` konteynerine sarar. Örneğin, ana bileşenin `RowList` öğesine `children` prop'u olarak üç `

` etiketi ilettiğini varsayalım: ```js