chore(i18n,docs): update translations (#42994)
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
This guide will help you understand our infrastructure stack and how we maintain our platforms. While this guide does not have exhaustive details for all operations, it could be used as a reference for your understanding of the systems.
|
||||
|
||||
Let us know, if you have feedback or queries, and we will be happy to clarify.
|
||||
Fale com a gente, se você tiver algum comentário ou dúvidas, e teremos prazer em esclarecê-las.
|
||||
|
||||
# Flight Manual - Code deployments
|
||||
|
||||
@ -14,45 +14,45 @@ This involves three steps to be followed in sequence:
|
||||
2. These changes are run through a series of automated tests.
|
||||
3. Once the tests pass we release the changes (or update them if needed) to deployments on our infrastructure.
|
||||
|
||||
#### Building the codebase - Mapping Git Branches to Deployments.
|
||||
#### Compilando a base de código - mapeando branches do Git para implementações.
|
||||
|
||||
Typically, [`main`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main) (the default development branch) is merged into the [`prod-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) branch once a day and is released into an isolated infrastructure.
|
||||
Normalmente, é feito um merge de [`main`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main) (branch padrão de desenvolvimento) na branch [`production-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) uma vez ao dia e liberada em uma infraestrutura isolada.
|
||||
|
||||
This is an intermediate release for our developers and volunteer contributors. It is also known as our "staging" or "beta" release.
|
||||
This is an intermediate release for our developers and volunteer contributors. É também conhecida como a nossa versão de "preparo" (staging) ou "beta".
|
||||
|
||||
It is identical to our live production environment at `freeCodeCamp.org`, other than it using a separate set of databases, servers, web-proxies, etc. This isolation lets us test ongoing development and features in a "production" like scenario, without affecting regular users of freeCodeCamp.org's main platforms.
|
||||
Ela é idêntica ao nosso ambiente de produção em `freeCodeCamp.org`, tirando o fato de ela usar um conjunto separado de bancos de dados, servidores, web-proxies, etc. Este isolamento nos permite testar o desenvolvimento e as funcionalidades de forma contínua em um cenário semelhante ao de "produção", sem que os usuários regulares da plataforma principal do freeCodeCamp.org sejam afetados.
|
||||
|
||||
Once the developer team [`@freeCodeCamp/dev-team`](https://github.com/orgs/freeCodeCamp/teams/dev-team/members) is happy with the changes on the staging platform, these changes are moved every few days to the [`prod-current`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-current) branch.
|
||||
Uma vez que a equipe de desenvolvedores [`@freeCodeCamp/dev-team`](https://github.com/orgs/freeCodeCamp/teams/dev-team/members) esteja feliz com as mudanças na plataforma de preparo, essas alterações são movidas a cada poucos dias para a branch [`production-current`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-current).
|
||||
|
||||
This is the final release that moves changes to our production platforms on freeCodeCamp.org.
|
||||
|
||||
#### Testing changes - Integration and User Acceptance Testing.
|
||||
#### Testando alterações - Teste de integração e de aceitação do usuário.
|
||||
|
||||
We employ various levels of integration and acceptance testing to check on the quality of the code. All our tests are done through software like [GitHub Actions CI](https://github.com/freeCodeCamp/freeCodeCamp/actions) and [Azure Pipelines](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp).
|
||||
|
||||
We have unit tests for testing our challenge solutions, Server APIs and Client User interfaces. These help us test the integration between different components.
|
||||
Temos testes unitários para nossas soluções de desafio, APIs do servidor e interfaces de usuário e cliente. These help us test the integration between different components.
|
||||
|
||||
> [!NOTE] We are also in the process of writing end user tests which will help in replicating real world scenarios like updating an email or making a call to the API or third-party services.
|
||||
|
||||
Together these tests help in preventing issues from repeating themselves and ensure we do not introduce a bug while working on another bug or a feature.
|
||||
Juntos, esses testes ajudam a evitar que problemas se repitam e garantem que não introduzimos um erro enquanto trabalhamos em outra falha ou recurso.
|
||||
|
||||
#### Deploying Changes - Pushing changes to servers.
|
||||
|
||||
We have configured continuous delivery software to push changes to our development and production servers.
|
||||
|
||||
Once the changes are pushed to the protected release branches, a build pipeline is automatically triggered for the branch. The build pipelines are responsible for building artifacts and keeping them in a cold storage for later use.
|
||||
Uma vez que as alterações são enviadas para as branches de lançamento protegidas, um pipeline de construção é automaticamente acionado para a branch. Os pipelines de compilação são responsáveis pela compilação de artefatos e os guardam em um armazenamento de longo prazo para uso posterior.
|
||||
|
||||
The build pipeline goes on to trigger a corresponding release pipeline if it completes a successful run. The release pipelines are responsible for collecting the build artifacts, moving them to the servers and going live.
|
||||
O pipeline de compilação aciona um correspondente pipeline de lançamento se ele completar uma execução bem-sucedida. The release pipelines are responsible for collecting the build artifacts, moving them to the servers and going live.
|
||||
|
||||
Status of builds and releases are [available here](#build-test-and-deployment-status).
|
||||
Estado de compilações e lançamentos estão [disponíveis aqui](#build-test-and-deployment-status).
|
||||
|
||||
## Trigger a build, test and deploy
|
||||
## Acione uma compilação, um teste e uma implantação
|
||||
|
||||
Currently, only members on the developer team can push to the production branches. The changes to the `production-*` branches can land only via fast-forward merge to the [`upstream`](https://github.com/freeCodeCamp/freeCodeCamp).
|
||||
Atualmente, somente membros da equipe de desenvolvedores podem dar push nas branches de produção. As alterações nas branches `production-*` podem ser enviadas para [`upstream`](https://github.com/freeCodeCamp/freeCodeCamp) apenas por meio de um fast-forward merge.
|
||||
|
||||
> [!NOTE] In the upcoming days we would improve this flow to be done via pull-requests, for better access management and transparency.
|
||||
> [!NOTE] Nos próximos dias, nós vamos melhorar este fluxo a ser feito por meio de pull-requests, para melhor gerenciamento de acesso e transparência.
|
||||
|
||||
### Pushing changes to Staging Applications.
|
||||
### Enviando alterações para aplicações em fase de preparo.
|
||||
|
||||
1. Configure your remotes correctly.
|
||||
|
||||
@ -69,7 +69,7 @@ Currently, only members on the developer team can push to the production branche
|
||||
upstream git@github.com:freeCodeCamp/freeCodeCamp.git (push)
|
||||
```
|
||||
|
||||
2. Make sure your `main` branch is pristine and in sync with the upstream.
|
||||
2. Certifique-se de que a sua branch `main` está intacta e sincronizada com a upstream.
|
||||
|
||||
```sh
|
||||
git checkout main
|
||||
@ -79,22 +79,22 @@ Currently, only members on the developer team can push to the production branche
|
||||
|
||||
3. Check that the GitHub CI is passing on the `main` branch for upstream.
|
||||
|
||||
The [continuous integration](https://github.com/freeCodeCamp/freeCodeCamp/actions) tests should be green and PASSING for the `main` branch. Click the green check mark next to the commit hash when viewing the `main` branch code.
|
||||
The [continuous integration](https://github.com/freeCodeCamp/freeCodeCamp/actions) tests should be green and PASSING for the `main` branch. Clique na marca de verificação verde próximo ao hash do commit quando estiver visualizando o código da branch `main`.
|
||||
|
||||
<details> <summary> Checking status on GitHub Actions (screenshot) </summary>
|
||||
<details> <summary> Verificando o status no GitHub Actions (captura de tela) </summary>
|
||||
<br>
|
||||

|
||||

|
||||
</details>
|
||||
|
||||
If this is failing you should stop and investigate the errors.
|
||||
Se houver falhas, você deve parar e investigar os erros.
|
||||
|
||||
4. Confirm that you are able to build the repository locally.
|
||||
4. Confirme se você consegue compilar o repositório localmente.
|
||||
|
||||
```
|
||||
npm run clean-and-develop
|
||||
```
|
||||
|
||||
5. Move changes from `main` to `prod-staging` via a fast-forward merge
|
||||
5. Mova as alterações da `main` para a `production-staging` através de um fast-forward merge
|
||||
|
||||
```
|
||||
git checkout prod-staging
|
||||
@ -106,19 +106,19 @@ Currently, only members on the developer team can push to the production branche
|
||||
>
|
||||
> If they do, you may have done something incorrectly and you should just start over.
|
||||
|
||||
The above steps will automatically trigger a run on the build pipeline for the `prod-staging` branch. Once the build is complete, the artifacts are saved as `.zip` files in a cold storage to be retrieved and used later.
|
||||
As etapas acima vão disparar automaticamente uma execução no pipeline de compilação para a branch `production-staging`. Quando a compilação estiver completa, os artefatos são salvos como arquivos `.zip` em um armazenamento de longo prazo para serem recuperados e usados mais tarde.
|
||||
|
||||
The release pipeline is triggered automatically when a fresh artifact is available from the connected build pipeline. For staging platforms, this process does not involve manual approval and the artifacts are pushed to the Client CDN and API servers.
|
||||
O pipeline de lançamento é acionado automaticamente quando um novo artefato estiver disponível a partir do pipeline de compilação conectado. For staging platforms, this process does not involve manual approval and the artifacts are pushed to the Client CDN and API servers.
|
||||
|
||||
### Pushing changes to Production Applications.
|
||||
### Enviando alterações para aplicações de produção.
|
||||
|
||||
The process is mostly the same as the staging platforms, with a few extra checks in place. This is just to make sure, we do not break anything on freeCodeCamp.org which can see hundreds of users using it at any moment.
|
||||
O processo é quase o mesmo das plataformas de preparo, com algumas verificações extras. This is just to make sure, we do not break anything on freeCodeCamp.org which can see hundreds of users using it at any moment.
|
||||
|
||||
| Do NOT execute these commands unless you have verified that everything is working on the staging platform. You should not bypass or skip any testing on staging before proceeding further. |
|
||||
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| |
|
||||
| Do NOT execute these commands unless you have verified that everything is working on the staging platform. Você não deve ignorar qualquer teste na fase de preparo antes de prosseguir. |
|
||||
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| |
|
||||
|
||||
1. Make sure your `prod-staging` branch is pristine and in sync with the upstream.
|
||||
1. Garanta que sua branch `prod-staging` esteja impecável e sincronizada com a upstream.
|
||||
|
||||
```sh
|
||||
git checkout prod-staging
|
||||
@ -126,7 +126,7 @@ The process is mostly the same as the staging platforms, with a few extra checks
|
||||
git reset --hard upstream/prod-staging
|
||||
```
|
||||
|
||||
2. Move changes from `prod-staging` to `prod-current` via a fast-forward merge
|
||||
2. Mova as alterações da `prod-staging` para a `prod-current` através de um fast-forward merge
|
||||
|
||||
```
|
||||
git checkout prod-current
|
||||
@ -136,13 +136,13 @@ The process is mostly the same as the staging platforms, with a few extra checks
|
||||
|
||||
> [!NOTE] You will not be able to force push and if you have re-written the history in anyway these commands will error out.
|
||||
>
|
||||
> If they do, you may have done something incorrectly and you should just start over.
|
||||
> Se falharem, você pode ter feito algo errado e deve começar de novo.
|
||||
|
||||
The above steps will automatically trigger a run on the build pipeline for the `prod-current` branch. Once a build artifact is ready, it will trigger a run on the release pipeline.
|
||||
As etapas acima vão disparar automaticamente uma execução no pipeline de compilação para a branch `prod-current`. Assim que um artefato de compilação estiver pronto, ele acionará uma execução no pipeline de lançamento.
|
||||
|
||||
**Additional Steps for Staff Action**
|
||||
**Etapas adicionais para a equipe**
|
||||
|
||||
One a release run is triggered, members of the developer staff team will receive an automated manual intervention email. They can either _approve_ or _reject_ the release run.
|
||||
One a release run is triggered, members of the developer staff team will receive an automated manual intervention email. Eles podem _aprovar_ ou _rejeitar_ o release run.
|
||||
|
||||
If the changes are working nicely and have been tested on the staging platform, then it can be approved. The approval must be given within 4 hours of the release being triggered before getting rejected automatically. A staff can re-trigger the release run manually for rejected runs, or wait for the next cycle of release.
|
||||
|
||||
@ -152,111 +152,111 @@ For staff use:
|
||||
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| |
|
||||
|
||||
Once one of the staff members approves a release, the pipeline will push the changes live to freeCodeCamp.org's production CDN and API servers.
|
||||
Uma vez que um dos membros da equipe aprovar o lançamento, as mudanças serão feitas nos servidores CDN e API da produção do freeCodeCamp.org.
|
||||
|
||||
## Build, Test and Deployment Status
|
||||
## Estado de compilação, teste e implantação
|
||||
|
||||
Here is the current test, build and deployment status of the codebase.
|
||||
Aqui está o estado atual de teste, compilação e implantação do código.
|
||||
|
||||
| Branch | Unit Tests | Integration Tests | Builds & Deployments |
|
||||
|:-------------------------------------------------------------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |:--------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`main`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | - |
|
||||
| [`prod-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22+branch%3Aprod-staging) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | [Azure Pipelines](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_dashboards/dashboard/d59f36b9-434a-482d-8dbd-d006b71713d4) |
|
||||
| [`prod-current`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22+branch%3Aprod-current) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | [Azure Pipelines](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_dashboards/dashboard/d59f36b9-434a-482d-8dbd-d006b71713d4) |
|
||||
| `prod-next` (experimental, upcoming) | - | - | - |
|
||||
| Branch | Teste de unidade | Testes de integração | Compilações & implantações |
|
||||
|:-------------------------------------------------------------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [`main`](https://github.com/freeCodeCamp/freeCodeCamp/tree/main) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | - |
|
||||
| [`prod-staging`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22+branch%3Aprod-staging) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | [Pipelines da Azure](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_dashboards/dashboard/d59f36b9-434a-482d-8dbd-d006b71713d4) |
|
||||
| [`prod-current`](https://github.com/freeCodeCamp/freeCodeCamp/tree/prod-staging) | [](https://github.com/freeCodeCamp/freeCodeCamp/actions?query=workflow%3A%22Node.js+CI%22+branch%3Aprod-current) | [](https://dashboard.cypress.io/projects/ke77ns/analytics/runs-over-time) | [Pipelines da Azure](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_dashboards/dashboard/d59f36b9-434a-482d-8dbd-d006b71713d4) |
|
||||
| `prod-next` (experimental, ainda está por vir) | - | - | - |
|
||||
|
||||
## Early access and beta testing
|
||||
|
||||
We welcome you to test these releases in a **"public beta testing"** mode and get early access to upcoming features to the platforms. Sometimes these features/changes are referred to as **next, beta, staging,** etc. interchangeably.
|
||||
Você é bem-vindo para testar estes lançamentos em um modo **de "beta testing público"** e obter acesso antecipado às funcionalidades que estão por vir. Às vezes, esses recursos/mudanças são referidos como **next, beta, staging,** etc. interligadamente.
|
||||
|
||||
Your contributions via feedback and issue reports will help us in making the production platforms at `freeCodeCamp.org` more **resilient**, **consistent** and **stable** for everyone.
|
||||
Suas contribuições por meio de comentários e issues nos ajudarão a fazer as plataformas de produção do `freeCodeCamp. rg` mais **resilientes**, **consistentes** e **estáveis** para todos.
|
||||
|
||||
We thank you for reporting bugs that you encounter and help in making freeCodeCamp.org better. You rock!
|
||||
Agradecemos por relatar erros que encontra e ajuda para melhorar o freeCodeCamp.org. Você é demais!
|
||||
|
||||
### Identifying the upcoming version of the platforms
|
||||
|
||||
Currently a public beta testing version is available at:
|
||||
Atualmente uma versão pública de testes beta está disponível em:
|
||||
|
||||
| Application | Language | URL |
|
||||
|:----------- |:-------- |:---------------------------------------- |
|
||||
| Learn | English | <https://www.freecodecamp.dev> |
|
||||
| | Espanol | <https://www.freecodecamp.dev/espanol> |
|
||||
| | Chinese | <https://chinese.freecodecamp.dev> |
|
||||
| News | English | <https://www.freecodecamp.dev/news> |
|
||||
| Forum | English | <https://forum.freecodecamp.dev> |
|
||||
| | Chinese | <https://chinese.freecodecamp.dev/forum> |
|
||||
| API | - | `https://api.freecodecamp.dev` |
|
||||
| Aplicação | Linguagem | URL |
|
||||
|:--------- |:--------- |:---------------------------------------- |
|
||||
| Aprenda | Inglês | <https://www.freecodecamp.dev> |
|
||||
| | Espanhol | <https://www.freecodecamp.dev/espanol> |
|
||||
| | Chinês | <https://chinese.freecodecamp.dev> |
|
||||
| Novidades | Inglês | <https://www.freecodecamp.dev/news> |
|
||||
| Fórum | Inglês | <https://forum.freecodecamp.dev> |
|
||||
| | Chinês | <https://chinese.freecodecamp.dev/forum> |
|
||||
| API | - | `https://api.freecodecamp.dev` |
|
||||
|
||||
> [!NOTE] The domain name is different than **`freeCodeCamp.org`**. This is intentional to prevent search engine indexing and avoid confusion for regular users of the platform.
|
||||
> [!NOTE] O nome do domínio é diferente de **`freeCodeCamp.org`**. Isso é intencional para evitar que ferramentas de busca indexem e evitar confusões da parte dos usuários regulares da plataforma.
|
||||
>
|
||||
> The above list not exhaustive of all the applications that we provision. Also not all language variants are deployed in staging to conserve resources.
|
||||
> A lista (não muito longa) abaixo contém todos os aplicativos que fornecemos. Nem todas as variantes das linguagens são implantadas na fase de preparação para conservar recursos.
|
||||
|
||||
### Identifying the current version of the platforms
|
||||
|
||||
**The current version of the platform is always available at [`freeCodeCamp.org`](https://www.freecodecamp.org).**
|
||||
|
||||
The dev-team merges changes from the `prod-staging` branch to `prod-current` when they release changes. The top commit should be what you see live on the site.
|
||||
O time de desenvolvimento faz o merge nas mudanças da branch `prod-staging` para `prod-current` quando lançam mudanças. O commit principal deve ser o que você vê no site.
|
||||
|
||||
You can identify the exact version deployed by visiting the build and deployment logs available in the status section. Alternatively you can also ping us in the [contributors chat room](https://chat.freecodecamp.org/channel/contributors) for a confirmation.
|
||||
Você pode identificar a versão exata implantada visitando os registros de compilação e implantação disponíveis na seção de estado. Alternativamente, você também pode entrar em contato na [sala de bate-papo dos contribuidores](https://chat.freecodecamp.org/channel/contributors).
|
||||
|
||||
### Known Limitations
|
||||
|
||||
There are some known limitations and tradeoffs when using the beta version of the platform.
|
||||
Existem algumas limitações e desvantagens conhecidas ao usar a versão beta da plataforma.
|
||||
|
||||
- #### All data / personal progress on these beta platforms `will NOT be saved or carried over` to production.
|
||||
|
||||
**Users on the beta version will have a separate account from the production.** The beta version uses a physically separate database from production. This gives us the ability to prevent any accidental loss of data or modifications. The dev team may purge the database on this beta version as needed.
|
||||
|
||||
- #### There are no guarantees on the uptime and reliability of the beta platforms.
|
||||
- #### Não há garantias na disponibilidade e confiabilidade das plataformas beta.
|
||||
|
||||
Deployment is expected to be frequent and in rapid iterations, sometimes multiple times a day. As a result there will be unexpected downtime at times or broken functionality on the beta version.
|
||||
|
||||
- #### Do not send regular users to this site as a measure of confirming a fix
|
||||
- #### Não envie usuários regulares para este site como uma medida de confirmar uma correção
|
||||
|
||||
The beta site is and always has been to augment local development and testing, nothing else. It's not a promise of what’s coming, but a glimpse of what is being worked upon.
|
||||
|
||||
- #### Sign in page may look different than production
|
||||
|
||||
We use a test tenant for freeCodeCamp.dev on Auth0, and hence do not have the ability to set a custom domain. This makes it so that all the redirect callbacks and the login page appear at a default domain like: `https://freecodecamp-dev.auth0.com/`. This does not affect the functionality and is as close to production as we can get.
|
||||
Nós utilizamos um locatário de teste para o freeCodeCamp.dev no Auth 0 e, portanto, não temos a capacidade de definir um domínio personalizado. This makes it so that all the redirect callbacks and the login page appear at a default domain like: `https://freecodecamp-dev.auth0.com/`. Isso não afeta a funcionalidade e é o mais próximo da produção que conseguimos.
|
||||
|
||||
## Reporting issues and leaving feedback
|
||||
## Relatar problemas e deixar comentário
|
||||
|
||||
Please open fresh issues for discussions and reporting bugs.
|
||||
Abra novas issues para discussões e informações sobre erros.
|
||||
|
||||
You may send an email to `dev[at]freecodecamp.org` if you have any queries. As always all security vulnerabilities should be reported to `security[at]freecodecamp.org` instead of the public tracker and forum.
|
||||
Você pode enviar um e-mail para `dev[at]freecodecamp.org` se você tiver alguma dúvida. Como sempre, todas as vulnerabilidades de segurança devem ser relatadas à `security[at]freecodecamp.org` em vez do rastreador público e fórum.
|
||||
|
||||
# Flight Manual - Server Maintenance
|
||||
# Manual de voo - Mantendo o servidor
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> 1. The guide applies to the **freeCodeCamp Staff members only**.
|
||||
> 2. These instructions should not be considered exhaustive, please use caution.
|
||||
> 1. O guia se aplica aos **membros da equipe freeCodeCamp apenas**.
|
||||
> 2. Não se deve considerar que essas instruções cubram todas as possibilidades. Tenha cuidado.
|
||||
|
||||
As a member of the staff, you may have been given access to our cloud service providers like Azure, Digital Ocean, etc.
|
||||
|
||||
Here are some handy commands that you can use to work on the Virtual Machines (VM), for instance performing maintenance updates or doing general housekeeping.
|
||||
Aqui estão alguns comandos úteis que você pode usar ao trabalhar com máquinas virtuais (VM), por exemplo, realizando atualizações de manutenção ou limpezas em geral.
|
||||
|
||||
## Get a list of the VMs
|
||||
## Obtenha a lista de VMs
|
||||
|
||||
> [!NOTE] While you may already have SSH access to the VMs, that alone will not let you list VMs unless you been granted access to the cloud portals as well.
|
||||
> [!NOTE] Talvez você já tenha acesso SSH às VMs. Só isso não permitirá que você liste VMs, a menos que você tenha acesso aos portais de nuvem também.
|
||||
|
||||
### Azure
|
||||
|
||||
Install Azure CLI `az`: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
|
||||
Instale o Azure CLI `az`: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
|
||||
|
||||
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
|
||||
> **(Apenas uma vez) Instale no macOS com [`homebrew`](https://brew.sh):**
|
||||
|
||||
```
|
||||
brew install azure-cli
|
||||
```
|
||||
|
||||
> **(One-time) Login:**
|
||||
> **(Apenas uma vez) Login:**
|
||||
|
||||
```
|
||||
az login
|
||||
```
|
||||
|
||||
> **Get the list of VM names and P addresses:**
|
||||
> **Obtenha a lista de nomes de VM e endereços IP:**
|
||||
|
||||
```
|
||||
az vm list-ip-addresses --output table
|
||||
@ -264,7 +264,7 @@ az vm list-ip-addresses --output table
|
||||
|
||||
### Digital Ocean
|
||||
|
||||
Install Digital Ocean CLI `doctl`: https://github.com/digitalocean/doctl#installing-doctl
|
||||
Instale Digital Ocean CLI `doctl`: https://github.com/digitalocean/doctl#installing-doctl
|
||||
|
||||
> **(One-time) Install on macOS with [`homebrew`](https://brew.sh):**
|
||||
|
||||
@ -280,56 +280,56 @@ Authentication and context switching: https://github.com/digitalocean/doctl#auth
|
||||
doctl auth init
|
||||
```
|
||||
|
||||
> **Get the list of VM names and IP addresses:**
|
||||
> **Obtenha a lista de nomes de VM e endereços IP:**
|
||||
|
||||
```
|
||||
doctl compute droplet list --format "ID,Name,PublicIPv4"
|
||||
```
|
||||
|
||||
## Spin new Resources
|
||||
## Rodar novos recursos
|
||||
|
||||
We are working on creating our IaC setup, and while that is in works you can use the Azure portal or the Azure CLI to spin new virtual machines and other resources.
|
||||
Nós estamos trabalhando na criação da configuração do IaC. Enquanto isso está ocorrendo, você pode usar o portal Azure ou o Azure CLI para criar uma nova VM e outros recursos.
|
||||
|
||||
> [!TIP] No matter your choice of spinning resources, we have a few [handy cloud-init config files](https://github.com/freeCodeCamp/infra/tree/main/cloud-init) to help you do some of the basic provisioning like installing docker or adding SSH keys, etc.
|
||||
> [!TIP] Não importa sua escolha de como gastar os recursos, nós temos alguns [arquivos de configuração úteis cloud-init](https://github.com/freeCodeCamp/infra/tree/main/cloud-init) para ajudar você a fazer provisionamento básico de como instalar o docker ou adicionar chaves SSH, etc.
|
||||
|
||||
## Keep VMs updated
|
||||
|
||||
You should keep the VMs up to date by performing updates and upgrades. This will ensure that the virtual machine is patched with latest security fixes.
|
||||
You should keep the VMs up to date by performing updates and upgrades. Isto vai garantir que a máquina virtual está corrigida com correções de segurança mais recentes.
|
||||
|
||||
> [!WARNING] Before you run these commands:
|
||||
> [!WARNING] Antes de executar estes comandos:
|
||||
>
|
||||
> - Make sure that the VM has been provisioned completely and there is no post-install steps running.
|
||||
> - If you are updating packages on a VM that is already serving an application, make sure the app has been stopped / saved. Package updates will cause network bandwidth, memory and/or CPU usage spikes leading to outages on running applications.
|
||||
> - Certifique-se que a MV foi completamente fornecida e que não há etapas pós instalação sendo executadas.
|
||||
> - Se você estiver atualizando pacotes em uma MV que já está servindo uma aplicação, certifique-se que a aplicação está parada/salva. Atualizações de pacotes causarão picos no uso da banda larga, memória e/ou CPU levando à falhas nas aplicações que estão sendo executadas.
|
||||
|
||||
Update package information
|
||||
Atualize informações do pacote
|
||||
|
||||
```console
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
Upgrade installed packages
|
||||
Atualize pacotes instalados
|
||||
|
||||
```console
|
||||
sudo apt upgrade -y
|
||||
```
|
||||
|
||||
Cleanup unused packages
|
||||
Limpe pacotes não utilizados
|
||||
|
||||
```console
|
||||
sudo apt autoremove -y
|
||||
```
|
||||
|
||||
## Work on Web Servers (Proxy)
|
||||
## Trabalhe em servidores web (Proxy)
|
||||
|
||||
We are running load balanced (Azure Load Balancer) instances for our web servers. These servers are running NGINX which reverse proxy all of the traffic to freeCodeCamp.org from various applications running on their own infrastructures.
|
||||
Estamos executando instâncias equilibradas (Azure Load Balancer) para nossos servidores na web. Esses servidores estão executando NGINX, que reverte o proxy de todo o tráfego para freeCodeCamp.org a partir de várias aplicações em execução em suas próprias infraestruturas.
|
||||
|
||||
The NGINX config is available on [this repository](https://github.com/freeCodeCamp/nginx-config).
|
||||
|
||||
### First Install
|
||||
### Primeiro instale
|
||||
|
||||
Provisioning VMs with the Code
|
||||
|
||||
1. Install NGINX and configure from repository.
|
||||
1. Instale o NGINX e configure a partir do repositório.
|
||||
|
||||
```console
|
||||
sudo su
|
||||
@ -344,39 +344,39 @@ Provisioning VMs with the Code
|
||||
cd /etc/nginx
|
||||
```
|
||||
|
||||
2. Install Cloudflare origin certificates and upstream application config.
|
||||
2. Instale os certificados de origem Cloudflare e a configuração de aplicativos upstream.
|
||||
|
||||
Get the Cloudflare origin certificates from the secure storage and install at required locations.
|
||||
Obtenha os certificados de origem Cloudflare a partir do armazenamento seguro e instale nos locais requiridos.
|
||||
|
||||
**OR**
|
||||
**OU**
|
||||
|
||||
Move over existing certificates:
|
||||
Mova os certificados existentes:
|
||||
|
||||
```console
|
||||
# Local
|
||||
# Localmente
|
||||
scp -r username@source-server-public-ip:/etc/nginx/ssl ./
|
||||
scp -pr ./ssl username@target-server-public-ip:/tmp/
|
||||
|
||||
# Remote
|
||||
# Remotamente
|
||||
rm -rf ./ssl
|
||||
mv /tmp/ssl ./
|
||||
```
|
||||
|
||||
Update Upstream Configurations:
|
||||
Atualize as configurações upstream:
|
||||
|
||||
```console
|
||||
vi configs/upstreams.conf
|
||||
```
|
||||
|
||||
Add/update the source/origin application IP addresses.
|
||||
Adicione/atualize os endereços IP do aplicativo fonte/origem.
|
||||
|
||||
3. Setup networking and firewalls.
|
||||
3. Configure a rede e o firewall.
|
||||
|
||||
Configure Azure firewalls and `ufw` as needed for ingress origin addresses.
|
||||
Configure o firewall da Azure e `ufw` conforme o necessário para entrar os endereços de origem.
|
||||
|
||||
4. Add the VM to the load balancer backend pool.
|
||||
4. Adicione a MV ao pool de back-end do balanceador de carga.
|
||||
|
||||
Configure and add rules to load balancer if needed. You may also need to add the VMs to load balancer backend pool if needed.
|
||||
Configure e adicione as regras ao balanceador de carga, se necessário. You may also need to add the VMs to load balancer backend pool if needed.
|
||||
|
||||
### Logging and Monitoring
|
||||
|
||||
|
@ -1,82 +1,82 @@
|
||||
> **Note:** This is an **optional** step and is required only when working with email workflows
|
||||
> **Observação:** esta é uma etapa **opcional** e é necessária somente quando trabalhando com fluxos de e-mail
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Installing MailHog](#installing-mailhog)
|
||||
- [Using MailHog](#using-mailhog)
|
||||
- [Useful Links](#useful-links)
|
||||
- [Introdução](#introduction)
|
||||
- [Instalando o MailHog](#installing-mailhog)
|
||||
- [Usando o MailHog](#using-mailhog)
|
||||
- [Links úteis](#useful-links)
|
||||
|
||||
## Introduction
|
||||
## Introdução
|
||||
|
||||
Some email workflows, like updating a user's email, requires the back-end api-server to send outgoing emails. An alternative to using an email service provider to send actual email messages, Mailhog is a developer tool for email testing that will catch the email messages sent by your freeCodeCamp instance.
|
||||
Alguns fluxos de e-mail, como atualizar o e-mail de um usuário, requerem que o servidor da api do back-end envie e-mails de saída. Uma alternativa ao uso de um provedor de serviço de e-mail para enviar mensagens reais de e-mail é o Mailhog. Ele é uma ferramenta de desenvolvedor para teste de e-mail que vai pegar as mensagens de e-mail enviadas pela sua instância de freeCodeCamp.
|
||||
|
||||
## Installing MailHog
|
||||
## Instalando o MailHog
|
||||
|
||||
MailHog can be installed on macOS, Windows and Linux or used via Docker
|
||||
O MailHog pode ser instalado no macOS, Windows e Linux ou usado via Docker
|
||||
|
||||
<details><summary>Installing MailHog with Docker</summary>
|
||||
<details><summary>Instalando o MailHog no Docker</summary>
|
||||
|
||||
If you have Docker installed then you can use
|
||||
Se você tem o Docker instalado, então você pode usar
|
||||
|
||||
```bash
|
||||
docker run -d --name mailhog --rm mailhog/mailhog
|
||||
```
|
||||
|
||||
to start MailHog in the background and
|
||||
para iniciar o MailHog em segundo plano e
|
||||
|
||||
```bash
|
||||
docker stop mailhog
|
||||
```
|
||||
|
||||
to stop it.
|
||||
para para-lo.
|
||||
|
||||
When the installation completes, you can start [using MailHog](#using-mailhog). </details>
|
||||
Quando a instalação for concluída, você pode começar a [usar o MailHog](#using-mailhog). </details>
|
||||
|
||||
<details><summary>Installing MailHog on macOS</summary>
|
||||
<details><summary>Instalando o MailHog no macOS</summary>
|
||||
|
||||
Install MailHog on macOS with [Homebrew](https://brew.sh/):
|
||||
Instale o MailHog no macOS com o [Homebrew](https://brew.sh/):
|
||||
|
||||
```bash
|
||||
brew install mailhog
|
||||
brew services start mailhog
|
||||
```
|
||||
|
||||
The above commands will start a mailhog service in the background.
|
||||
Os comandos acima iniciarão um serviço do mailhog em segundo plano.
|
||||
|
||||
When the installation completes, you can start [using MailHog](#using-mailhog). </details>
|
||||
Quando a instalação for concluída, você pode começar a [usar o MailHog](#using-mailhog). </details>
|
||||
|
||||
<details><summary>Installing MailHog on Windows</summary>
|
||||
<details><summary>Instalando o MailHog no Windows</summary>
|
||||
|
||||
Download the latest version of MailHog from [MailHog's official repository](https://github.com/mailhog/MailHog/releases). Locate and click on the link for your Windows version (32 or 64 bit) and a .exe file will be downloaded to your computer.
|
||||
Baixe a versão mais recente do MailHog no [repositório oficial do MailHog](https://github.com/mailhog/MailHog/releases). Localize e clique no link para a sua versão do Windows (32 ou 64 bits) e um arquivo .exe será baixado no seu computador.
|
||||
|
||||
When the download completes, click to open the file. A Windows firewall notification may appear, requesting access permission for MailHog. A standard Windows command line prompt will open where MailHog will be running once firewall access is granted.
|
||||
Quando o download terminar, clique para abrir o arquivo. Uma notificação de firewall do Windows pode aparecer, solicitando permissão de acesso para MailHog. Um prompt de linha de comando padrão do Windows abrirá onde o MailHog será executado quando o acesso ao firewall for concedido.
|
||||
|
||||
Close MailHog by closing the command prompt window. To start MailHog again, click on the MailHog executable (.exe) file that was downloaded initially - it is not necessary to download a new MailHog installation file.
|
||||
Feche o MailHog fechando a janela do prompt. Para iniciar o MailHog novamente, clique no executável do MailHog (.exe) arquivo que foi baixado inicialmente - não é necessário baixar um novo arquivo de instalação do MailHog.
|
||||
|
||||
Start [using MailHog](#using-mailhog). </details>
|
||||
Comece a [usar o MailHog](#using-mailhog). </details>
|
||||
|
||||
<details><summary>Installing MailHog on Linux</summary>
|
||||
<details><summary>Instalando o MailHog no Linux</summary>
|
||||
|
||||
First, install [Go](https://golang.org).
|
||||
Primeiro, instale o [Go](https://golang.org).
|
||||
|
||||
Run the following commands to install GO on Debian-based systems like Ubuntu and Linux Mint.
|
||||
Execute os seguintes comandos para instalar GO em sistemas baseados em Debian, como o Ubuntu e o Linux Mint.
|
||||
|
||||
```bash
|
||||
sudo apt-get install golang
|
||||
```
|
||||
|
||||
Run the following commands to install GO on RPM-based systems like CentOS, Fedora, Red Hat Linux, etc.
|
||||
Execute os seguintes comandos para instalar GO em sistemas baseados em RPM, como CentOS, Fedora, Red Hat Linux, etc.
|
||||
|
||||
```bash
|
||||
sudo dnf install golang
|
||||
```
|
||||
|
||||
Alternatively, run the following commands to install GO.
|
||||
Como alternativa, execute os seguintes comandos para instalar o GO.
|
||||
|
||||
```bash
|
||||
sudo yum install golang
|
||||
```
|
||||
|
||||
Now set the path for Go with the following commands.
|
||||
Agora defina o caminho para o Go com os seguintes comandos.
|
||||
|
||||
```bash
|
||||
echo "export GOPATH=$HOME/go" >> ~/.profile
|
||||
@ -84,7 +84,7 @@ echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.profile
|
||||
source ~/.profile
|
||||
```
|
||||
|
||||
Finally, enter the commands below to install and run MailHog.
|
||||
Finalmente, digite os comandos abaixo para instalar e executar MailHog.
|
||||
|
||||
```bash
|
||||
go get github.com/mailhog/MailHog
|
||||
@ -92,24 +92,24 @@ sudo cp /home/$(whoami)/go/bin/MailHog /usr/local/bin/mailhog
|
||||
mailhog
|
||||
```
|
||||
|
||||
Start [using MailHog](#using-mailhog). </details>
|
||||
Comece a [usar o MailHog](#using-mailhog). </details>
|
||||
|
||||
## Using MailHog
|
||||
## Usando o MailHog
|
||||
|
||||
Open a new browser tab or window and navigate to [http://localhost:8025](http://localhost:8025) to open your MailHog inbox when the MailHog installation has completed and MailHog is running. The inbox will appear similar to the screenshot below.
|
||||
Abra uma nova guia ou janela do navegador e navegue até [http://localhost:8025](http://localhost:8025) para abrir sua caixa de entrada do MailHog quando a instalação do MailHog for concluída e o MailHog estiver em execução. A caixa de entrada será similar à imagem abaixo.
|
||||
|
||||

|
||||

|
||||
|
||||
Emails sent by your freeCodeCamp installation will appear as below
|
||||
E-mails enviados pela instalação do seu freeCodeCamp aparecerão assim
|
||||
|
||||

|
||||

|
||||
|
||||
Two tabs that allow you to view either plain text or source content will be available when you open a given email. Ensure that the plain text tab is selected as below.
|
||||
Duas guias que permitem que você veja texto simples ou conteúdo fonte estarão disponíveis quando você abrir um determinado e-mail. Certifique-se de que a aba de texto simples esteja selecionada como abaixo.
|
||||
|
||||

|
||||

|
||||
|
||||
All links in the email should be clickable and resolve to their URL.
|
||||
Todos os links no e-mail devem ser clicáveis e redirecionar para a URL deles.
|
||||
|
||||
## Useful Links
|
||||
## Links úteis
|
||||
|
||||
- Check out the [MailHog](https://github.com/mailhog/MailHog) repository for further information related to MailHog. Additional information is also available regarding custom MailHog configurations.
|
||||
- Confira o repositório [MailHog](https://github.com/mailhog/MailHog) para mais informações relacionadas ao MailHog. Informações adicionais também estão disponíveis sobre configurações personalizadas do MailHog.
|
||||
|
@ -1,17 +1,17 @@
|
||||
# How to help with video challenges
|
||||
# Como ajudar com desafios em vídeo
|
||||
|
||||
Video challenges are a new type of challenge in the freeCodeCamp curriculum.
|
||||
|
||||
A video challenge is a small section of a full-length video course on a particular topic. A video challenge page embeds a YouTube video. Each challenge page has a single multiple-choice question related to the video. A user must answer the question correctly before moving on to the next video challenge in the course.
|
||||
Um desafio em vídeo é uma seção de um curso completo sobre um determinado tópico. Uma página de desafio em vídeo incorpora um vídeo do YouTube. Each challenge page has a single multiple-choice question related to the video. O usuário deve responder a pergunta corretamente antes de avançar para o próximo desafio em vídeo.
|
||||
|
||||
The video challenge pages are created by members of the freeCodeCamp team. YouTube videos are also uploaded by members of the freeCodeCamp team. Many of the video challenges do not yet have questions associated with them.
|
||||
As páginas de desafio em vídeo são criadas por membros da equipe freeCodeCamp. YouTube videos are also uploaded by members of the freeCodeCamp team. Muitos dos desafios em vídeo ainda não possuem perguntas associadas a eles.
|
||||
|
||||
You can help by creating multiple-choice questions related to video sections and adding the questions to the markdown files for the video challenges.
|
||||
|
||||
|
||||
## Challenge Template
|
||||
|
||||
Below is a template of what the challenge markdown files look like.
|
||||
Abaixo está um modelo de arquivo markdown do desafio.
|
||||
|
||||
````md
|
||||
---
|
||||
@ -58,24 +58,24 @@ The number for the correct answer goes here.
|
||||
|
||||
````
|
||||
|
||||
## Creating questions for video challenges
|
||||
## Criando perguntas para desafios em video
|
||||
|
||||
### Access the video challenge markdown files
|
||||
### Acessar o arquivo markdown do desafio em vídeo
|
||||
|
||||
You can find the markdown files for video challenges at the following locations in the curriculum:
|
||||
Os arquivos markdown dos desafios estão localizadas no currículo em:
|
||||
|
||||
- [Data Analysis with Python Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course)
|
||||
- [TensorFlow 2.0 Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/11-machine-learning-with-python/tensorflow)
|
||||
- [Numpy Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/08-data-analysis-with-python/numpy)
|
||||
- [How Neural Networks Work Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work)
|
||||
|
||||
Pick a challenge markdown file from the options above.
|
||||
Escolha um arquivo dentre as opções acima.
|
||||
|
||||
### Skim through the video associated with the challenge and create a multiple-choice question
|
||||
### Explore o vídeo associado ao desafio e crie uma questão de múltipla escolha
|
||||
|
||||
First, find the videoId.
|
||||
Primeiro, localize o videoId.
|
||||
|
||||
For example, in the following code from the header of a video challenge markdown file, the videoId is "nVAaxZ34khk". On GitHub, the information should be laid out in a table format.
|
||||
For example, in the following code from the header of a video challenge markdown file, the videoId is "nVAaxZ34khk". No GitHub, a informação deve estar contida em formato tabular.
|
||||
````
|
||||
---
|
||||
id: 5e9a093a74c4063ca6f7c14d title: Data Analysis Example A challengeType: 11
|
||||
@ -83,44 +83,44 @@ videoId: nVAaxZ34khk
|
||||
---
|
||||
```
|
||||
|
||||
Next, access the YouTube video with that `videoId`. The URL for the video will be:
|
||||
Em seguida, acesse o vídeo no YouTube correspondente com aquele `videoId`. The URL for the video will be:
|
||||
https://www.youtube.com/watch?v=[videoId] (replace `videoId` in the URL with the video's ID - without square brackets)
|
||||
|
||||
In the example above, the URL is https://www.youtube.com/watch?v=nVAaxZ34khk
|
||||
|
||||
Skim the YouTube video with that videoId and think of a multiple-choice question based on the content of the video.
|
||||
|
||||
### Add the question to the markdown file
|
||||
### Adicione a pergunta ao arquivo markdown
|
||||
|
||||
You can add the question locally or using the GitHub interface. To add the question locally, you need to [set up freeCodeCamp locally](how-to-setup-freecodecamp-locally.md). You can also find the file on GitHub and click the edit button to add the question right in your browser.
|
||||
Você pode adicionar a pergunta localmente ou utilizando a interface do Github. Para adicionar a pergunta localmente, você precisa [configurar o freeCodeCamp localmente](how-to-setup-freecodecamp-locally.md). You can also find the file on GitHub and click the edit button to add the question right in your browser.
|
||||
|
||||
If a question has not yet been added to a particular video challenge, it will have the following default question:
|
||||
Se uma pergunta não tiver sido adicionada a um desafio de vídeo ainda, ela terá a seguinte forma padrão:
|
||||
|
||||
```md
|
||||
# --question--
|
||||
# --question-
|
||||
|
||||
## --text--
|
||||
|
||||
Question text
|
||||
Texto da questão
|
||||
|
||||
## --answers--
|
||||
|
||||
Answer 1
|
||||
Resposta 1
|
||||
|
||||
---
|
||||
|
||||
Answer 2
|
||||
Resposta 2
|
||||
|
||||
---
|
||||
|
||||
More answers
|
||||
Mais respostas
|
||||
|
||||
## --video-solution--
|
||||
|
||||
1
|
||||
```
|
||||
|
||||
Add/Update the question text under the part that shows:
|
||||
Adicione/atualize o texto da pergunta sob a parte que diz:
|
||||
```
|
||||
# --question--
|
||||
|
||||
@ -128,13 +128,13 @@ Add/Update the question text under the part that shows:
|
||||
```
|
||||
Add/Update answers (`Answer 1`, `Answer 2`, and so on) under `## --answers--`. Make sure to update the number under `## --video-solution--` with the correct answer number. You can add more possible answers using the same format. The question and answers can be surrounded with quotation marks.
|
||||
|
||||
### Question examples
|
||||
### Exemplos de perguntas
|
||||
|
||||
````md
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
What does this JavaScript code log to the console?
|
||||
O que esse código JavaScript mostra no console?
|
||||
```js
|
||||
console.log('hello world');
|
||||
````
|
||||
@ -163,7 +163,7 @@ hello world
|
||||
|
||||
## --text--
|
||||
|
||||
What will print out after running this code:
|
||||
O que aparecerá após executar esse código:
|
||||
|
||||
```py
|
||||
width = 15
|
||||
@ -195,8 +195,8 @@ print(height/3)
|
||||
|
||||
3 ````
|
||||
|
||||
For more examples, you can look at the markdown files for the following video course. All the challenges already have questions: [Python for Everybody Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody)
|
||||
Para mais exemplos, você pode ver os arquivos markdown para o seguinte curso em vídeo. Todos os desafios já possuem perguntas: [Python for Everybody Course](https://github.com/freeCodeCamp/freeCodeCamp/tree/main/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody)
|
||||
|
||||
## Open a pull request
|
||||
## Abra um pull request
|
||||
|
||||
After creating one or more questions, you can commit the changes to a new branch and [open a pull request](how-to-open-a-pull-request.md).
|
||||
Depois de criar uma ou mais perguntas, você pode confirmar as mudanças em uma nova branch e [abrir um pull request](how-to-open-a-pull-request.md).
|
||||
|
@ -1,44 +1,44 @@
|
||||
# How to open a Pull Request (PR)
|
||||
|
||||
A pull request (PR) enables you to send changes from your fork on GitHub to freeCodeCamp.org's main repository. Once you are done making changes to the code, you can follow these guidelines to open a PR.
|
||||
Um pull request (PR) permite que você envie alterações do seu fork do GitHub para o repositório principal do freeCodeCamp.org. Depois de terminar de fazer alterações no código, você pode seguir essas diretrizes para abrir um PR.
|
||||
|
||||
> [!NOTE] Your PR should be in English. See [here](https://contribute.freecodecamp.org/#/index?id=translations) for how to contribute translations.
|
||||
> [!NOTE] Seu PR deve estar em inglês. Veja [aqui](https://contribute.freecodecamp.org/#/index?id=translations) como contribuir com traduções.
|
||||
|
||||
## Prepare a good PR title
|
||||
## Prepare um bom título para o PR
|
||||
|
||||
We recommend using [conventional title and messages](https://www.conventionalcommits.org/) for commits and pull request. The convention has the following format:
|
||||
Recomendamos usar [título e mensagens convencionais](https://www.conventionalcommits.org/) para commits e pull request. The convention has the following format:
|
||||
|
||||
> `<type>([optional scope(s)]): <description>`
|
||||
> `<type>([escopo(s) opcional(is)]): <description>`
|
||||
>
|
||||
> For example:
|
||||
> Por exemplo:
|
||||
>
|
||||
> `fix(learn): tests for the do...while loop challenge`
|
||||
> `fix(learn): testes para o desafio de ciclo do...while`
|
||||
|
||||
When opening a Pull Request(PR), you can use the below to determine the type, scope (optional), and description.
|
||||
Quando estiver abrindo um Pull Request (PR), você pode usar a referência abaixo para determinar o tipo, escopo (opcional) e a descrição.
|
||||
|
||||
**Type:**
|
||||
|
||||
| Type | When to select |
|
||||
|:----- |:-------------------------------------------------------------------------------- |
|
||||
| fix | Changed or updated/improved functionality, tests, the verbiage of a lesson, etc. |
|
||||
| feat | Only if you are adding new functionality, tests, etc. |
|
||||
| chore | Changes that are not related to code, tests, or verbiage of a lesson. |
|
||||
| docs | Changes to `/docs` directory or the contributing guidelines, etc. |
|
||||
| Tipo | When to select |
|
||||
|:----- |:-------------------------------------------------------------------------------------- |
|
||||
| fix | Funcionalidade mudada ou atualizada/melhorada, testes, a explicação de uma lição, etc. |
|
||||
| feat | Only if you are adding new functionality, tests, etc. |
|
||||
| chore | Mudanças não relacionadas ao código, testes ou explicação de uma lição. |
|
||||
| docs | Changes to `/docs` directory or the contributing guidelines, etc. |
|
||||
|
||||
**Scope:**
|
||||
**Escopo:**
|
||||
|
||||
You can select a scope from [this list of labels](https://github.com/freeCodeCamp/freeCodeCamp/labels?q=scope).
|
||||
Você pode selecionar um escopo a partir [desta lista de etiquetas](https://github.com/freeCodeCamp/freeCodeCamp/labels?q=scope).
|
||||
|
||||
**Description:**
|
||||
|
||||
Keep it short (less than 30 characters) and simple, you can add more information in the PR description box and comments.
|
||||
Escreva pouco (menos de 30 caracteres) e de modo simples. Você pode adicionar mais informações na caixa de descrição do PR e comentários.
|
||||
|
||||
Some examples of good PRs titles would be:
|
||||
|
||||
- `fix(a11y): improved search bar contrast`
|
||||
- `feat: add more tests to HTML and CSS challenges`
|
||||
- `fix(api,client): prevent CORS errors on form submission`
|
||||
- `docs(i18n): Chinese translation of local setup`
|
||||
- `fix(a11y): contraste melhorado da barra de pesquisa`
|
||||
- `feat: adicionar mais testes aos desafios de HTML e CSS`
|
||||
- `fix(api,cliente): previnir erros CORS no envio do formulário`
|
||||
- `docs(i18n): tradução para chinês da configuração local`
|
||||
|
||||
## Proposing a Pull Request
|
||||
|
||||
@ -46,58 +46,58 @@ Some examples of good PRs titles would be:
|
||||
|
||||

|
||||
|
||||
2. By default, all pull requests should be against the freeCodeCamp main repo, `main` branch.
|
||||
2. Por padrão, todos os pull requests devem ser feitos no repositório principal do freeCodeCamp, branch `main`.
|
||||
|
||||
Make sure that your Base Fork is set to freeCodeCamp/freeCodeCamp when raising a Pull Request.
|
||||
Certifique-se de que seu Fork Base está definido como freeCodeCamp/freeCodeCamp ao criar um Pull Request.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Submit the pull request from your branch to freeCodeCamp's `main` branch.
|
||||
3. Envie o pull request da sua branch para a branch `main` do freeCodeCamp.
|
||||
|
||||
4. In the body of your PR include a more detailed summary of the changes you made and why.
|
||||
4. No corpo de seu PR, há um resumo mais detalhado das alterações feitas e o motivo.
|
||||
|
||||
- You will be presented with a pull request template. This is a checklist that you should have followed before opening the pull request.
|
||||
- You will be presented with a pull request template. É uma checklist que você deve seguir antes de abrir o pull request.
|
||||
|
||||
- Fill in the details as you see fit. This information will be reviewed and the reviewers will decide whether or not your pull request is accepted.
|
||||
- Preencha os detalhes como quiser. Essas informações serão revisadas e os revisores decidirão se seu pull request será aceito ou não.
|
||||
|
||||
- If the PR is meant to address an existing GitHub Issue then, at the end of your PR's description body, use the keyword _Closes_ with the issue number to [automatically close that issue if the PR is accepted and merged](https://help.github.com/en/articles/closing-issues-using-keywords).
|
||||
- Se o PR tem como objetivo resolver uma issue GitHub existente, então, no final do corpo da descrição de seu PR, use a palavra-chave _Closes_ com o número da issue para [automaticamente fechá-la, se o PR for aceito e dado merge](https://help.github.com/en/articles/closing-issues-using-keywords).
|
||||
|
||||
> Example: `Closes #123` will close issue 123
|
||||
> Exemplo: `Closes #123` fechará a issue 123
|
||||
|
||||
5. Indicate if you have tested on a local copy of the site or not.
|
||||
5. Indique se você testou em uma cópia local do site ou não.
|
||||
|
||||
- This is very important when making changes that are not just edits to text content like documentation or a challenge description. Examples of changes that need local testing include JavaScript, CSS, or HTML which could change the functionality or layout of a page.
|
||||
- Isso é muito importante quando se está fazendo mudanças que não são apenas edições no conteúdo do texto como a documentação ou descrição de um desafio. Exemplos de mudanças que precisam ser testadas localmente incluem JavaScript, CSS ou HTML que podem mudar a funcionalidade ou aparência de uma página.
|
||||
|
||||
- If your PR affects the behaviour of a page it should be accompanied by corresponding [Cypress integration tests](/how-to-add-cypress-tests).
|
||||
- Se seu PR afeta o comportamento de uma página ele deve estar acompanhado pelo correspondente [teste de integração Cypress](/how-to-add-cypress-tests).
|
||||
|
||||
## Feedback on pull requests
|
||||
## Comentários nos pull requests
|
||||
|
||||
> Congratulations! :tada: on making a PR and thanks a lot for taking the time to contribute.
|
||||
> Parabéns! :tada: por fazer um PR e muito obrigado(a) por contribuir.
|
||||
|
||||
Our moderators will now take a look and leave you feedback. Please be patient with the fellow moderators and respect their time. All pull requests are reviewed in due course.
|
||||
Nossos moderadores vão dar uma olhada e deixar um comentário para você. Seja paciente com os outros moderadores e respeite o tempo deles. Todos os pull requests são revisados no tempo devido.
|
||||
|
||||
And as always, feel free to ask questions on the ['Contributors' category on our forum](https://forum.freecodecamp.org/c/contributors) or [the contributors chat room](https://chat.freecodecamp.org/channel/contributors).
|
||||
E como sempre, fique à vontade em perguntar na [categoria 'Contribuidores' do fórum](https://forum.freecodecamp.org/c/contributors) ou [no chat dos contribuidores](https://chat.freecodecamp.org/channel/contributors).
|
||||
|
||||
> [!TIP] If you are to be contributing more pull requests, we recommend you read the [making changes and syncing](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally?id=making-changes-locally) guidelines to avoid having to delete your fork.
|
||||
> [!TIP] Se você vai contribuir com mais pull requests, recomendamos ler as diretrizes sobre [fazer mudanças e sincronizá-las](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally?id=making-changes-locally) para evitar o apagamento de seu fork.
|
||||
|
||||
## Conflicts on a pull request
|
||||
|
||||
Conflicts can arise because many contributors work on the repository, and changes can break your PR which is pending a review and merge.
|
||||
Conflitos podem surgir porque muitos colaboradores trabalham no repositório, e as alterações podem afetar o seu PR, que está aguardando uma revisão e merge.
|
||||
|
||||
More often than not you may not require a rebase, because we squash all commits, however if a rebase is requested here is what you should do.
|
||||
Na maioria das vezes você pode não precisar de um rebase, porque nós comprimimos todos os commits, no entanto, se for solicitada uma rebase, é isso que você deve fazer.
|
||||
|
||||
### For usual bug fixes and features
|
||||
### Para funcionalidades e correções de erros comuns
|
||||
|
||||
When you are working on regular bugs and features on our development branch `main`, you are able to do a simple rebase:
|
||||
Quando se está trabalhando em erros normais e funcionalidades na sua branch `main` de desenvolvimento, você pode fazer um simples ajuste:
|
||||
|
||||
1. Rebase your local copy:
|
||||
1. Faça um rebase na sua cópia local:
|
||||
|
||||
```console
|
||||
git checkout <pr-branch>
|
||||
git pull --rebase upstream main
|
||||
```
|
||||
|
||||
2. Resolve any conflicts and add / edit commits
|
||||
2. Resolva quaisquer conflitos e adicione / edite commits
|
||||
|
||||
```console
|
||||
# Either
|
||||
@ -109,15 +109,15 @@ When you are working on regular bugs and features on our development branch `mai
|
||||
git commit --amend --no-edit
|
||||
```
|
||||
|
||||
3. Push back your changes to the PR
|
||||
3. Faça um push das suas alterações para o PR
|
||||
|
||||
```console
|
||||
git push --force origin <pr-branch>
|
||||
```
|
||||
|
||||
### For upcoming curriculum and features
|
||||
### Para o próximo currículo e próximas funcionalidades
|
||||
|
||||
When you are working on features for our upcoming curriculum `next-*` branches, you have to do a cherry pick:
|
||||
Quando você estiver trabalhando em funcionalidades para nossas próximas branches `next-*` do currículo, você tem que fazer um cherry pick:
|
||||
|
||||
1. Make sure your upstream comes in sync with your local:
|
||||
|
||||
@ -128,9 +128,9 @@ When you are working on features for our upcoming curriculum `next-*` branches,
|
||||
git reset --hard upstream/next-python-projects
|
||||
```
|
||||
|
||||
2. Take backup
|
||||
2. Faça o backup
|
||||
|
||||
a. Either delete your local branch after taking a backup (if you still have it locally):
|
||||
a. Exclua sua branch local depois de ter feito um backup (se você ainda a tem localmente):
|
||||
|
||||
```console
|
||||
git checkout <pr-branch-name>
|
||||
@ -146,7 +146,7 @@ When you are working on features for our upcoming curriculum `next-*` branches,
|
||||
git branch -D <pr-branch-name>
|
||||
```
|
||||
|
||||
b. Or just a backup of your pr branch (if you do not have it locally):
|
||||
b. Ou apenas faça um backup da sua branch pr (se você não a tem localmente):
|
||||
|
||||
```console
|
||||
git checkout -b <backup-branch-name> origin/<pr-branch-name>
|
||||
@ -155,14 +155,14 @@ When you are working on features for our upcoming curriculum `next-*` branches,
|
||||
# git checkout -b backup-feat/add-numpy-video-question origin/feat/add-numpy-video-question
|
||||
```
|
||||
|
||||
4. Start off with a clean slate:
|
||||
4. Comece do zero:
|
||||
|
||||
```console
|
||||
git checkout -b <pr-branch-name> next-python-projects
|
||||
git cherry-pick <commit-hash>
|
||||
```
|
||||
|
||||
5. Resolve any conflicts, and cleanup, install run tests
|
||||
5. Resolva quaisquer conflitos e limpe, instale testes
|
||||
|
||||
```console
|
||||
npm run clean
|
||||
@ -176,7 +176,7 @@ When you are working on features for our upcoming curriculum `next-*` branches,
|
||||
|
||||
```
|
||||
|
||||
6. If everything looks good push back to the PR
|
||||
6. Se tudo estiver correto, faça um push ao PR
|
||||
|
||||
```console
|
||||
git push --force origin <pr-branch-name>
|
||||
|
@ -1,26 +1,26 @@
|
||||
# Set up freeCodeCamp on Windows Subsystem for Linux (WSL)
|
||||
# Configure o freeCodeCamp no subsistema Windows para Linux (WSL)
|
||||
|
||||
> [!NOTE] Before you follow these instructions make sure your system meets the requirements
|
||||
> [!NOTE] Antes de seguir estas instruções, verifique se o sistema atende aos requisitos
|
||||
>
|
||||
> **WSL 2**: Windows 10 64-bit (Version 2004, Build 19041 or higher) - available for all distributions including Windows 10 Home.
|
||||
>
|
||||
> **Docker Desktop for Windows**: See respective requirements for [Windows 10 Pro](https://docs.docker.com/docker-for-windows/install/#system-requirements) and [Windows 10 Home](https://docs.docker.com/docker-for-windows/install-windows-home/#system-requirements)
|
||||
|
||||
This guide covers some common steps with the setup of WSL2. Once some of the common issues with WSL2 are addressed, you should be able to follow [this local setup guide](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally) to work with freeCodeCamp on Windows running a WSL distro like Ubuntu.
|
||||
Este guia abrange algumas etapas comuns sobre a instalação do WSL2. Uma vez resolvidos alguns dos problemas comuns com o WSL2, você deve seguir o nosso [guia de instalação local](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally) para trabalhar com o freeCodeCamp no Windows executando uma distro WSL como o Ubuntu.
|
||||
|
||||
## Enable WSL
|
||||
## Ative o WSL
|
||||
|
||||
Follow the instructions on the [official documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to install WSL1 and followed by upgrading to WSL2.
|
||||
Siga as instruções na [documentação oficial](https://docs.microsoft.com/en-us/windows/wsl/install-win10) para instalar o WSL1 e atualizar para o WSL2.
|
||||
|
||||
## Install Ubuntu
|
||||
## Instale o Ubuntu
|
||||
|
||||
1. We recommended using Ubuntu-18.04 or above with WSL2.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> While you may use other non-debian based distros, they all come with their own gotchas and are beyond the scope of this guide.
|
||||
> Embora você possa usar outras distribuições não baseadas em Debian, todas vêm com seus próprios empecilhos e estão além do escopo deste guia.
|
||||
|
||||
2. Update the dependencies for the OS
|
||||
2. Atualize as dependências para o sistema operacional
|
||||
|
||||
```console
|
||||
sudo apt update
|
||||
@ -30,9 +30,9 @@ Follow the instructions on the [official documentation](https://docs.microsoft.c
|
||||
sudo apt autoremove -y
|
||||
```
|
||||
|
||||
## Set up Git
|
||||
## Configure o Git
|
||||
|
||||
Git comes pre-installed with Ubuntu 18.04, verify your Git version with `git --version`.
|
||||
O Git vem pré-instalado com Ubuntu 18.04, verifique sua versão do Git com `git --version`.
|
||||
|
||||
```output
|
||||
~
|
||||
@ -44,41 +44,41 @@ git version 2.25.1
|
||||
|
||||
## Installing a Code Editor
|
||||
|
||||
We highly recommend installing [Visual Studio Code](https://code.visualstudio.com) on Windows 10. It has great support for WSL and automatically installs all the necessary extensions on your WSL distro.
|
||||
We highly recommend installing [Visual Studio Code](https://code.visualstudio.com) on Windows 10. Tem um ótimo suporte para WSL e instala automaticamente todas as extensões necessárias na distribuição WSL.
|
||||
|
||||
Essentially, you will edit and store your code on Ubuntu-18.04 with VS Code installed on Windows.
|
||||
|
||||
If you use [IntelliJ Idea](https://www.jetbrains.com/idea/), you may need to update your Node interpreter and Npm package manager to what is installed on your WSL distro.
|
||||
Se você usa o [IntelliJ Idea](https://www.jetbrains.com/idea/), talvez precise atualizar seu interpretador do Node e seu gerenciador de pacotes NPM pelo que estiver instalado em sua distro WSL.
|
||||
|
||||
You can check these settings by going to Settings > Languages & Frameworks > Node.js and NPM.
|
||||
Você pode checar essas configurações indo em Settings > Languages & Frameworks > Node.js and NPM.
|
||||
|
||||
## Installing Docker Desktop
|
||||
|
||||
**Docker Desktop for Windows** allows you to install and run databases like MongoDB and other services like NGINX and more. This is useful to avoid common pitfalls with installing MongoDB or other services directly on Windows or WSL2.
|
||||
**O Docker Desktop para Windows** permite instalar e executar banco de dados e serviços como MongoDB, NGINX, etc. Isso é útil para evitar problemas comuns com a instalação do MongoDB ou outros serviços diretamente no Windows ou WSL2.
|
||||
|
||||
Follow the instructuction on the [official documentation](https://docs.docker.com/docker-for-windows/install) and install Docker Desktop for your Windows distribution.
|
||||
Siga as instruções da [documentação oficial](https://docs.docker.com/docker-for-windows/install) e instale o Docker Desktop para a sua distribuição no Windows.
|
||||
|
||||
There are some minimum hardware requirements for the best experience.
|
||||
Existem alguns requisitos mínimos de hardware para melhor experiência.
|
||||
|
||||
## Configure Docker Desktop for WSL
|
||||
## Configure o Docker Desktop para WSL
|
||||
|
||||
Once Docker Desktop is installed, [follow these instructions](https://docs.docker.com/docker-for-windows/wsl) and configure it to use the Ubuntu-18.04 installation as a backend.
|
||||
Quando o Docker Desktop estiver instalado, [siga estas instruções](https://docs.docker.com/docker-for-windows/wsl) e configure-o para usar a instalação do Ubuntu-18.04 como backend.
|
||||
|
||||
This makes it so that the containers run on the WSL side instead of running on Windows. You will be able to access the services over `http://localhost` on both Windows and Ubuntu.
|
||||
Isso faz com que os contêineres sejam executados no lado do WSL em vez de serem executados no Windows. Você será capaz de acessar os serviços através do `http://localhost` tanto no Windows quanto no Ubuntu.
|
||||
|
||||
## Install MongoDB from Docker Hub
|
||||
## Instale MongoDB usando Docker Hub
|
||||
|
||||
Once you have configured Docker Desktop to work with WSL2, follow these steps to start a MongoDB service:
|
||||
Depois de ter configurado o Docker Desktop para trabalhar com o WSL2, siga essas etapas para iniciar um serviço no MongoDB:
|
||||
|
||||
1. Launch a new Ubuntu-18.04 terminal
|
||||
|
||||
2. Pull `MongoDB 4.0.x` from dockerhub
|
||||
2. Pull `MongoDB 4.0.x` do dockerhub
|
||||
|
||||
```console
|
||||
docker pull mongo:4.0
|
||||
```
|
||||
|
||||
3. Start the MongoDB service at port `27017`, and configure it to run automatically on system restarts
|
||||
3. Inicie o serviço MongoDB na porta `27017` e configure-o para ser executado automaticamente ao reiniciar o sistema
|
||||
|
||||
```console
|
||||
docker run -it \
|
||||
@ -93,9 +93,9 @@ Once you have configured Docker Desktop to work with WSL2, follow these steps to
|
||||
|
||||
## Installing Node.js and npm
|
||||
|
||||
We recommend you install the LTS release for Node.js with a node version manager - [nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
|
||||
Recomendamos que você instale a versão LTS para Node.js com um gerenciador de versões do node - [nvm](https://github.com/nvm-sh/nvm#installing-and-updating).
|
||||
|
||||
Once installed use these commands to install and use the Node.js version as needed
|
||||
Uma vez instalado, use esses comandos para instalar e usar a versão do Node.js, conforme necessário
|
||||
|
||||
```console
|
||||
nvm install --lts
|
||||
@ -111,23 +111,23 @@ nvm install 14
|
||||
nvm use 12
|
||||
```
|
||||
|
||||
Node.js comes bundled with `npm`, you can update to the latest versions of `npm` with:
|
||||
O Node.js vem com o `npm` embutido. Você pode atualizar para as versões mais recentes do `npm` com:
|
||||
|
||||
```console
|
||||
npm install -g npm@latest
|
||||
```
|
||||
|
||||
## Set up freeCodeCamp locally
|
||||
## Configure localmente o freeCodeCamp
|
||||
|
||||
Now that you have installed the pre-requisites, follow [our local setup guide](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally) to clone, install and setup freeCodeCamp locally on your machine.
|
||||
Agora que você instalou os pré-requisitos, siga [nosso guia de instalação local](https://contribute.freecodecamp.org/#/how-to-setup-freecodecamp-locally) para clonar, instalar e configurar o freeCodeCamp em sua máquina.
|
||||
|
||||
> [!WARNING]
|
||||
>
|
||||
> Please note, at this time the set up for Cypress tests (and related GUI needs) are a work in progress. You should still be able to work on most of the codebase.
|
||||
> Por favor note que, neste momento, a configuração para testes do Cypress (e necessidades relacionadas à GUI) são um trabalho em andamento. You should still be able to work on most of the codebase.
|
||||
|
||||
## Useful Links
|
||||
|
||||
- [A WSL2 Dev Setup with Ubuntu 20.04, Node.js, MongoDB, VS Code and Docker](https://devlog.sh/wsl2-dev-setup-with-ubuntu-nodejs-mongodb-and-docker) - an article by Mrugesh Mohapatra (Staff Developer at freeCodeCamp.org)
|
||||
- [Configuração de desenvolvimento WSL2 com Ubuntu 20.04, Node.js, MongoDB, VS Code e Docker](https://devlog.sh/wsl2-dev-setup-with-ubuntu-nodejs-mongodb-and-docker) - um artigo de Mrugesh Mohapatra (Desenvolvedor de Equipe na freeCodeCamp.org)
|
||||
- Frequently asked questions on:
|
||||
- [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/faq)
|
||||
- [Subsistema Windows para Linux](https://docs.microsoft.com/en-us/windows/wsl/faq)
|
||||
- [Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/faqs)
|
||||
|
@ -244,78 +244,81 @@ Acompanhamos quanto dura para os usuários resolverem mudanças e usamos essa in
|
||||
|
||||
Cada desafio deve ensinar exatamente um conceito, e esse conceito deve estar aparente a partir do nome do desafio.
|
||||
|
||||
We can reinforce previously covered concepts through repetition and variations - for example, introducing h1 elements in one challenge, then h3 elements a few challenges later.
|
||||
Podemos reforçar conceitos citados anteriormente através de repetição e variações - por exemplo, introduzir elementos h1 em um desafio, então elementos h3 depois.
|
||||
|
||||
Our goal is to have thousands of 2-minute challenges. These can flow together and reiterate previously-covered concepts.
|
||||
Nossa meta é ter vários desafios de 2 minutos. Eles podem se completar e relembrar conceitos anteriormente citados.
|
||||
|
||||
### Formatting challenge text
|
||||
### Formatando o texto do desafio
|
||||
|
||||
Here are specific formatting guidelines for challenge text and examples:
|
||||
Aqui estão diretrizes de formatação específicas para o texto do desafio e exemplos:
|
||||
|
||||
- Language keywords go in `` \` `` backticks. For example, HTML tag names or CSS property names.
|
||||
- References to code parts (i.e. function, method, or variable names) should be wrapped in `` \` `` backticks. See example below:
|
||||
- Palavras chaves da linguagem ficam entre `` \` `` crases. Por exemplo, nomes de tags HTML ou nomes de propriedade CSS.
|
||||
- Referências a códigos (ex. função, método ou nomes de variáveis) devem estar entre `` \` ``. Veja o exemplo abaixo:
|
||||
|
||||
```md
|
||||
Use `parseInt` to convert the variable `realNumber` into an integer.
|
||||
Use `parseInt` para converter a variável `realNumber` em um número inteiro.
|
||||
```
|
||||
|
||||
- References to file names and path directories (e.g. `package.json`, `src/components`) should be wrapped in `` \` `` backticks.
|
||||
- Multi-line code blocks **must be preceded by an empty line**. The next line must start with three backticks followed immediately by one of the [supported languages](https://prismjs.com/#supported-languages). To complete the code block, you must start a new line which only has three backticks and **another empty line**. See example below:
|
||||
- Whitespace matters in Markdown, so we recommend that you make it visible in your editor.
|
||||
- Referências a nomes de arquivos e caminhos (ex. `package.json`, `src/components`) devem estar entre `` \` ``.
|
||||
- Blocos de código com várias linhas **devem ser precedidos por uma linha vazia**. A próxima linha deve começar com três crases seguidas imediatamente por uma das [linguagens suportadas](https://prismjs.com/#supported-languages). Para completar o bloco de código, você deve começar uma nova linha que apenas possui três crases e **outra linha vazia**. See example below:
|
||||
- Os espaços importam no Markdown. Então, recomendamos que os mantenham visíveis no seu editor.
|
||||
|
||||
**Note:** If you are going to use an example code in YAML, use `yaml` instead of `yml` for the language to the right of the backticks.
|
||||
**Observação:** se você for usar um exemplo de códigoem YAML, use `yaml` ao invés de `yml` para a linguagem na direita das crases.
|
||||
|
||||
The following is an example of code:
|
||||
A seguir um exemplo do código:
|
||||
|
||||
````md
|
||||
```{language}
|
||||
|
||||
[YOUR CODE HERE]
|
||||
[SEU CÓDIGO]
|
||||
|
||||
````
|
||||
````
|
||||
|
||||
- Additional information in the form of a note should be surrounded by blank lines, and formatted: `**Note:** Rest of note text...`
|
||||
- If multiple notes are needed, then list all of the notes in separate sentences using the format: `**Notes:** First note text. Second note text.`
|
||||
- Use single-quotes where applicable
|
||||
- Informações extras, como observações, devem estar entre linhas em branco e formatadas:
|
||||
`**Observação:** Texto da observação...`
|
||||
- Se muitas observações são necessárias, liste todas elas em frases separadas usando o formato:
|
||||
`**Observações:** Texto da primeira observação.
|
||||
Texto da segunda observação.`
|
||||
- Use aspas simples quando necessário
|
||||
|
||||
**Note:** The equivalent _Markdown_ should be used in place of _HTML_ tags.
|
||||
**Observação:** O _Markdown_ equivalente deve ser usado ao invés de tags _HTML_.
|
||||
|
||||
## Writing tests
|
||||
## Escrevendo testes
|
||||
|
||||
Challenges should have the minimum number of tests necessary to verify that a camper understands a concept.
|
||||
Desafios devem ter um número mínimo de testes necessários para verificar que um usuário freeCodeCamp entendeu o conceito.
|
||||
|
||||
Our goal is to communicate the single point that the challenge is trying to teach, and test that they have understood that point.
|
||||
Nossa meta é comunicar o ponto que o desafio está tentando ensinar e testar se eles entenderam esse ponto.
|
||||
|
||||
Challenge tests can make use of the Node.js and Chai.js assertion libraries. Also, if needed, user-generated code can be accessed in the `code` variable. In addition, the `__helpers` object exposes several functions that simplify the process of writing tests. The available functions are defined in _client/src/utils/curriculum-helpers.ts_.
|
||||
Os testes do desafio podem usar bibliotecas Node.js e Chai.js. Se necessário, o código gerado pro usuário pode ser acessado na variável `code` também. Além disso, os objetos `__helpers` expõem várias funções que simplificam o processo de escrita dos testes. As funções disponíveis estão definidas em _client/src/utils/curriculum-helpers.ts_.
|
||||
|
||||
## Formatting seed code
|
||||
## Formatação do código seed
|
||||
|
||||
Here are specific formatting guidelines for the challenge seed code:
|
||||
Aqui vemos diretrizes de formatação específicas para o código seed do desafio:
|
||||
|
||||
- Use two spaces to indent
|
||||
- JavaScript statements end with a semicolon
|
||||
- Use double quotes where applicable
|
||||
- Use dois espaços para indentação
|
||||
- Declarações em JavaScript terminam em ponto-e-vírgula
|
||||
- Use aspas duplas onde for aplicável
|
||||
|
||||
### Seed code comments
|
||||
### Comentários do código seed
|
||||
|
||||
We have a [comment dictionary](/curriculum/dictionaries/english/comments.js) that contains the only comments that can be used within the seed code. The exact case and spacing of the dictionary comment must be used. The comment dictionary should not be expanded without prior discussion with the dev-team.
|
||||
Temos um [comment dictionary](/curriculum/dictionaries/english/comments.js) que contém os únicos comentários que podem ser usados no código seed. O espaçamento e as letras maiúsculas e minúsculas do dicionário de comentário devem ser usadas exatamente como são. O dicionário de comentário não deve ser expandido sem uma discussão prévia com o time de desenvolvimento (dev-team).
|
||||
|
||||
Comments used should have a space between the comment characters and the comment themselves. In general, comments should be used sparingly. Always consider rewriting a challenge's description or instructions if it could avoid using a seed code comment.
|
||||
Os comentários usados devem ter um espaço entre os caracteres do comentário e o comentário em si. Geralmente, os comentários devem ser usados com moderação. Sempre considere reescrever a descrição de um desafio ou instrução se for possível evitar usar um comentário de código fornecido.
|
||||
|
||||
Example of valid single line JavaScript comment:
|
||||
Exemplo de um comentário de uma linha em JavaScript:
|
||||
|
||||
```js
|
||||
// Only change code below this line
|
||||
// Mude somente abaixo dessa linha
|
||||
````
|
||||
|
||||
Example of a valid CSS comment:
|
||||
Exemplo de um comentário válido em CSS:
|
||||
|
||||
```css
|
||||
/* Only change code above this line */
|
||||
```
|
||||
|
||||
If a challenge only has a single place where code changes are needed, please use the comments in the following example to instruct the user where changes should be made.
|
||||
Se um desafio tem apenas um lugar onde as mudanças de código são necessárias, use os comentários seguindo o exemplo a seguir para instruir o usuário sobre o local onde as mudanças devem ser feitas.
|
||||
|
||||
```js
|
||||
var a = 3;
|
||||
@ -328,7 +331,7 @@ b = 9 + b;
|
||||
c = c + 7;
|
||||
```
|
||||
|
||||
If a challenge has multiple places where the user is expected to change code (i.e. the React challenges)
|
||||
Se um desafio tem múltiplos lugares onde se espera que o usuário faça mudanças no código (ex. os desafios de React)
|
||||
|
||||
```jsx
|
||||
class MyComponent extends React.Component {
|
||||
@ -337,9 +340,9 @@ class MyComponent extends React.Component {
|
||||
this.state = {
|
||||
text: 'Hello'
|
||||
};
|
||||
// Change code below this line
|
||||
// Altere o código abaixo desta linha
|
||||
|
||||
// Change code above this line
|
||||
// Altere o código acima desta linha
|
||||
}
|
||||
handleClick() {
|
||||
this.setState({
|
||||
@ -349,9 +352,9 @@ class MyComponent extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
{/* Change code below this line */}
|
||||
{/* Altere o código abaixo desta linha */}
|
||||
<button>Click Me</button>
|
||||
{/* Change code above this line */}
|
||||
{/* Altere o código acima desta linha */}
|
||||
<h1>{this.state.text}</h1>
|
||||
</div>
|
||||
);
|
||||
@ -359,70 +362,70 @@ class MyComponent extends React.Component {
|
||||
}
|
||||
```
|
||||
|
||||
### Translation of seed code comments
|
||||
### Tradução de comentários de código seed
|
||||
|
||||
There are separate comment dictionaries for each language. The [English version of the comment dictionary](/curriculum/dictionaries/english/comments.js) is the basis for the translations found in the corresponding non-English versions of the files. The non-English version of the Chinese comment dictionary would be located at `/curriculum/dictionaries/chinese/comments.js`. Each dictionary consists of an array of objects with a unique `id` property and a `text` property. Only the `text` should be modified to encompass the translation of the corresponding English comment.
|
||||
Existem dicionários de comentários separados para cada linguagem. A [versão em inglês do dicionário de comentários](/curriculum/dictionaries/english/comments.js) é a base para as traduções encontradas nas versões correspondentes dos arquivos em outros idiomas. A versão não inglesa do dicionário de comentário chinesa pode ser encontrada em `/curriculum/dictionaries/chinese/comments.js`. Cada dicionário consiste em um array de objetos com uma propriedade de `id` única e uma propriedade de `text`. Somente a propriedade `text` deve ser modificada para englobar a tradução do comentário correspondente em inglês.
|
||||
|
||||
Some comments may contain a word/phrase that should not be translated. For example, variable names or proper library names like "React" should not be translated. See the comment below as an example. The word `myGlobal` should not be translated.
|
||||
Alguns comentários podem conter uma palavra/frase que não deve ser traduzida. Por exemplo, nomes de variáveis, ou nomes próprios de bibliotecas como "React" não devem ser traduzidas. Veja o comentário abaixo como um exemplo. a palavra `myGlobal` não deve ser traduzida.
|
||||
|
||||
```text
|
||||
Declare the myGlobal variable below this line
|
||||
Declare a variável myGlobal abaixo desta linha
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> We are working on an integration to make it possible to work on i18n for the comment dictionary.
|
||||
> Estamos trabalhando em uma integração para ser possível trabalhar no i18n para o dicionário de comentário.
|
||||
|
||||
## Hints and Solutions
|
||||
## Dicas e soluções
|
||||
|
||||
Each challenge has a `Get a Hint` button, so a user can access any hints/solutions which have been created for the challenge. Curriculum hints/solutions topics are located on [our forum](https://forum.freecodecamp.org/c/guide) under the `Guide` category.
|
||||
Cada desafio tem um botão `Get a Hint`, assim, o usuário pode acessar qualquer dica/solução que foi criada para aquele desafio. Os tópicos de dicas/soluções são encontrados no [nosso fórum](https://forum.freecodecamp.org/c/guide), abaixo da categoria `Guide`.
|
||||
|
||||
If you find a problem with an existing challenge's hints/solutions topic, you can make suggestions in the [contributors category](https://forum.freecodecamp.org/c/contributors) on the forum. Moderators and users with trust level 3 will review the comments and decide whether or not to include the changes in the corresponding hint/solutions topic.
|
||||
Se você encontrar um problema nas dicas/tópicos de solução de um desafio existente, você pode fazer sugestões na [categoria de contribuidores](https://forum.freecodecamp.org/c/contributors) no fórum. Os moderadores e usuários com o nível de confiança 3 vão revisar os comentários e decidir quais incluir as mudanças nos tópicos correspondentes de dicas/soluções.
|
||||
|
||||
### Adding new Challenge hints/solutions Topics
|
||||
### Adicionando um novo tópico de dicas/soluções em um desafio
|
||||
|
||||
Take the following steps when adding a new challenge hints/solutions related topic.
|
||||
Faça o passo-a-passo a seguir quando for adicionar novos tópicos de dicas/soluções relacionadas a um desafio.
|
||||
|
||||
1. Start by following the same steps for creating a new topic but review the next for creating the title.
|
||||
2. The title of the topic should start with `freeCodeCamp Challenge Guide:` concatenated with the actual title of the curriculum challenge. For example, if the challenge is named "`Chunky Monkey`", the topic title would be "`freeCodeCamp Challenge Guide: Chunky Monkey`".
|
||||
2. O título do tópico deve começar com `freeCodeCamp Challenge Guide:` concatenado com o título atual do desafio de currículo. Por exemplo, se o desafio é chamado "`Chunky Monkey`", o título do tópico seria "`freeCodeCamp Challenge Guide: Chunky Monkey`".
|
||||
3. `camperbot` should be the owner of these topics/posts, so you will need to request an admin to change the ownership of the main post to `camperbot`.
|
||||
4. Once the new topic is created, a forum topic id is created. It is located at the end of the forum topic URL. This id must be added to the frontmatter of the curriculum challenge file via the normal pull request process for the `Get a Hint` button to link to the topic.
|
||||
4. Depois que o novo tópico for criado, será criado um id para o tópico do fórum. It is located at the end of the forum topic URL. This id must be added to the frontmatter of the curriculum challenge file via the normal pull request process for the `Get a Hint` button to link to the topic.
|
||||
|
||||
### Guidelines for content of hints and solutions topics
|
||||
### Diretrizes para o conteúdo dos tópicos de dicas e soluções
|
||||
|
||||
When proposing a solution for a curriculum challenge related Guide topic, the full code must be added. This includes all the original seed code plus any changes needed to pass all the challenge tests. The following template should be used when creating new hints/solutions topics:
|
||||
Ao propor uma solução para um tópico do guia relacionado a um desafio de currículo, o código completo deve ser adicionado. Isso inclui todo o código seed original, assim como as alterações necessárias para passar em todos os testes do desafio. O modelo a seguir deve ser usado ao criar um novo tópico de dicas/soluções:
|
||||
|
||||
````md
|
||||
# Challenge Name Goes Here
|
||||
# O nome do desafio fica aqui
|
||||
|
||||
---
|
||||
|
||||
## Problem Explanation
|
||||
## Explicação do problema
|
||||
|
||||
This summarizes what needs to be done without just restating the challenge description and/or instructions. This is an optional section
|
||||
Resume o que precisa ser feito sem copiar a descrição do desafio e/ou instruções. Essa é uma seção opcional
|
||||
|
||||
#### Relevant Links
|
||||
#### Links relevantes
|
||||
|
||||
- [Link Text](link_url_goes_here)
|
||||
- [Link Text](link_url_goes_here)
|
||||
- [Texto do link](url_do_link_fica_aqui)
|
||||
- [Texto do link](url_do_link_fica_aqui)
|
||||
|
||||
---
|
||||
|
||||
## Hints
|
||||
## Dicas
|
||||
|
||||
### Hint 1
|
||||
### Dica 1
|
||||
|
||||
Hint goes here
|
||||
A dica fica aqui
|
||||
|
||||
### Hint 2
|
||||
### Dica 2
|
||||
|
||||
Hint goes here
|
||||
A dica fica aqui
|
||||
|
||||
---
|
||||
|
||||
## Solutions
|
||||
## Soluções
|
||||
|
||||
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
||||
<details><summary>Solução 1 (Clique para mostrar/ocultar)</summary>
|
||||
|
||||
```js
|
||||
function myFunc() {
|
||||
@ -432,8 +435,8 @@ function myFunc() {
|
||||
|
||||
#### Code Explanation
|
||||
|
||||
- Code explanation goes here
|
||||
- Code explanation goes here
|
||||
- A explicação do código fica aqui
|
||||
- A explicação do código fica aqui
|
||||
|
||||
#### Relevant Links
|
||||
|
||||
@ -443,17 +446,17 @@ function myFunc() {
|
||||
</details>
|
||||
````
|
||||
|
||||
## Testing Challenges
|
||||
## Testando desafios
|
||||
|
||||
Before you [create a pull request](how-to-open-a-pull-request.md) for your changes, you need to validate that the changes you have made do not inadvertently cause problems with the challenge.
|
||||
Antes de [criar um pull request](how-to-open-a-pull-request.md) para suas modificações, você precisa validar que as mudanças feitas não causam problemas no desafio.
|
||||
|
||||
1. To test all challenges run the below command from the root directory
|
||||
1. Para testar todos os desafios, execute o comando abaixo a partir do diretório raiz
|
||||
|
||||
````
|
||||
npm run test:curriculum
|
||||
```
|
||||
|
||||
2. You can also test a block or a superblock of challenges with these commands
|
||||
2. Você também pode testar um bloco ou superbloco de desafios com esses comandos
|
||||
|
||||
```
|
||||
npm run test:curriculum --block='Basic HTML and HTML5'
|
||||
@ -463,29 +466,29 @@ npm run test:curriculum --block='Basic HTML and HTML5'
|
||||
npm run test:curriculum --superblock=responsive-web-design
|
||||
```
|
||||
|
||||
You are also able to test one challenge individually by performing the following steps:
|
||||
Você também é capaz de testar um desafio individualmente seguindo as seguintes etapas:
|
||||
|
||||
1. Switch to the `curriculum` directory:
|
||||
1. Mude para o diretório `curriculum`:
|
||||
|
||||
```
|
||||
cd curriculum
|
||||
```
|
||||
|
||||
2. Run the following for each challenge file for which you have changed (replacing `challenge-title-goes-here` with the full title of the challenge):
|
||||
2. Execute o comando a seguir para cada arquivo de desafio que você fez mudanças (substituindo `challenge-title-goes-here` com o título completo do desafio):
|
||||
|
||||
```
|
||||
npm run test -- -g challenge-title-goes-here ```
|
||||
|
||||
Once you have verified that each challenge you've worked on passes the tests, [please create a pull request](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/docs/how-to-open-a-pull-request.md).
|
||||
Quando você verificar que cada desafio modificado passou nos testes, [crie um pull request](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/docs/how-to-open-a-pull-request.md).
|
||||
|
||||
> [!TIP] You can set the environment variable `LOCALE` in the `.env` to the language of the challenge(s) you need to test.
|
||||
> [!TIP] Você pode definir a variável de ambiente `LOCALE` no `.env` no idioma do(s) desafio(s) que precisa testar.
|
||||
>
|
||||
> The currently accepted values are `english` and `chinese`, with `english` being set by default.
|
||||
> Os valores atualmente aceitos são `english` e `chinese`, com `english` sendo o padrão.
|
||||
|
||||
### Useful Links
|
||||
### Links úteis
|
||||
|
||||
Creating and Editing Challenges:
|
||||
Criando e editando desafios:
|
||||
|
||||
1. [Challenge types](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challengeTypes.js#L1-L13) - what the numeric challenge type values mean (enum).
|
||||
1. [Tipos do desafio](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challengeTypes.js#L1-L13) - o que significam os valores do tipo de desafio numérico (enum).
|
||||
|
||||
2. [Contributing to FreeCodeCamp - Writing ES6 Challenge Tests](https://www.youtube.com/watch?v=iOdD84OSfAE#t=2h49m55s) - a video following [Ethan Arrowood](https://twitter.com/ArrowoodTech) as he contributes to the old version of the curriculum.
|
||||
2. [Contribuindo para o FreeCodeCamp - Escrevendo testes de desafio ES6](https://www.youtube.com/watch?v=iOdD84OSfAE#t=2h49m55s) - um vídeo com [Ethan Arrowood](https://twitter.com/ArrowoodTech) contribuindo para a versão antiga do currículo.
|
||||
|
Reference in New Issue
Block a user