You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sayfada yer alan [MDN] veya [Wikipedia] gibi harici bağlantılar diğer bir bmakaleye yönelikse ve bu makalenin Türkçe dilinde kabul edilebilir kalitede bir sürümü varsa, bağlantıyı bu sürümünkiyle değiştirmeyi düşününüz. Ayrıca Wikipedia Türkiye'de uzun süredir yasaklı olduğu için, Wikipedia linklerini [MDN] veya [EksiSozluk] gibi tanınmış sitelerdeki versiyonları ile değiştirebilirsiniz.
78
+
Sayfada yer alan [MDN] veya [Wikipedia] gibi harici bağlantılar diğer bir makaleye yönelikse ve bu makalenin Türkçe dilinde kabul edilebilir kalitede bir sürümü varsa, bağlantıyı bu sürümünkiyle değiştirmeyi düşününüz. Ayrıca Wikipedia Türkiye'de uzun süredir yasaklı olduğu için, Wikipedia linklerini [MDN] veya [EksiSozluk] gibi tanınmış sitelerdeki versiyonları ile değiştirebilirsiniz.
Copy file name to clipboardExpand all lines: content/blog/2019-02-23-is-react-translated-yet.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ We started of with an initial trial period of three languages: Spanish, Japanese
43
43
44
44
After the trial period, we were ready to accept more languages. I created [a script](https://github.com/reactjs/reactjs.org-translation/blob/master/scripts/create.js) to automate the creation of the new language repo, and a site, [Is React Translated Yet?](https://isreacttranslatedyet.com), to track progress on the different translations. We started *10* new translations on our first day alone!
45
45
46
-
Because of the automation, the rest of the maintance went mostly smoothly. We eventually created a [Slack channel](https://rt-slack-invite.herokuapp.com) to make it easier for translators to share information, and I released a guide solidifying the [responsibilities of maintainers](https://github.com/reactjs/reactjs.org-translation/blob/master/maintainer-guide.md). Allowing translators to talk with each other was a great boon -- for example, the Arabic, Persian, and Hebrew translations were able to talk to each other in order to get [right-to-left text](https://en.wikipedia.org/wiki/Right-to-left) working!
46
+
Because of the automation, the rest of the maintenance went mostly smoothly. We eventually created a [Slack channel](https://rt-slack-invite.herokuapp.com) to make it easier for translators to share information, and I released a guide solidifying the [responsibilities of maintainers](https://github.com/reactjs/reactjs.org-translation/blob/master/maintainer-guide.md). Allowing translators to talk with each other was a great boon -- for example, the Arabic, Persian, and Hebrew translations were able to talk to each other in order to get [right-to-left text](https://en.wikipedia.org/wiki/Right-to-left) working!
var ReactTestUtils =require('react-dom/test-utils'); // ES5 with npm
13
+
var ReactTestUtils =require('react-dom/test-utils'); // ES5 npm ile
14
14
```
15
15
16
-
## Overview {#overview}
16
+
## Genel Bakış {#overview}
17
17
18
-
`ReactTestUtils` makes it easy to test React components in the testing framework of your choice. At Facebook we use [Jest](https://facebook.github.io/jest/) for painless JavaScript testing. Learn how to get started with Jest through the Jest website's [React Tutorial](https://jestjs.io/docs/tutorial-react).
18
+
`ReactTestUtils`, React bileşenlerini seçtiğiniz test çerçevesinde test etmeyi kolaylaştırır. Facebook, JavaScript testi için Jest‘i kullanmaktadır.
19
19
20
-
> Note:
20
+
> Not:
21
21
>
22
-
> We recommend using [`react-testing-library`](https://git.io/react-testing-library)which is designed to enable and encourage writing tests that use your components as the end users do.
22
+
> Bileşenlerinizi son kullanıcı kullanır gibi kullanan testler yazmanız ve etkinleştirmeniz için tasarlanmış [`react-testing-library`](https://git.io/react-testing-library)kullanmanızı öneririz.
23
23
>
24
-
> Alternatively, Airbnb has released a testing utility called [Enzyme](https://airbnb.io/enzyme/), which makes it easy to assert, manipulate, and traverse your React Components' output.
24
+
> Alternatif olarak Airbnb [Enzyme](http://airbnb.io/enzyme/) adında bir test aracı yayınladı. Bu araç, React bileşenlerinizin çıktısını test etmenizi, üzerinde gezinmenizi ve değiştirmenizi kolaylaştırmaktadır.
25
25
26
26
-[`act()`](#act)
27
27
-[`mockComponent()`](#mockcomponent)
@@ -40,30 +40,30 @@ var ReactTestUtils = require('react-dom/test-utils'); // ES5 with npm
40
40
-[`renderIntoDocument()`](#renderintodocument)
41
41
-[`Simulate`](#simulate)
42
42
43
-
## Reference {#reference}
43
+
## Başvuru Dokümanı {#reference}
44
44
45
45
### `act()` {#act}
46
46
47
-
To prepare a component for assertions, wrap the code rendering it and performing updates inside an `act()` call. This makes your test run closer to how React works in the browser.
47
+
Bileşen testlerini hazırlamak için kodunuzu paket haline getirin ve `act()`'i kullanarak bileşeniniz içerisinde güncelleme yapabilirsiniz. `act()`, React'ın tarayıcıda çalışma biçimine çok yakın bir şekilde çalışmasını sağlamaktadır.
48
48
49
-
>Note
49
+
>Not
50
50
>
51
-
>If you use `react-test-renderer`, it also provides an `act`export that behaves the same way.
51
+
>Eğer `react-test-renderer`'ı kullanırsanız, bu size `act`çıktısının aynı şekilde davranmasını sağlar.
52
52
53
-
For example, let's say we have this `Counter`component:
53
+
Örneğin aşağıdaki gibi bir `Counter`bileşenimizin olduğunu düşünün:
expect(label.textContent).toBe('1 kez tıkladınız');
121
+
expect(document.title).toBe('1 kez tıkladınız');
122
122
});
123
123
```
124
124
125
-
Don't forget that dispatching DOM events only works when the DOM container is added to the `document`. You can use a helper like[`react-testing-library`](https://github.com/kentcdodds/react-testing-library)to reduce the boilerplate code.
125
+
Unutmayınız ki, `document`'a DOM container'ı eklenmediği sürece, dispatchEvent() çalışmayacaktır. Bu tarz angarya kodlarla uğraşmamak için,[`react-testing-library`](https://github.com/kentcdodds/react-testing-library)gibi bir kütüphaneyi kullanabilirsiniz.
126
126
127
127
* * *
128
128
@@ -135,11 +135,11 @@ mockComponent(
135
135
)
136
136
```
137
137
138
-
Pass a mocked component module to this method to augment it with useful methods that allow it to be used as a dummy React component. Instead of rendering as usual, the component will become a simple `<div>`(or other tag if `mockTagName`is provided) containing any provided children.
138
+
Mock (sahte ya da taklit) bir React bileşeni olarak kullanılabilmesine izin veren yöntemleri ekleyebilmek için bu metoda mock edilmiş bir bileşen modülü gönderin. Her zamanki gibi render etmesi yerine, bileşen belirtilen herhangi bir alt elemanı içeren basit bir `<div>`olacaktır. (Veya `mockTagName`belirtilmişse, belirtilen eleman olacaktır)
139
139
140
-
> Note:
140
+
> Not:
141
141
>
142
-
> `mockComponent()`is a legacy API. We recommend using [shallow rendering](/docs/shallow-renderer.html) or[`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead.
142
+
> `mockComponent()`eski bir API'dır. [shallow rendering](/docs/shallow-renderer.html)'i veya[`jest.mock()`](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock)'u kullanmanızı tavsiye ederiz.
143
143
144
144
* * *
145
145
@@ -149,7 +149,7 @@ Pass a mocked component module to this method to augment it with useful methods
149
149
isElement(element)
150
150
```
151
151
152
-
Returns `true` if `element`is any React element.
152
+
Eğer `element`herhangi bir React elemanı ise `true` döner.
153
153
154
154
* * *
155
155
@@ -162,7 +162,7 @@ isElementOfType(
162
162
)
163
163
```
164
164
165
-
Returns `true` if `element` is a React element whose type is of a React `componentClass`.
165
+
Eğer `element`, React'ın `componentClass` tipinde olan bir React elemanı ise `true` döner.
166
166
167
167
* * *
168
168
@@ -172,7 +172,7 @@ Returns `true` if `element` is a React element whose type is of a React `compone
172
172
isDOMComponent(instance)
173
173
```
174
174
175
-
Returns `true` if `instance` is a DOM component (such as a `<div>` or `<span>`).
175
+
Eğer `instance`, `div` veya `span` gibi bir DOM bileşeni ise `true` döner
176
176
177
177
* * *
178
178
@@ -182,7 +182,7 @@ Returns `true` if `instance` is a DOM component (such as a `<div>` or `<span>`).
182
182
isCompositeComponent(instance)
183
183
```
184
184
185
-
Returns `true` if `instance` is a user-defined component, such as a class or a function.
185
+
Eğer `instance`, kullanıcı tanımlı sınıf veya fonksiyon gibi bileşeni ise `true` döner.
186
186
187
187
* * *
188
188
@@ -195,7 +195,7 @@ isCompositeComponentWithType(
195
195
)
196
196
```
197
197
198
-
Returns `true` if `instance` is a component whose type is of a React `componentClass`.
198
+
Eğer `instance`, React'ın `componentClass` tipinde olan bir React elemanı ise `true` döner.
199
199
200
200
* * *
201
201
@@ -208,7 +208,7 @@ findAllInRenderedTree(
208
208
)
209
209
```
210
210
211
-
Traverse all components in `tree`and accumulate all components where`test(component)` is `true`. This is not that useful on its own, but it's used as a primitive for other test utils.
211
+
`tree`içindeki tüm bileşenleri dolaşır ve`test(component)`'ın `true` olduğu tüm bileşenleri toplar. Tek başına pek kullanışlı değil, ancak diğer test araçları için basit olarak kullanılmaktadır.
Like [`scryRenderedDOMComponentsWithClass()`](#scryrendereddomcomponentswithclass) but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
237
+
[`scryRenderedDOMComponentsWithClass()`](#scryrendereddomcomponentswithclass)'a benzerdir, ancak sadece bir sonuç olmasını bekler ve geriye sonucu döndürür. (Birden fazla eşleşme varsa exception fırlatır).
Like [`scryRenderedDOMComponentsWithTag()`](#scryrendereddomcomponentswithtag) but expects there to be one result, and returns that one result, or throws exception if there is any other number of matches besides one.
263
+
[`scryRenderedDOMComponentsWithTag()`](#scryrendereddomcomponentswithtag)'a benzerdir, ancak sadece bir sonuç olmasını bekler ve geriye sonucu döndürür. (Birden fazla eşleşme varsa exception fırlatır).
Same as [`scryRenderedComponentsWithType()`](#scryrenderedcomponentswithtype) but expects there to be one result and returns that one result, or throws exception if there is any other number of matches besides one.
289
+
[`scryRenderedComponentsWithType()`](#scryrenderedcomponentswithtype)'a benzerdir, ancak sadece bir sonuç olmasını bekler ve geriye sonucu döndürür. (Birden fazla eşleşme varsa exception fırlatır).
290
290
291
291
***
292
292
@@ -296,20 +296,20 @@ Same as [`scryRenderedComponentsWithType()`](#scryrenderedcomponentswithtype) bu
296
296
renderIntoDocument(element)
297
297
```
298
298
299
-
Render a React element into a detached DOM node in the document. **This function requires a DOM.**It is effectively equivalent to:
299
+
Bir React öğesini dökümandan ayrılmış bir DOM elemanı olarak render edin. **Bu fonksiyonun DOM'a ihtiyacı vardır.**Şuna eşdeğerdir:
300
300
301
301
```js
302
302
constdomContainer=document.createElement('div');
303
303
ReactDOM.render(element, domContainer);
304
304
```
305
305
306
-
> Note:
306
+
> Not:
307
307
>
308
-
> You will need to have `window`, `window.document`and`window.document.createElement` globally available **before** you import `React`. Otherwise React will think it can't access the DOM and methods like `setState`won't work.
308
+
> `React`'a eklemeden **önce** global olarak hazır olan `window`, `window.document`ve`window.document.createElement`'e ihtiyacınız olacaktır. Aksi takdirde React DOM'a erişemediğini düşünecektir ve böylece `setState`gibi metodlar çalışmayacaktır.
309
309
310
310
* * *
311
311
312
-
## Other Utilities {#other-utilities}
312
+
## Diğer Araçlar {#other-utilities}
313
313
314
314
### `Simulate` {#simulate}
315
315
@@ -320,30 +320,30 @@ Simulate.{eventName}(
320
320
)
321
321
```
322
322
323
-
Simulate an event dispatch on a DOM node with optional `eventData` event data.
323
+
İsteğe bağlı olan `eventData` olay verileri ile bir DOM elemanı üzerinde olay gönderimini simüle edebilirsiniz.
324
324
325
-
`Simulate` has a method for [every event that React understands](/docs/events.html#supported-events).
325
+
`Simulate`, [React'in anlayabildiği her olay](/docs/events.html#support-events) için bir metoda sahiptir.
> You will have to provide any event property that you're using in your component (e.g. keyCode, which, etc...) as React is not creating any of these for you.
347
+
> React'ın sağlayamadığı ama bileşeninizde kullandığınız herhangi bir olay özelliğini (örneğin, keyCode, which, vb...) sizin sağlamanız gerekmektedir.
0 commit comments