Native prototypes by flaviohblima · Pull Request #233 · javascript-tutorial/pt.javascript.info
Repository navigation
Native prototypes - #233
Merged
nazarepiedady merged 21 commits into javascript-tutorial:master from flaviohblima:develop-native-prototypes Aug 5, 2024
Merged
Native prototypes #233 nazarepiedady merged 21 commits into javascript-tutorial:master from flaviohblima:develop-native-prototypes
Conversation
flaviohblima commented Nov 1, 2021
Copy link Copy Markdown
Contributor
No description provided.
FEAT: Translate native-prototypes (article,tasks & solutions).
0f761e8
javascript-translate-bot
added
the
review needed
label
Nov 1, 2021
javascript-translate-bot
requested a review
from a team
November 1, 2021 18:40
javascript-translate-bot
mentioned this pull request
Nov 1, 2021
Portuguese Translation Progress
#1
Open
Match line numbers to original.
e994eaf
odsantos
requested changes
Nov 17, 2021
View reviewed changes
odsantos 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 .
Hello @flaviohblima ,
Here is a review.
Please, feel free to leave me a note where you might disagree.
Thank you,
Osvaldo.
javascript-translate-bot commented Nov 17, 2021
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
CLAassistant commented Dec 10, 2021 · edited Loading
Copy link Copy Markdown
|
|
Update 1-js/08-prototypes/03-native-prototypes/article.md
52dcc16
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
cfa5101
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
c836a26
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
4770f5f
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
86e78a1
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
1fdbd84
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
c1fc6cf
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
209f35c
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
7961a93
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
1a0745c
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
197c4f2
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
926a671
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
aa5ca52
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
54b79a7
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
2b35857
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
fa8bf24
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Update 1-js/08-prototypes/03-native-prototypes/article.md
8842a59
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
flaviohblima commented Feb 26, 2022
Copy link Copy Markdown
Contributor
Author
|
/done |
View reviewed changes
odsantos 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 .
Hi @flaviohblima ,
There are other sections of this lesson not translated yet, such as 01, and 02.
Plase, feel free to also tell where you disagree.
Thanks, Osvaldo.
Comment thread 1-js/08-prototypes/03-native-prototypes/2-defer-to-prototype-extended/solution.mdOutdated
| Note que: nós usamos `this` no `f.apply` para nossa decoração funcionar para métodos de objetos . | ||
|
|
||
| So if the wrapper function is called as an object method, then ` this ` is passed to the original method `f`. | ||
| Então, se a função * wrapper * é chamada como um método de um objeto, então o this é passado para o método `f` original . |
Outdated
| ``` | ||
|
|
||
| Where's the code that generates the string `"[object Object]"`? That's a built-in `toString` method, but where is it? The `obj` is empty ! | ||
| Onde está o código que gera a string `"[object Object]"`? Isso é um método embutido `toString` , mas onde ele está? O `obj` está vazio ! |
Outdated
| Onde está o código que gera a string `"[object Object]"`? Isso é um método embutido `toString` , mas onde ele está? O `obj` está vazio ! | ||
|
|
||
| ... But the short notation `obj = {}` is the same as `obj = new Object()`, where `Object` is a built-in object constructor function, with its own `prototype` referencing a huge object with `toString` and other methods . | ||
| ... Mas a notação abreviada `obj = {}` é o mesmo que `obj = new Object()`, onde `Object` é uma função construtora embutida, com seu próprio `prototype` referenciando um objeto enorme com `toString` e outros métodos . |
Outdated
| ``` | ||
|
|
||
| Please note that there is no additional `[[Prototype]]` in the chain above `Object.prototype`: | ||
| Note que não há um `[[Prototype]]` adicional na cadeia acima de `Object.prototype`: |
Outdated
| ## Outros protótipos embutidos | ||
|
|
||
| Other built-in objects such as `Array`, `Date`, `Function` and others also keep methods in prototypes . | ||
| Outros objetos embutidos, como `Array`, `Date`, `Function` , entre outros, também mantém métodos nos seus protótipos . |
Outdated
| Ele funciona porque o algoritmo interno do método `join` embutido só precisa dos índices corretos e da propriedade `length` . Ele não confere se o objeto é de fato uma array. Muitos métodos enbutidos são assim . | ||
|
|
||
| Another possibility is to inherit by setting `obj.__proto__` to `Array.prototype`, so all `Array` methods are automatically available in `obj`. | ||
| Outra possibilidade é herdar configurando `obj.__proto__` para `Array.prototype`, de forma que todos os métodos de `Array` fiquem automaticamente disponíveis em `obj`. |
Outdated
| - Built-in prototypes can be modified or populated with new methods. But it's not recommended to change them. The only allowable case is probably when we add-in a new standard, but it's not yet supported by the JavaScript engine | ||
| - Todos os objetos enbutidos seguem o mesmo padrão : | ||
| - Os métodos são guardados no protótipo (`Array.prototype`, `Object.prototype`, `Date.prototype`, etc.) | ||
| - O objeto só guarda os dados nele mesmo (itens de array, propriedades de objetos, a data ) |
Outdated
|  | ||
|
|
||
| When `new Object()` is called (or a literal object `{...}` is created ), the `[[Prototype]]` of it is set to `Object.prototype` according to the rule that we discussed in the previous chapter : | ||
| Quando `new Object()` é chamado (ou um objeto literal `{...}` é criado ), o seu `[[Prototype]]` é configurado para o `Object.prototype` de acordo com a regra que nós discutimos no capítulo anterior : |
Outdated
|  | ||
|
|
||
| Other built-in objects also work the same way. Even functions -- they are objects of a built-in `Function` constructor, and their methods (`call`/`apply` and others) are taken from `Function.prototype`. Functions have their own `toString` too . | ||
| Outros objetos embutidos também trabalham da mesma forma. Até mesmo funções -- elas são objetos de um construtor `Function` embutido, e seus métodos (`call`/`apply` e outros) são obtidos de `Function.prototype`. Funções também têm seu próprio `toString`. |
Outdated
| Como sabemos, eles não são objetos. Mas se nós tentarmos acessar as propriedades deles, temporariamente são criados objetos que contém os construtores embutidos `String`, `Number` and `Boolean`. Eles fornecem os métodos e disaparecem . | ||
|
|
||
| These objects are created invisibly to us and most engines optimize them out, but the specification describes it exactly this way. Methods of these objects also reside in prototypes, available as `String.prototype`, `Number.prototype` and `Boolean.prototype`. | ||
| Esses objetos são criados invisivelmente para nós e a maioria dos interpretadores (* engines *) otimizam esse processo, apesar da especificação descrevê-lo exatamente dessa forma. Os métodos desses objetos também residem nos protótipos, disponíveis como `String.prototype`, `Number.prototype` e `Boolean.prototype`. |
javascript-translate-bot commented Dec 10, 2022
Copy link Copy Markdown
|
Please make the requested changes. After it, add a comment "/done". |
odsantos commented Dec 21, 2022
Copy link Copy Markdown
Contributor
|
Hi @flaviohblima , Still working on this? Thanks, |
jonnathan-ls commented Sep 18, 2023
Copy link Copy Markdown
Contributor
|
Olá @flaviohblima , tudo bem? Conseguiria avaliar as solicitações registradas pelo @odsantos ? Com o prosseguimento e resolução de conflitos, sigo com minha revisão para darmos andamento a este PR |
nazarepiedady commented Mar 5, 2024
Copy link Copy Markdown
Member
|
@jonnathan-ls , could you update this pull request? |
nazarepiedady commented May 14, 2024
Copy link Copy Markdown
Member
|
@peruibeloko , could you do something about this pull request? |
Merge branch 'master' of https://github.com/javascript-tutorial/pt.ja...
2d40fdd
...vascript.info into pr/233
refactor: fixes merge conflict, notes according to PR review and adds...
06ba0db
... pending translations
jonnathan-ls commented Jun 1, 2024 · edited Loading
Copy link Copy Markdown
Contributor
@nazarepiedady I fixed merge conflict fixes and observations recorded by @odsantos , also added some outstanding translations in the last 2 commtis 2d40fdd and 06ba0db Could you rate the changes and add a review? If necessary, I will contribute again |
View reviewed changes
jonnathan-ls 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 .
With the contribution of this PR #233 (comment) , I am adding my LGTM
javascript-translate-bot added needs +1 and removed changes requested labels Jun 1, 2024 nazarepiedady approved these changes Aug 5, 2024View reviewed changes
nazarepiedady left a comment
Copy link Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more .
It is time to go ahead with this pull request.
nazarepiedady merged commitb681b75
into
javascript-tutorial : master
Aug 5, 2024
javascript-translate-bot commented Aug 5, 2024
Copy link Copy Markdown
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |