Translate 'Element size and scrolling' to Portuguese by diogoosz · Pull Request #507 · javascript-tutorial/pt.javascript.info
Repository navigation
Translate 'Element size and scrolling' to Portuguese - #507
Merged
gabifs merged 4 commits into javascript-tutorial:master from diogoosz:translate-size-and-scroll Dec 6, 2026
Merged
Translate 'Element size and scrolling' to Portuguese #507 gabifs merged 4 commits into javascript-tutorial:master from diogoosz:translate-size-and-scroll
Conversation
diogoosz commented Nov 21, 2026 · edited Loading
Copy link Copy Markdown
Contributor
Resumo
Traduz o artigo "Element size and scrolling" para o português, incluindo os 4 exercícios desta pasta e os sandboxes referenciados (metric.view, cssWidthScroll.view).
Os 6 SVGs com texto traduzível (metric-css.svg, metric-client-left-top.svg, metric-client-left-top-rtl.svg, metric-client-width-height.svg, metric-client-width-nopadding.svg, metric-offset-width-height.svg) tiveram apenas os rótulos de anotação em prosa traduzidos (ex.: "border" → "borda", "padding" → "preenchimento", "content width:" → "largura do conteúdo:", "scrollbar" → "barra de rolagem", "height:" → "altura:") via images.yml + pipeline do gulp. Os rótulos que são nomes de propriedades (offsetWidth, clientHeight, scrollTop etc.) foram mantidos como identificadores de código. Os demais SVGs (metric-all.svg, metric-offset-parent.svg, metric-scroll-top.svg, metric-scroll-width-height.svg) só têm nomes de propriedades e código, por isso não precisaram de tradução.
O parágrafo de preenchimento genérico "Ecma Standard" (usado apenas para demonstrar overflow/rolagem) foi deixado em inglês tanto nos SVGs quanto nas demos interativas, para manter consistência entre eles.
Conforme comentado na #1 (reivindicado anteriormente por @danilolmc em 2024, sem PR desde então).
Plano de teste
- Diff de todos os trechos de código (code spans) entre o original em inglês e a tradução.
- Grep em busca de falsos cognatos conhecidos e registro informal.
- Confirmação via
git diff --stat -- '*.svg'de que apenas os 6 SVGs passados pelo pipeline foram alterados (nenhuma edição manual). - Releitura manual completa para checar sentido e concordância.
Translate 'Element size and scrolling' article to Portuguese
baed348
Includes the 4 exercise subfolders and the referenced sandbox demos (metric.view, cssWidthScroll.view). Translates the prose annotation labels (border, padding, content width, scrollbar, height) in 6 SVGs via images.yml + gulp pipeline; property-name labels (offsetWidth, clientHeight, etc.) are kept as code identifiers. The generic "Ecma Standard" filler paragraph used to demonstrate overflow is left in English in both the SVGs and the live demos, for consistency between them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>gabifs mentioned this pull request Nov 22, 2026 Portuguese Translation Progress #1 Open gabifs reviewed Nov 22, 2026
View reviewed changes
gabifs reviewed Nov 22, 2026
View reviewed changes
gabifs reviewed Nov 22, 2026
View reviewed changes
gabifs reviewed Nov 22, 2026
View reviewed changes
Fix overlapping SVG labels flagged by gabifs
b510f73
Translated labels longer than the English originals overlapped the adjacent values, which stay at their original fixed x position: - "content width:" -> shortened to "conteúdo:" (metric-css.svg, metric-client-width-height.svg, metric-offset-width-height.svg) - "padding:" and "scrollbar" left untranslated in metric-css.svg, where the longer PT text ran into the "20px" value or past the image's right edge - "CSS width:" -> "larg. CSS:", matching the original's length Regenerated via the images.yml pipeline and verified the resulting tspan positions no longer collide. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
diogoosz commented Nov 22, 2026
Copy link Copy Markdown
Contributor
Author
|
Obrigado pela revisão cuidadosa, @gabifs ! Os rótulos foram encurtados no |
Restore all SVGs in this chapter to upstream English originals
c0666e4
Per gabifs (on PR javascript-tutorial#505/javascript-tutorial#511, same rule applies here): SVG files in the repo always stay identical to the English upstream; translation is applied only from images.yml, never by committing a translated file, whether hand-edited or generated by the figuresTranslate pipeline. This includes two files (metric-client-left-top.svg, metric-client-left-top-rtl.svg) that had been committed translated since before this round of fixes. All images.yml entries, including the label-width fixes from the previous commit, stay as-is. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
diogoosz commented Nov 22, 2026
Copy link Copy Markdown
Contributor
Author
|
@gabifs , antes de você rechecar: percebi que o mesmo problema valia aqui, então já corrigi por conta própria. Restaurei todos os SVGs do capítulo pra versão original em inglês (incluindo |
diogoosz commented Nov 25, 2026
Copy link Copy Markdown
Contributor
Author
|
@gabifs Revisei os 4 comentários sobre sobreposição de rótulos e todos já tinham sido corrigidos em commits anteriores (rótulos encurtados no |
View reviewed changes
gabifs 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 .
Obrigado pelas correções, @diogoosz ! Conferi tudo e está tudo certo. Aprovado ✅
Merge branch 'master' into translate-size-and-scroll
5a5ce90
# Conflicts: # images.ymlgabifs merged commit
ab5f4a9
into
javascript-tutorial : master
Dec 6, 2026
1 check passed
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment