Skip to content

Translate page dont-call-proptypes.md - #19

Merged
cezaraugusto merged 3 commits into
reactjs:masterfrom
matheusmonte:master
Feb 9, 2019
Merged

Translate page dont-call-proptypes.md #19
cezaraugusto merged 3 commits into
reactjs:masterfrom
matheusmonte:master

Conversation

@matheusmonte

Copy link
Copy Markdown
Contributor

Signed-off-by: Matheus Clark dos Santos Monte matheus.m@samsung.com

Signed-off-by: Matheus Clark dos Santos Monte <matheus.m@samsung.com>
@matheusmonte matheusmonte changed the title Translate page dont-call-proptypes.md to Pt-BR Translate page dont-call-proptypes.md Feb 8, 2019
@matheusmonte

Copy link
Copy Markdown
Contributor Author

#1 Warning -> Don't call Proptypes Warning Page

Comment thread content/warnings/dont-call-proptypes.md Outdated
Comment thread content/warnings/dont-call-proptypes.md Outdated
Comment thread content/warnings/dont-call-proptypes.md Outdated
Comment thread content/warnings/dont-call-proptypes.md Outdated
```

In this case, `ThirdPartyPropTypes.deprecated` is a wrapper calling `PropTypes.bool`. This pattern by itself is fine, but triggers a false positive because React thinks you are calling PropTypes directly. The next section explains how to fix this problem for a library implementing something like `ThirdPartyPropTypes`. If it's not a library you wrote, you can file an issue against it.
Nesse caso, `ThirdPartyPropTypes.deprecated` 茅 um wrapper chamando `PropTypes.bool`. Esse padr茫o por si s贸 j谩 茅 o suficiente, mas dispara um falso positivo pelo fato do React pensar que est谩 chamando diretamente a PropTypes. No pr贸ximo t贸pico, iremos explicar como resolver esse problema para a implementa莽茫o de uma biblioteca, algo como `ThirdPartyPropTypes`. Caso n茫o seja uma biblioteca que voc锚 escreveu, voc锚 pode abrir um issue por isso.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Nesse caso, `ThirdPartyPropTypes.deprecated` 茅 um wrapper chamando `PropTypes.bool`. Esse padr茫o por si s贸 j谩 茅 o suficiente, mas dispara um falso positivo pelo fato do React pensar que est谩 chamando diretamente a PropTypes. No pr贸ximo t贸pico, iremos explicar como resolver esse problema para a implementa莽茫o de uma biblioteca, algo como `ThirdPartyPropTypes`. Caso n茫o seja uma biblioteca que voc锚 escreveu, voc锚 pode abrir um issue por isso.
Nesse caso, `ThirdPartyPropTypes.deprecated` 茅 um wrapper chamando `PropTypes.bool`. Esse padr茫o por si s贸 j谩 茅 o suficiente. Mas, dispara um falso positivo pelo fato do React pensar que est谩 chamando diretamente a PropTypes. No pr贸ximo t贸pico, iremos explicar como resolver esse problema para a implementa莽茫o de uma biblioteca, algo como `ThirdPartyPropTypes`. Caso n茫o seja uma biblioteca que voc锚 escreveu, voc锚 pode abrir um issue para isso.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Acho a modifica莽茫o de "[...], mas [...]" para "[...]. Mas, [...]" errada neste caso.

Comment thread content/warnings/dont-call-proptypes.md
Se voc锚 茅 o autor de uma biblioteca terceira com PropTypes e permite que seus usu谩rios fa莽am wrap de uma React PropTypes existente, provavelmente eles come莽ar茫o a receber esse warning da sua biblioteca. Isso acontece porque o React n茫o enxerga um 煤ltimo par芒metro "secreto" que passa a [detectar](https://github.com/facebook/react/pull/7132) manualmente as chamadas da PropTypes.

Here is how to fix it. We will use `deprecated` from [react-bootstrap/react-prop-types](https://github.com/react-bootstrap/react-prop-types/blob/0d1cd3a49a93e513325e3258b28a82ce7d38e690/src/deprecated.js) as an example. The current implementation only passes down the `props`, `propName`, and `componentName` arguments:
Aqui est谩 como corrigir isso. Usaremos `deprecated` daqui [react-bootstrap/react-prop-types](https://github.com/react-bootstrap/react-prop-types/blob/0d1cd3a49a93e513325e3258b28a82ce7d38e690/src/deprecated.js) como exemplo. A atual implementa莽茫o s贸 passa adiante as `props`, `propName`, and `componentName` arguments:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Aqui est谩 como corrigir isso. Usaremos `deprecated` daqui [react-bootstrap/react-prop-types](https://github.com/react-bootstrap/react-prop-types/blob/0d1cd3a49a93e513325e3258b28a82ce7d38e690/src/deprecated.js) como exemplo. A atual implementa莽茫o s贸 passa adiante as `props`, `propName`, and `componentName` arguments:
Aqui est谩 como corrigir isso. Usaremos `deprecated` daqui [react-bootstrap/react-prop-types](https://github.com/react-bootstrap/react-prop-types/blob/0d1cd3a49a93e513325e3258b28a82ce7d38e690/src/deprecated.js) como exemplo. A atual implementa莽茫o s贸 passa adiante as `props`, `propName`, e`componentName` arguments:

Comment thread content/warnings/dont-call-proptypes.md

@glaucia86 glaucia86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@matheusmonte algumas altera莽玫es a serem corrigidas.
Pedimos que deem uma olhada no review feito e quando for corrigir, pedimos que marque como 'Resolve Conversation'

Ap贸s aprova莽茫o de 2 code reviews, iremos aprovar a sua contribui莽茫o. Muito obrigada! :)

@glaucia86 glaucia86 added the needs review A pull request ready to be reviewed label Feb 8, 2019
Matheus Clark dos Santos Monte added 2 commits February 8, 2019 17:35
Signed-off-by: Matheus Clark dos Santos Monte <matheus.m@samsung.com>
Signed-off-by: Matheus Clark dos Santos Monte <matheus.m@samsung.com>
@glaucia86

Copy link
Copy Markdown
Contributor

cc: @cezaraugusto could you see if this PR it's okay?

@cezaraugusto cezaraugusto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice translation, LGTM. thanks @matheusmonte!

@cezaraugusto

Copy link
Copy Markdown
Contributor

@glaucia86 could you do a follow-up PR with the changes you requested here? I'm merging now

@cezaraugusto
cezaraugusto merged commit 7b70339 into reactjs:master Feb 9, 2019
@cezaraugusto cezaraugusto added 馃寪 translated Translation is completed for this page and removed needs review A pull request ready to be reviewed labels Feb 9, 2019
devin-ai-integration Bot pushed a commit to WalissonRodrigo/pt-br.react.dev that referenced this pull request Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

馃寪 translated Translation is completed for this page

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants