Skip to content

Prototype methods, objects without __proto__ - #482

Open
diogoosz wants to merge 1 commit into
javascript-tutorial:masterfrom
diogoosz:translate-prototype-methods
Open

diogoosz wants to merge 1 commit into
javascript-tutorial:masterfrom
diogoosz:translate-prototype-methods

Conversation

@diogoosz

@diogoosz diogoosz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Tradução do artigo "Prototype methods, objects without proto" para o português, incluindo os exercícios.

Conforme comentado na #1.

…ortuguese

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@@ -1,31 +1,31 @@

# Prototype methods, objects without __proto__
# Métodos de prototype, objetos sem __proto__

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.

Inconsistent terminology: this chapter leaves "prototype" untranslated ("Métodos de prototype", "o prototype de rabbit", ...) while sibling chapters in the same section use "protótipo" (01-prototype-inheritance ~20 times, 03 title "Protótipos Nativos"). Readers moving through 08-prototypes see the term switch. Suggest "Métodos de protótipo" and "protótipo" in prose (keep prototype only in code / as the property name F.prototype).

O único uso de `__proto__` que não é malvisto é como uma propriedade ao criar um novo objeto: `{ __proto__: ... }`.

Although, there's a special method for this too:
Embora, também exista um método especial 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.

Ungrammatical: "Embora" is a subordinating conjunction and needs a main clause; "Embora, também exista um método..." reads as an incomplete sentence.

Suggested change
Embora, também exista um método especial para isso:
Porém, também existe um método especial para isso:

Isso é por motivos históricos.

The prototypal inheritance was in the language since its dawn, but the ways to manage it evolved over time.
A herança prototípica existia na linguagem desde o seu início, mas as formas de gerenciá-la evoluíram com o tempo.

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.

"herança prototípica" here vs "Herança Prototipada" (title and body of 01-prototype-inheritance). Same concept, two names within the section; pick the existing one ("herança prototipada") for consistency.

- Later, in the year 2015, `Object.setPrototypeOf` and `Object.getPrototypeOf` were added to the standard, to perform the same functionality as `__proto__`. As `__proto__` was de-facto implemented everywhere, it was kind-of deprecated and made its way to the Annex B of the standard, that is: optional for non-browser environments.
- Later, in the year 2022, it was officially allowed to use `__proto__` in object literals `{...}` (moved out of Annex B), but not as a getter/setter `obj.__proto__` (still in Annex B).
- A propriedade `prototype` de uma função construtora funciona desde tempos bem antigos. É a forma mais antiga de criar objetos com um prototype dado.
- Depois, no ano de 2012, `Object.create` apareceu no padrão. Isso deu a capacidade de criar objetos com um prototype dado, mas não oferecia a capacidade de obtê-lo/defini-lo. Alguns navegadores implementaram o acessor não padronizado `__proto__`, que permitia ao usuário obter/definir um prototype a qualquer momento, pra dar mais flexibilidade aos desenvolvedores.

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.

"accessor" is translated as "acessor" here but as "propriedade de acesso" at line 146 for the same __proto__ accessor. Use one term throughout (e.g. "o acessor __proto__" / "propriedade acessora").

```

...But that's usually fine for associative arrays.
...Mas isso geralmente não é problema pra arrays associativos.

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.

Register mix: informal "pra" (also lines 82, 83, 97, 119 and 2-dictionary-tostring/solution.md:31 "pra revisar") alongside "para" elsewhere in the same text. Sibling chapters use "para" (02/03 have zero "pra"). Suggest "para" consistently.

Suggested change
...Mas isso geralmente não é problema pra arrays associativos.
...Mas isso geralmente não é problema para arrays associativos.

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