GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Translate "WeakRef and FinalizationRegistry" by diogoosz · Pull Request #491 · javascript-tutorial/pt.javascript.info

Conversation

@diogoosz

@diogoosz diogoosz commented Nov 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Resumo

  • Traduz o artigo "WeakRef and FinalizationRegistry" (1-js/99-js-misc/07-weakref-finalizationregistry/article.md).
  • Traduz as strings voltadas ao usuário nas duas demos interativas embutidas (weakref-dom.view/, weakref-finalizationregistry.view/): rótulos de botão, títulos, placeholders, mensagens de log/console. Identificadores de código, nomes de classe e as tags de evento de log FETCHED_IMAGE/CACHED_IMAGE/CLEANED_IMAGE/FETCHED_FAILED foram deliberadamente deixados sem tradução, já que são usados como tags literais na prosa e no código do artigo.

Nota sobre os diagramas SVG

Os 5 diagramas (weakref-finalizationregistry-01.svg a -05.svg) usam uma estrutura interna de SVG diferente da dos diagramas traduzidos em PRs anteriores: atributos style inline com posicionamento via transform="matrix(...)", em vez de elementos <tspan> com atributos separados de font-family/x. O pipeline de tradução via images.yml + gulp (imageYaml/figuresTranslate) não consegue extrair texto dessa estrutura (a extração retorna resultados vazios ou quase vazios para os 5 arquivos). Seguindo a convenção do projeto de nunca editar SVGs manualmente, essas imagens foram deixadas sem tradução. O único texto narrativo perdido com isso é "WeakRef object" (arquivos 03/04/05) e "Deleted by FinalizationRegistry cleanup callback" (arquivo 05); todo o resto nesses SVGs são identificadores de código/dados que ficariam sem tradução de qualquer forma.

Plano de teste

  • Diff de todos os trechos de código (code spans) entre o original em inglês e a tradução (só a string de log heldValue, traduzida de propósito, é diferente).
  • Grep em busca de falsos cognatos conhecidos (eventualmente/travar/cobrir/atualmente/realizar).
  • Releitura manual completa para checar sentido e concordância de gênero/número.
  • Verificação dos novos links da Wikipédia (Gato de Schrödinger em pt.wikipedia.org; mantive o link de array associativo apontando para en.wikipedia.org, já que não existe artigo em pt.wikipedia.org).

Conforme comentado na #1.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@diogoosz @claude
Translate "WeakRef and FinalizationRegistry" article
fdc5ba9
Translates the article text and the two embedded interactive demos
(weakref-dom.view, weakref-finalizationregistry.view). The 5 SVG
diagrams (weakref-finalizationregistry-01..05.svg) use a different
internal structure (inline style attr + matrix transforms, no
tspan) that the images.yml/gulp translation pipeline cannot parse,
so they are left untranslated rather than hand-edited.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@diogoosz diogoosz mentioned this pull request Nov 9, 2026
Portuguese Translation Progress #1
Open
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/article.md
Isso acontece para cada imagem selecionada:
</br><br>

![](weakref-finalizationregistry-demo-03.gif)

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

As capturas/GIFs da demo (weakref-finalizationregistry-demo-01..08) ainda mostram a UI e os logs em inglês ("Create collage", "Url: ... Size: ... Type: ..."), mas o texto agora fala em "Criar colagem" e o utils.js passa a logar "Tamanho"/"Tipo". Leitor vê botão/log diferente do que o artigo descreve. Sugestão: mencionar o rótulo original entre parênteses ou manter os logs do utils.js iguais às imagens.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry.view/utils.js
const logEl = document.createElement("div");
logEl.classList.add("logger-item", "logger--error");
logEl.innerHTML = `CLEANED_IMAGE: Url: ${imgName}, Size: ${size}, Type: ${type}`;
logEl.innerHTML = `CLEANED_IMAGE: URL: ${imgName}, Tamanho: ${size}, Tipo: ${type}`;

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Log traduzido (Tamanho/Tipo) diverge das imagens do artigo (demo-03..08), que mostram Url: ..., Size: ..., Type: .... Considerar manter o formato original do log para casar com os screenshots, ou aceitar a divergência conscientemente.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/weakref-dom.view/index.html
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<title>WeakRef DOM Logger</title>
<title>Logger DOM com WeakRef</title>

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Conteúdo agora está em português, mas <html lang="en"> (linha 2) não foi alterado. Leitores de tela/hifenização vão tratar o texto como inglês. Sugestão: <html lang="pt-BR">.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/weakref-finalizationregistry.view/index.html
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<title>Photo Library Collage</title>
<title>Colagem da Biblioteca de Fotos</title>

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

Mesmo caso: textos traduzidos, mas <html lang="en"> (linha 2) permanece. Sugestão: <html lang="pt-BR">.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/article.md
```js
// When the user object is deleted by the garbage collector, the following message will be printed in the console:
"John has been collected by the garbage collector."
// Quando o objeto user é excluído pelo coletor de lixo, a seguinte mensagem será exibida na console:

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

"na console" → em pt-BR o termo é masculino: "no console".

Suggested change
// Quando o objeto user é excluído pelo coletor de lixo, a seguinte mensagem será exibida na console:
// Quando o objeto user é excluído pelo coletor de lixo, a seguinte mensagem será exibida no console:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/article.md

Paying attention to the output in the console, you can see, which of the photos were downloaded from the cloud - this is indicated by <span style="background-color:#133159;color:white;font-weight:500">FETCHED_IMAGE</span>.
Since this is the first attempt to create a collage, this means, that at this stage the "weak cache" was still empty, and all the photos were downloaded from the cloud and put in it.
Observando a saída na console, você pode ver quais das fotos foram baixadas da nuvem - isso é indicado por <span style="background-color:#133159;color:white;font-weight:500">FETCHED_IMAGE</span>.

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

"saída na console" → "saída no console" (masculino em pt-BR).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/99-js-misc/07-weakref-finalizationregistry/article.md
To increase page loading speed, it would be reasonable to download and display photo thumbnails in *compressed* quality.
But, to create a collage from selected photos, download and use them in *full-size* quality.
Para aumentar a velocidade de carregamento da página, seria razoável baixar e exibir as miniaturas das fotos em qualidade *comprimida*.
Mas, para criar uma colagem a partir das fotos selecionadas, baixá-las e usá-las em qualidade *tamanho real*.

@gabifs gabifs Nov 12, 2026

Copy link
Copy Markdown
Contributor

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.

"em qualidade tamanho real" soa estranho. Sugestão:

Suggested change
Mas, para criar uma colagem a partir das fotos selecionadas, baixá-las e usá-las em qualidade *tamanho real*.
Mas, para criar uma colagem a partir das fotos selecionadas, baixá-las e usá-las em *tamanho real*.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gabifs gabifs gabifs left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@diogoosz @gabifs
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.