chore(i18n,docs): update translations (#42994)
This commit is contained in:
@ -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