LSLínguas Sem BenaventeInglês para brasileiros

Aula

Descrever mudanças em código

Nível: A2

Objetivo

Descrever mudanças em código usando verbos no past simple (added, removed, updated, renamed, refactored, deleted, moved) referindo-se a arquivos e funções, e redigir um resumo simples de pull request.

Explicação

Em um resumo de pull request ou em uma mensagem de commit, as ações são descritas no passado com verbos específicos para cada tipo de mudança:

Tipo de mudançaVerbo típico
criar algo novo`added`, `created`
apagar algo`removed`, `deleted`
alterar algo existente`updated`, `changed`, `fixed`
trocar o nome`renamed`
reorganizar sem mudar comportamento`refactored`
mover de lugar`moved`

O padrão é curto: `sujeito + verbo no past + objeto`. Em PRs em primeira pessoa, o sujeito é geralmente `I` ou `We`:

  • `I added a logout button to the header.`
  • `I removed the deprecated ` + "`" + `getUserData` + "`" + ` function.`
  • `We updated the error message in ` + "`" + `checkout.js` + "`" + `.`
  • `I renamed ` + "`" + `handleClick` + "`" + ` to ` + "`" + `handleConfirm` + "`" + `.`
  • `I refactored the validation block in ` + "`" + `utils.js` + "`" + `.`

Ao se referir a arquivos, funções e variáveis, use o nome exato do código entre crases e mantenha a forma como ele aparece no projeto: `the ` + "`" + `validateInput` + "`" + ` function`, `the ` + "`" + `auth.js` + "`" + ` file`, `the ` + "`" + `count` + "`" + ` variable`.

Um resumo de pull request curto segue a estrutura `This PR + verbo + resumo do que mudou + onde`. Pode listar mais de uma mudança separadas por `and` ou usar bullet points simples:

  • `This PR adds a logout button and updates the header styles.`
  • `This PR renames ` + "`" + `handleClick` + "`" + ` to ` + "`" + `handleConfirm` + "`" + ` and removes an unused function.`
  • `This PR fixes the empty-cart bug in ` + "`" + `cart.js` + "`" + `.`

Em PRs e descrições de commit, o tempo verbal é consistentemente o passado simples para descrever o que já foi feito no branch.

Exemplos

InglêsTraduçãoObservação
I added a logout button to the header.Eu adicionei um botão de logout ao cabeçalho.Added introduz algo novo.
I removed the deprecated `getUserData` function.Eu removi a função `getUserData` obsoleta.Removed apaga algo; o nome do código fica entre crases.
I renamed `handleClick` to `handleConfirm`.Eu renomeei `handleClick` para `handleConfirm`.Renamed usa o padrão `renamed X to Y`.
I refactored the validation logic in `utils.js`.Eu refatorei a lógica de validação em `utils.js`.Refactored indica reorganização interna.
This PR updates the checkout button label and renames one function.Este PR atualiza o rótulo do botão de checkout e renomeia uma função.Resumo de PR com this PR + verbo no passado + and.
I moved the helper to `src/utils/`.Eu movi o helper para `src/utils/`.Moved indica mudança de local, geralmente para um caminho.

Erros comuns

  • Usar o presente em vez do passado: `I add a function` deve ser `I added a function` em PRs e commits.
  • Esquecer o `to` em `renamed X to Y`: `I renamed the function ` + "`" + `fetchUser` + "`" + ` ` deve ser seguido de `to ` + "`" + `getUser` + "`" + `.
  • Confundir `updated` (mudou algo existente) com `added` (criou algo novo): se o item já existia, use `updated`, não `added`.
  • Escrever nomes de código em português: mantenha `file`, `function`, `variable` em inglês, mesmo com substantivos PT nas descrições.
  • Misturar tempos no mesmo resumo: `This PR adds X and fixed Y` deve ser `This PR adds X and fixes Y` ou `This PR added X and fixed Y`.

Prática guiada

Reescreva cada resumo usando o verbo correto no past simple:

  • Criar um botão novo → `I ___ a new button.`
  • Trocar o nome de uma função → `I ___ ` + "`" + `oldName` + "`" + ` to ` + "`" + `newName` + "`" + `.`
  • Apagar código que ninguém usa → `I ___ the unused function.`
  • Melhorar a estrutura sem mudar o comportamento → `I ___ the validation block.`

Observe que cada verbo descreve um tipo diferente de mudança: adicionar, renomear, remover, refatorar.

Resumo

Use verbos no past simple específicos para cada tipo de mudança: added, removed, updated, renamed, refactored, moved. Mantenha o nome do código entre crases e siga o padrão `This PR + verbo + resumo + local` no PR.

Vocabulário

Palavras principais

18 itens
addedadicionou (incluiu algo novo)

I added a new validation function.

Eu adicionei uma nova função de validação.
removedremoveu (apagou algo)

I removed the legacy import.

Eu removi o import legado.
updatedatualizou (alterou algo existente)

I updated the README with the new steps.

Eu atualizei o README com os novos passos.
renamedrenomeou (trocou o nome)

I renamed `fetchData` to `loadData`.

Eu renomeei `fetchData` para `loadData`.
refactoredrefatorou (reorganizou o código)

I refactored the payment module.

Eu refatorei o módulo de pagamento.
movedmoveu (mudou de lugar)

I moved the helper to `src/utils/`.

Eu movi o helper para `src/utils/`.
deleteddeletou (apagou de forma definitiva)

I deleted the unused test file.

Eu deletei o arquivo de teste não usado.
filearquivo

I changed the file `api.js`.

Eu alterei o arquivo `api.js`.
functionfunção

The `validateInput` function returns a boolean.

A função `validateInput` retorna um booleano.
variablevariável

I renamed the variable from `cnt` to `count`.

Eu renomeei a variável de `cnt` para `count`.
parameterparâmetro

I added a new parameter to the function.

Eu adicionei um novo parâmetro à função.
modulemódulo

I refactored the authentication module.

Eu refatorei o módulo de autenticação.
deprecatedobsoleto (marcado para remoção futura)

I removed the deprecated `oldHelper`.

Eu removi o `oldHelper` obsoleto.
pull requestpull request (solicitação de integração de código)

I opened a pull request with the changes.

Eu abri um pull request com as mudanças.
branchbranch (linha de desenvolvimento)

I created a new branch called `fix/login`.

Eu criei um novo branch chamado `fix/login`.
mergemerge (união do branch com o principal)

We merged the branch into `main`.

Nós fizemos merge do branch em `main`.
This PR …Este PR … (resumo curto de pull request)

This PR adds a dark mode toggle.

Este PR adiciona um alternador de modo escuro.
renamed X to Yrenomeou X para Y

I renamed `onClick` to `handleClick`.

Eu renomeei `onClick` para `handleClick`.

História

História: Descrever mudanças em código

Nível: A2

História em inglês

The checkout button fix

Last Tuesday, Nina opened a new branch called `fix/checkout-button` to work on a small UI issue. She read the existing component and found an outdated label in `CheckoutButton.jsx`. Before she changed anything, she investigated the issue and ran the local tests. When did the bug start? She found a recent ticket that mentioned the new checkout flow. She made a short plan: update the label, rename one function, and remove an unused helper. Did she ask for a review before merging? No, she didn't — she wanted to finish the PR first.

The pull request summary

Nina updated the button label in `CheckoutButton.jsx` and changed its color. She renamed `handleClick` to `handleConfirm` so the name matched the new behavior. She also removed the deprecated `legacyClick` function and deleted the related test. Then she refactored the validation block in `cart.js` to make it easier to read. She wrote the pull request summary: "This PR updates the checkout button label, renames `handleClick` to `handleConfirm`, removes the deprecated `legacyClick` function, and refactors the validation block." A teammate reviewed the changes, didn't find any issues, and the team merged the branch and deployed the fix.

Tradução linha por linha

InglêsTradução
Last Tuesday, Nina opened a new branch called `fix/checkout-button` to work on a small UI issue.Na terça passada, Nina abriu um novo branch chamado `fix/checkout-button` para trabalhar em um pequeno problema de UI.
She read the existing component and found an outdated label in `CheckoutButton.jsx`.Ela leu o componente existente e encontrou um rótulo desatualizado em `CheckoutButton.jsx`.
Before she changed anything, she investigated the issue and ran the local tests.Antes de mudar qualquer coisa, ela investigou o problema e executou os testes locais.
When did the bug start? She found a recent ticket that mentioned the new checkout flow.Quando o bug começou? Ela encontrou um ticket recente que mencionava o novo fluxo de checkout.
She made a short plan: update the label, rename one function, and remove an unused helper.Ela fez um plano curto: atualizar o rótulo, renomear uma função e remover um helper não usado.
Did she ask for a review before merging? No, she didn't — she wanted to finish the PR first.Ela pediu review antes do merge? Não, ela não pediu — ela queria terminar o PR primeiro.
Nina updated the button label in `CheckoutButton.jsx` and changed its color.Nina atualizou o rótulo do botão em `CheckoutButton.jsx` e mudou a cor dele.
She renamed `handleClick` to `handleConfirm` so the name matched the new behavior.Ela renomeou `handleClick` para `handleConfirm` para o nome combinar com o novo comportamento.
She also removed the deprecated `legacyClick` function and deleted the related test.Ela também removeu a função `legacyClick` obsoleta e deletou o teste relacionado.
Then she refactored the validation block in `cart.js` to make it easier to read.Em seguida, ela refatorou o bloco de validação em `cart.js` para ficar mais fácil de ler.
She wrote the pull request summary: "This PR updates the checkout button label, renames `handleClick` to `handleConfirm`, removes the deprecated `legacyClick` function, and refactors the validation block."Ela escreveu o resumo do pull request: "Este PR atualiza o rótulo do botão de checkout, renomeia `handleClick` para `handleConfirm`, remove a função `legacyClick` obsoleta e refatora o bloco de validação."
A teammate reviewed the changes, didn't find any issues, and the team merged the branch and deployed the fix.Um colega revisou as mudanças, não encontrou nenhum problema, e a equipe fez merge do branch e implantou a correção.

Notas de vocabulário

  • opened a new branch = expressão comum em git: criar um branch a partir do principal
  • I read the existing component = ler o código antes de modificar; usei o verbo read no past simple
  • I found an outdated label = found é o past simple de find; usei para localizar um problema
  • I updated the button label = updated descreve mudança em algo que já existia
  • renamed `handleClick` to `handleConfirm` = padrão clássico de rename: renamed X to Y
  • removed the deprecated function = removed apaga; deprecated indica que algo estava marcado para remoção
  • refactored the validation block = refactored indica reorganização sem mudar o comportamento externo
  • This PR … = abreviação de pull request; o resumo começa com This PR + verbo

Perguntas de compreensão

  1. What kind of branch did Nina open to start her work?
  2. What did Nina find when she read the component?
  3. Why did Nina rename `handleClick` to `handleConfirm`?
  4. Which function did Nina remove from the project?
  5. What did the pull request summary mention about the validation block?
  6. Did the teammate find any issues in the review?

Prática com a história

  1. Resuma: Nina adicionou um campo de busca, renomeou `getResults` para `fetchResults` e removeu uma função não usada.
  2. Reescreva no past simple: I rename the helper to `loadConfig`.
  3. Classifique a mudança: I removed an unused import from `app.js`.
  4. Faça uma pergunta com when sobre a criação do branch.

Prática

Exercícios e teste

Próxima etapa
7blocos de exercícios disponíveis neste tema
10questões de teste para revisar depois da aula

A próxima melhoria é transformar esses arquivos em perguntas com resposta no navegador. Por enquanto, esta página já organiza o estudo e permite seguir a aula inteira sem abrir os arquivos manualmente.