- Notifications
You must be signed in to change notification settings - Fork111
Native prototypes#233
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Native prototypes#233
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
javascript-translate-bot commentedNov 17, 2021
Please make the requested changes. After it, add a comment "/done". |
CLAassistant commentedDec 10, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
Co-authored-by: Osvaldo Dias dos Santos <osvaldo.msdsantos@yahoo.com>
/done |
There was a problem hiding this comment.
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.
Note que: nós usamos`this`no`f.apply`para nossa decoração funcionar para métodos de objetos. | ||
So if thewrapper 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 othis é passado para o método`f` original. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Então, se a função*wrapper*é chamada como um método deumobjeto,então othis é passado para o método`f` original. | |
Então, se a função*wrapper*for chamada como um método de objeto,o`this` é passado para o método`f` original. |
``` | ||
Where's the code that generates thestring`"[object Object]"`?That's a built-in`toString` method, but where is it? The`obj`is empty! | ||
Onde está o código que gera astring`"[object Object]"`?Isso é um método embutido`toString`, mas onde ele está? O`obj`está vazio! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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! | |
Onde está o código que gera a string`"[object Object]"`?Isto vem de um método embutido`toString`, mas onde ele está? O`obj` está vazio! |
Onde está o código que gera astring`"[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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
...Mas anotaçã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. | |
...Anotação abreviada`obj = {}` é o mesmo que`obj = new Object()`. Onde`Object` é uma função construtora embutida, comoseu próprio`prototype` referenciando um objeto enorme, possuindo`toString` e outros métodos. |
``` | ||
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`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Note que não há um`[[Prototype]]` adicional na cadeia acima de`Object.prototype`: | |
Note quena cadeia, acima de`Object.prototype`,não há um`[[Prototype]]` adicional: |
##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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Outros objetos embutidos, como`Array`,`Date`,`Function`,entre outros, tambémmantém métodos nos seus protótipos. | |
Outros objetos embutidos, como`Array`,`Date`,`Function`,etc., tambémtêm métodos nos seus protótipos. |
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 umaarray.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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Outra possibilidade éherdar configurando`obj.__proto__` para`Array.prototype`, de forma que todos os métodos de`Array` fiquem automaticamente disponíveis em`obj`. | |
Outra possibilidade éherdando, configurando`obj.__proto__` para`Array.prototype`, de forma que todos os métodos de`Array` fiquem automaticamente disponíveis em`obj`. |
-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 JavaScriptengine | ||
-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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
- O objeto só guarda os dados nele mesmo (itens de array, propriedades de objetos,a data) | |
- O objeto só guarda os dados nele mesmo (itens de array, propriedades de objetos,uma data) |
 | ||
When`new Object()`is called (or aliteralobject`{...}`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 objetoliteral`{...}`é criado),o seu`[[Prototype]]`é configurado para o`Object.prototype`de acordo com a regra que nós discutimos no capítulo anterior: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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: | |
Quando`new Object()` éinvocado (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: |
 | ||
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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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`. | |
Outros objetos embutidos também trabalham da mesma forma. Até mesmo funções -- elas são objetos de um construtor`Function` embutido, eosseus métodos (`call`/`apply`, e outros) são obtidos de`Function.prototype`. Funções também têm o seu próprio`toString`. |
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 mostengines 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Esses objetos são criados invisivelmente para nós e a maioria dos interpretadores (*engines*) otimizam esse processo, apesar da especificação descrevê-lo exatamentedessa forma. Os métodos desses objetos também residem nos protótipos, disponíveis como`String.prototype`,`Number.prototype` e`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 exatamentedesta 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 commentedDec 10, 2022
Please make the requested changes. After it, add a comment "/done". |
Hi@flaviohblima , Still working on this? Thanks, |
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 |
@jonnathan-ls, could you update this pull request? |
@peruibeloko, could you do something about this pull request? |
jonnathan-ls commentedJun 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@nazarepiedady I fixed merge conflict fixes and observations recorded by@odsantos, also added some outstanding translations in the last 2 commtis2d40fdd and06ba0db Could you rate the changes and add a review? If necessary, I will contribute again |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
javascript-translate-bot commentedAug 5, 2024
Thank you 💖 I updated the Progress Issue#1 🎉 🎉 🎉 |
No description provided.