Skip to content

translate createRoot #523

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

Merged
merged 5 commits into from
Jan 31, 2024
Merged

translate createRoot #523

merged 5 commits into from
Jan 31, 2024

Conversation

alpererdogan8
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Jan 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
tr-legacy-reactjs-org ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2024 4:44pm

Copy link

github-actions bot commented Jan 28, 2024

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@serkanisyapan serkanisyapan self-assigned this Jan 28, 2024
Copy link
Collaborator

@serkanisyapan serkanisyapan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazı kelimeler için genel kullandığımız çevirilere TRANSLATION.md sayfasından göz atabilirsin daha önce görmediysen. Eline sağlık düzelttikten sonra merge edelim.

@@ -16,11 +16,11 @@ const root = createRoot(domNode, options?)

---

## Reference {/*reference*/}
## Başvuru dokümanı {/*reference*/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Başvuru dokümanı {/*reference*/}
## Referans {/*reference*/}

Burayı referans olarak çeviriyoruz.


### `createRoot(domNode, options?)` {/*createroot*/}

Call `createRoot` to create a React root for displaying content inside a browser DOM element.
İçeriği bir tarayıcı DOM öğesi içinde görüntülemek üzere bir React kökü oluşturmak için `createRoot` çağrısı yapın.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
İçeriği bir tarayıcı DOM öğesi içinde görüntülemek üzere bir React kökü oluşturmak için `createRoot` çağrısı yapın.
İçeriği bir tarayıcı DOM elemanı içinde görüntülemek üzere bir React kökü oluşturmak için `createRoot` çağrısı yapın.

öğesi yerine elemanı olarak çevirelim.


* `domNode`: A [DOM element.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React will create a root for this DOM element and allow you to call functions on the root, such as `render` to display rendered React content.
* `domNode`: React bu [DOM elemanı](https://developer.mozilla.org/en-US/docs/Web/API/Element) için bir kök oluşturacak ve işlenmiş React içeriğini görüntülemek için `render` gibi kök üzerinde fonksiyonlar çağırmanıza izin verecektir.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `domNode`: React bu [DOM elemanı](https://developer.mozilla.org/en-US/docs/Web/API/Element) için bir kök oluşturacak ve işlenmiş React içeriğini görüntülemek için `render` gibi kök üzerinde fonksiyonlar çağırmanıza izin verecektir.
* `domNode`: Bir [DOM elemanı.](https://developer.mozilla.org/en-US/docs/Web/API/Element) React bu DOM elemanı için bir kök oluşturacak ve `render` gibi render edilmiş React içeriğini görüntülemek için kök üzerinde fonksiyonlar çağırmanıza izin verecektir.

Çeviri böyle daha anlamlı oluyor sanki.


* **optional** `onRecoverableError`: Callback called when React automatically recovers from errors.
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page.
* **opsiyonel** `onRecoverableError`: React'in hatalardan otomatik olarak kurtulduğunda çağrılan geri arama fonksiyonu.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **opsiyonel** `onRecoverableError`: React'in hatalardan otomatik olarak kurtulduğunda çağrılan geri arama fonksiyonu.
* **opsiyonel** `onRecoverableError`: React'in hatalardan otomatik olarak kurtulduğunda çağrılan callback fonksiyonu.

callback olarak bırakıyoruz. TRANSLATION.md dosyasından kontrol edebilirsiniz.


#### Returns {/*returns*/}
#### Geri dönüşler {/*returns*/}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### Geri dönüşler {/*returns*/}
#### Döndürülenler {/*returns*/}

döndürülenler olarak çeviriyoruz burayı.


If your app is server-rendered and includes the initial HTML generated by React, you might notice that creating a root and calling `root.render` deletes all that HTML, and then re-creates all the DOM nodes from scratch. This can be slower, resets focus and scroll positions, and may lose other user input.
Uygulamanız sunucu tarafından oluşturulmuşsa ve React tarafından oluşturulan ilk HTML'yi içeriyorsa, bir kök oluşturmanın ve `root.render` çağrısının tüm bu HTML'yi sildiğini ve ardından tüm DOM düğümlerini sıfırdan yeniden oluşturduğunu fark edebilirsiniz. Bu daha yavaş olabilir, odak ve kaydırma konumlarını sıfırlayabilir ve diğer kullanıcı girdilerini kaybedebilir.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Uygulamanız sunucu tarafından oluşturulmuşsa ve React tarafından oluşturulan ilk HTML'yi içeriyorsa, bir kök oluşturmanın ve `root.render` çağrısının tüm bu HTML'yi sildiğini ve ardından tüm DOM düğümlerini sıfırdan yeniden oluşturduğunu fark edebilirsiniz. Bu daha yavaş olabilir, odak ve kaydırma konumlarını sıfırlayabilir ve diğer kullanıcı girdilerini kaybedebilir.
Uygulamanız sunucu tarafından render ediliyorsa ve React tarafından oluşturulan ilk HTML'yi içeriyorsa, bir kök oluşturmanın ve `root.render` çağrısının tüm bu HTML'yi sildiğini ve ardından tüm DOM düğümlerini sıfırdan yeniden oluşturduğunu fark edebilirsiniz. Bu daha yavaş olabilir, odak ve kaydırma konumlarını sıfırlayabilir ve diğer kullanıcı girdilerini kaybedebilir.


Server-rendered apps must use [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) instead of `createRoot`:
Sunucu tarafından oluşturulan uygulamalar `createRoot` yerine [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) kullanmalıdır:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Sunucu tarafından oluşturulan uygulamalar `createRoot` yerine [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) kullanmalıdır:
Sunucu tarafından render edilen uygulamalar `createRoot` yerine [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) kullanmalıdır:

Aynı çeviri

@@ -288,28 +288,28 @@ nav ul li { display: inline-block; margin-right: 20px; }

</Sandpack>

You could also create a new DOM node with [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) and add it to the document manually.
Ayrıca [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) ile yeni bir DOM düğümü oluşturabilir ve bunu belgeye manuel olarak ekleyebilirsiniz.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ayrıca [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) ile yeni bir DOM düğümü oluşturabilir ve bunu belgeye manuel olarak ekleyebilirsiniz.
Ayrıca [`document.createElement()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement) ile yeni bir DOM düğümü oluşturabilir ve bunu dokümana manuel olarak ekleyebilirsiniz.

document kelimesini eski çeviride doküman olarak çevirmişler. Yeni çeviri de örnek bulamadım açıkçası. Tartışabiliriz. Bir kaç yerde daha var bu sayfada.

root.render(<Comment />);
document.body.appendChild(domNode); // You can add it anywhere in the document
document.body.appendChild(domNode); // Belgenin herhangi bir yerine ekleyebilirsiniz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
document.body.appendChild(domNode); // Belgenin herhangi bir yerine ekleyebilirsiniz
document.body.appendChild(domNode); // Dokümanın herhangi bir yerine ekleyebilirsiniz

@@ -374,46 +374,46 @@ const root = createRoot(domNode);
root.render(<App />);
```

For example, if `domNode` is `null`, it means that [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) returned `null`. This will happen if there is no node in the document with the given ID at the time of your call. There may be a few reasons for it:
Örneğin, `domNode` `null` ise, [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) `null` döndürmüş demektir. Bu, çağrınız sırasında belgede verilen kimliğe sahip bir düğüm yoksa gerçekleşir. Bunun birkaç nedeni olabilir:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Örneğin, `domNode` `null` ise, [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) `null` döndürmüş demektir. Bu, çağrınız sırasında belgede verilen kimliğe sahip bir düğüm yoksa gerçekleşir. Bunun birkaç nedeni olabilir:
Örneğin, `domNode` `null` ise, [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) `null` döndürmüş demektir. Bu, çağrınız sırasında dokümanda verilen kimliğe sahip bir düğüm yoksa gerçekleşir. Bunun birkaç nedeni olabilir:

@serkanisyapan
Copy link
Collaborator

Hepsini tek tek commit etmene gerek yok. Kendi editöründe hepsini düzelttikten sonra fix: requested changes gibi tek bir commit yapabilirsin @alpererdogan8

@alpererdogan8
Copy link
Contributor Author

Tamamdır teşekkür ederim, öyle yaparım o zaman :)

@alpererdogan8
Copy link
Contributor Author

Revizelerin için teşekkür ederim eline sağlık @serkanisyapan.
İlgili düzenlemeleri yaptım.
TRANSLATION.md sayfasına göz attım ama baya gözümden kaçan varmış bunun içinde kusura bakma lütfen uğraştırdım seni de.

@serkanisyapan serkanisyapan merged commit 9b23691 into reactjs:main Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants