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 — Modules, introduction by diogoosz · Pull Request #490 · javascript-tutorial/pt.javascript.info

Conversation

@diogoosz

@diogoosz diogoosz commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Tradução do artigo "Modules, introduction" para o português.

Conforme comentado na #1. Obs.: esse título já havia sido reivindicado por @adriavieira314 em fev/2020, sem PR desde então — estou assumindo a tradução.

Sorry, something went wrong.

Uh oh!

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

All reactions
@diogoosz @claude
Translate "Modules, introduction" article to Portuguese
ccc00d3
Co-Authored-By: Claude Sonnet 5 <[email protected]>
gabifs
gabifs reviewed Nov 12, 2026
View reviewed changes
Comment thread 1-js/13-modules/01-modules-intro/article.md

// 📁 1.js
import `./alert.js`; // Module is evaluated!
import `./alert.js`; // O módulo foi avaliado!

@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.

O exemplo usa crases: import ./alert.js;. Isso é erro de sintaxe: import exige uma string literal, não aceita template literal. Quem copiar o exemplo recebe um SyntaxError. O erro já vem do original em inglês, mas a linha foi mexida aqui, então dá para corrigir as duas importações (143 e 146):

Suggested change
import `./alert.js`; // O módulo foi avaliado!
import './alert.js'; // O módulo foi avaliado!

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/13-modules/01-modules-intro/article.md
```

### A module code is evaluated only the first time when imported
### Um código de módulo é avaliado só na primeira vez em que é importado

@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.

O título ficou truncado, porque "Um código de módulo" soa estranho em português. Sugestão:

Suggested change
### Um código de módulo é avaliado só na primeira vez em que é importado
### O código de um módulo é avaliado só na primeira vez em que é importado

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/13-modules/01-modules-intro/article.md
### Num módulo, o "this" é undefined

That's kind of a minor feature, but for completeness we should mention it.
Esse é meio que um recurso secundário, mas, pra ficar completo, devemos mencioná-lo.

@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.

O registro oscila entre formal e coloquial: "pra" aparece 6 vezes (L61, L244, L357, L384, L414, L416) e "para" 11 vezes, além de "pro" (L196) e "meio que" (aqui). Vale padronizar para a forma escrita ("para", "para o"), como no resto do tutorial.

Suggested change
Esse é meio que um recurso secundário, mas, pra ficar completo, devemos mencioná-lo.
Esse é um recurso secundário, mas, para ficar completo, devemos mencioná-lo.

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/13-modules/01-modules-intro/article.md
### Sempre "use strict"

Modules always work in strict mode. E.g. assigning to an undeclared variable will give an error.
Módulos sempre funcionam em modo estrito. Ex.: atribuir a uma variável não declarada vai gerar um erro.

@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.

"Ex.:" no começo de frase (aqui e na L189) não aparece em nenhum outro artigo traduzido do repositório. A abreviação "ex." costuma ser usada só dentro de parênteses. Sugestão:

Suggested change
Módulos sempre funcionam em modo estrito. Ex.: atribuir a uma variável não declarada vai gerar um erro.
Módulos sempre funcionam em modo estrito. Por exemplo, atribuir a uma variável não declarada vai gerar um erro.

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/13-modules/01-modules-intro/article.md
```

## Build tools
## Ferramentas de build

@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.

A terminologia ficou inconsistente: o título diz "Ferramentas de build", mas o texto usa "ferramentas de empacotamento" (L357, L392) e "empacotadores" para a mesma coisa. Vale unificar ("Ferramentas de empacotamento (build)", ou usar "build" no texto todo).

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/13-modules/01-modules-intro/article.md

```smart
In the browser, we can make a variable window-level global by explicitly assigning it to a `window` property, e.g. `window.user = "John"`.
No navegador, podemos tornar uma variável global em nível de window atribuindo-a explicitamente a uma propriedade de `window`, ex.: `window.user = "John"`.

@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.

"Global em nível de window" é um decalque meio confuso de "window-level global". Sugestão: "podemos tornar uma variável global, no nível de window, atribuindo-a explicitamente a uma propriedade de window, por exemplo, window.user = \"John\"."

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/13-modules/01-modules-intro/article.md
```js
// 📁 alert.js
alert("Module is evaluated!");
alert("O módulo foi avaliado!");

@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.

Strings dentro do código ficaram inconsistentes: esta ("O módulo foi avaliado!") e "Roda em navegadores modernos" (L365) foram traduzidas, mas Ready to serve, ... (L203/L225) e Hello, ${user}! (L34/L45) continuaram em inglês. Melhor escolher um padrão: ou traduz todas as strings de saída, ou deixa todas em inglês.

Sorry, something went wrong.

Uh oh!

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

All reactions
@gabifs gabifs mentioned this pull request Nov 12, 2026
Portuguese Translation Progress #1
Open
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 01402503 — 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.