Skip to content

Translate React.Component page #47

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

Closed
wants to merge 66 commits into from

Conversation

arekmaz
Copy link
Contributor

@arekmaz arekmaz commented Mar 7, 2019

This is the translation for the 'React.Component' page in API reference.

@netlify
Copy link

netlify bot commented Mar 7, 2019

Deploy preview for pl-reactjs ready!

Built with commit 4364cda

https://deploy-preview-47--pl-reactjs.netlify.com

@cvqprs cvqprs added the needs review A pull request ready to be reviewed label Mar 10, 2019
@jakubdrozdek jakubdrozdek added work in progress Author opened the pull-request but it's still being worked on and removed needs review A pull request ready to be reviewed labels Mar 11, 2019
@arekmaz arekmaz assigned arekmaz and unassigned arekmaz Mar 26, 2019
@arekmaz arekmaz marked this pull request as ready for review April 7, 2019 07:24
@arekmaz arekmaz requested a review from a team April 7, 2019 07:24
@arekmaz arekmaz added needs review A pull request ready to be reviewed and removed work in progress Author opened the pull-request but it's still being worked on labels Apr 7, 2019
Copy link
Member

@bartlomiejzuber bartlomiejzuber left a comment

Choose a reason for hiding this comment

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

Dodałem kilka komentarzy. Bardzo dobra robota. 👍

4. React DOM efficiently updates the DOM to match `<h1>Hello, Sara</h1>`.
1. Wywołujemy `ReactDOM.render()` z elementem `<Welcome name="Sara" />`.
2. React wywołuje komponent `Welcome` z właściwościami `{name: 'Sara'}`.
3. Nasz komponent `Welcome` jako wynik zwraca element `<h1>Cześć, Sara</h1>`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
3. Nasz komponent `Welcome` jako wynik zwraca element `<h1>Cześć, Sara</h1>`.
3. Nasz komponent `Welcome`, zwraca jako wynik element `<h1>Cześć, Sara</h1>`.

>
>To learn more about the reasoning behind this convention, please read [JSX In Depth](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [dogłębną analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [dogłębną analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).
>Aby dowiedzieć się więcej o uzasadnieniu tej konwencji, przeczytaj [szczegółową analizę składni JSX](/docs/jsx-in-depth.html#user-defined-components-must-be-capitalized).

>
>React treats components starting with lowercase letters as DOM tags. For example, `<div />` represents an HTML div tag, but `<Welcome />` represents a component and requires `Welcome` to be in scope.
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` było w zasięgu (ang. *scope*).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` było w zasięgu (ang. *scope*).
>React traktuje komponenty zaczynające się od małej litery jako tagi drzewa DOM. Na przykład, `<div />` reprezentuje HTML-owy znacznik 'div', ale już `<Welcome />` reprezentuje komponent i wymaga, aby `Welcome` był w zasięgu (ang. *scope*).

@@ -233,30 +233,30 @@ function Comment(props) {

[](codepen://components-and-props/extracting-components-continued)

Extracting components might seem like grunt work at first, but having a palette of reusable components pays off in larger apps. A good rule of thumb is that if a part of your UI is used several times (`Button`, `Panel`, `Avatar`), or is complex enough on its own (`App`, `FeedStory`, `Comment`), it is a good candidate to be a reusable component.
Wyciąganie komponentów może z początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyczną zasadą jest, że jeśli część twojego interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`), jest ona dobrym kandydatem do stania się komponentem wielokrotnego użytku.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Wyciąganie komponentów może z początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyczną zasadą jest, że jeśli część twojego interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`), jest ona dobrym kandydatem do stania się komponentem wielokrotnego użytku.
Wyciąganie komponentów może na początku wydawać się żmudnym zajęciem, ale posiadanie palety pozwalających na ponowne użycie komponentów jest opłacalne w większych aplikacjach. Dobrą praktyką jest tworzenie komponentów wielokrotnego użytku, jeśli część interfejsu użytkownika jest używana wielokrotnie (np. `Button`, `Panel`, `Avatar`) lub jest ona dostatecznie skomplikowana sama w sobie (np. `App`, `FeedStory`, `Comment`).

function handleStatusChange(status) {
setIsOnline(status.isOnline);
}

Copy link
Member

Choose a reason for hiding this comment

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

🤔 Nie bardzo rozumiem dlaczego przeniosłeś tę funkcję do środka useEffect ? Raczej nie zmieniamy kodu, jedynie nanosimy tłumaczenie.

useEffect(() => {
function handleStatusChange(status) {
Copy link
Member

Choose a reason for hiding this comment

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

To samo co wyżej.

useEffect(() => {
function handleStatusChange(status) {
Copy link
Member

Choose a reason for hiding this comment

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

To samo co wyżej.


In the example below, we embed the result of calling a JavaScript function, `formatName(user)`, into an `<h1>` element.
W poniższym przykładzie umiejscawiamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
W poniższym przykładzie umiejscawiamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`:
W poniższym przykładzie umieszczamy wynik wywołania funkcji javascriptowej `formatName(user)` wewnątrz znacznika `<h1>`:

@arekmaz
Copy link
Contributor Author

arekmaz commented Apr 13, 2019

@bartlomiejzuber Te pliki, do których masz uwagi nie są częścią tego PRa. Te zmiany wynikają z tego, że zrobiłem (bezsensownie) rebase tego brancha. Zmianom w tym PRze uległ głównie plik content/docs/reference-react-component.md i pliki w nim zaembedowane. Chyba otworzę nowego PRa, w którym będą tylko moje zmiany dla przejrzystości. Sory za kłopot.

@arekmaz
Copy link
Contributor Author

arekmaz commented Apr 13, 2019

Otworzyłem nowy PR do tej strony #71

@arekmaz arekmaz closed this Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 long page - more than 400 lines Long page needs review A pull request ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.