Skip to content

Translate "JSON methods, toJSON" article to Portuguese - #475

Merged
gabifs merged 2 commits into
javascript-tutorial:masterfrom
diogoosz:translate-json-methods
Nov 21, 2026
Merged

gabifs merged 2 commits into
javascript-tutorial:masterfrom
diogoosz:translate-json-methods

Conversation

@diogoosz

@diogoosz diogoosz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Tradução do artigo "JSON methods, toJSON" para o português, incluindo os dois exercícios.
Conforme comentado na #1.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---

# Exclude backreferences
# Excluir referências cíclicas

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.

Título "referências cíclicas" destoa do corpo/artigo, que usam "referências circulares" em todo lugar. Sugestão para manter a terminologia consistente:

Suggested change
# Excluir referências cíclicas
# Excluir referências circulares

---

# Turn the object into JSON and back
# Transforme o objeto em JSON e de volta

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.

"e de volta" fica incompleto em português (de volta para quê?). Sugestão:

Suggested change
# Transforme o objeto em JSON e de volta
# Converta o objeto em JSON e de volta para objeto

Comment thread 1-js/05-data-types/12-json/article.md Outdated
*!*name*/!*: "John", // erro: nome da propriedade sem aspas
"surname": *!*'Smith'*/!*, // erro: aspas simples no valor (devem ser duplas)
*!*'isAdmin'*/!*: false // erro: aspas simples na chave (devem ser duplas)
"birthday": *!*new Date(2000, 2, 3)*/!*, // erro: não é permitido usar "new", apenas valores soltos

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.

"bare values" aqui significa valores literais/puros (sem expressões). "valores soltos" não transmite isso. Sugestão: // erro: não é permitido usar "new", apenas valores literais.

Comment thread 1-js/05-data-types/12-json/article.md Outdated
O valor de `meetup.date` é uma string, não um objeto `Date`. Como o `JSON.parse` saberia que deveria transformar essa string em um `Date`?

Let's pass to `JSON.parse` the reviving function as the second argument, that returns all values "as is", but `date` will become a `Date`:
Vamos passar para o `JSON.parse` a função `reviver` como segundo argumento, que retorna todos os valores "como estão", mas `date` se tornará um `Date`:

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.

Original diz "the reviving function" (descritivo). Com reviver em código, sugere um identificador chamado reviver, mas a função do exemplo é anônima. Sugestão: "a função de restauração (reviver)" ou "uma função reviver".

@@ -1,4 +1,3 @@

```js run

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.

Remoção da linha em branco inicial/final não faz parte da tradução e gera ruído no diff contra o upstream (dificulta sync futuro). Considere reverter as mudanças só de whitespace.

- Fix terminology mismatch: title said "referências cíclicas" while
  the body uses "referências circulares" throughout
- Fix incomplete title: "e de volta" (back to what?) -> "e de volta
  para objeto"
- "valores soltos" doesn't convey "bare values" (literal values, no
  expressions) -> "valores literais"
- "a função `reviver`" implies a function literally named `reviver`,
  but the example uses an anonymous function -> "a função de
  restauração (*reviver*)"
- Revert whitespace-only changes (leading/trailing blank lines) in
  2-serialize-event-circular/solution.md that aren't part of the
  translation and only add noise against upstream

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@diogoosz

Copy link
Copy Markdown
Contributor Author

Obrigado, @gabifs! Apliquei tudo: "referências cíclicas"→"referências circulares" (bate com o corpo do texto), completei o título "e de volta"→"e de volta para objeto", "valores soltos"→"valores literais", "a função reviver"→"a função de restauração (reviver)" (evita sugerir um identificador específico), e revertidas as mudanças de whitespace no solution.md.

@gabifs
gabifs merged commit 3586af4 into javascript-tutorial:master Nov 21, 2026
1 check passed
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