chore(i18n,docs): processed translations (#52332)

This commit is contained in:
camperbot
2023-11-13 20:44:08 +05:30
committed by GitHub
parent a36f61a03c
commit 65dd8bf589
13 changed files with 188 additions and 180 deletions
+2 -1
View File
@@ -16,13 +16,14 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **Additional Guides**
- [Understand the curriculum file structure](curriculum-file-structure.md)
- [Debug outgoing emails locally](how-to-catch-outgoing-emails-locally.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
+2 -1
View File
@@ -16,13 +16,14 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **Additional Guides**
- [Understand the curriculum file structure](curriculum-file-structure.md)
- [Debug outgoing emails locally](how-to-catch-outgoing-emails-locally.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
+3 -2
View File
@@ -16,14 +16,15 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **Guías adicionales**
- [Entender la estructura de los archivos del currículo](curriculum-file-structure.md)
- [Depurar localmente los emails salientes](how-to-catch-outgoing-emails-locally.md)
- [Configurar freeCodeCamp en Windows (WSL)](how-to-setup-wsl.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
+3 -2
View File
@@ -16,14 +16,15 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **Zusätzliche Leitfäden**
- [Curriculum-Dateistruktur verstehen](curriculum-file-structure.md)
- [Ausgehende E-Mails lokal debuggen](how-to-catch-outgoing-emails-locally.md)
- [freeCodeCamp unter Windows einrichten (WSL)](how-to-setup-wsl.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
+3 -2
View File
@@ -16,14 +16,15 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **Guide aggiuntive**
- [Capire la struttura dei file del curriculum](curriculum-file-structure.md)
- [Fare il debug delle email in uscita localmente](how-to-catch-outgoing-emails-locally.md)
- [Settare freeCodeCamp su Windows (WSL)](how-to-setup-wsl.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
+2 -1
View File
@@ -16,13 +16,14 @@
- [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Work on Localized Web App](how-to-work-on-localized-client-webapp.md)
- [Work on Cypress tests](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Work on Video Challenges](how-to-help-with-video-challenges.md)
- [Work on Documentation](how-to-work-on-the-docs-theme.md)
- [Open a pull request](how-to-open-a-pull-request.md)
- **その他のガイド**
- [Understand the curriculum file structure](curriculum-file-structure.md)
- [Debug outgoing emails locally](how-to-catch-outgoing-emails-locally.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
+7 -6
View File
@@ -16,18 +16,19 @@
- [Trabalhar na aplicação para dispositivos móveis](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Trabalhar nos tutoriais com o CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Trabalhar na aplicação para a web localizada](how-to-work-on-localized-client-webapp.md)
- [Trabalhar em testes do Cypress](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Trabalhar nos desafios em vídeo](how-to-help-with-video-challenges.md)
- [Trabalhar com a documentação](how-to-work-on-the-docs-theme.md)
- [Abrir um pull request](how-to-open-a-pull-request.md)
- **Guias adicionais**
- [Compreender a estrutura do arquivo do currículo](curriculum-file-structure.md)
- [Depurar e-mails enviados localmente](how-to-catch-outgoing-emails-locally.md)
- [Configurar freeCodeCamp no Windows (WSL)](how-to-setup-wsl.md)
- [Usar o Docker no Windows Home](how-to-use-docker-on-windows-home.md)
- [Fluxo de trabalho do token de usuário](user-token-workflow.md)
- [Solucionar problemas de desenvolvimento](troubleshooting-development-issues.md)
- [Manual de análise dos autores](authors-analytics-manual.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
- [Authors Analytics Manual](authors-analytics-manual.md)
---
@@ -278,12 +278,12 @@ Se você tiver problemas durante a instalação, confira a [seção de solução
Uma rápida referência aos comandos que você precisará ao trabalhar localmente.
| comando | descrição |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `pnpm install` | Instala/reinstala todas as dependências e inicializa os diferentes serviços. |
| `pnpm run seed` | Creates authorized test users and inserts them into MongoDB. Also runs `seed:exams` and `seed:surveys` below. |
| `pnpm run seed:certified-user` | Cria usuários de testes autorizados com certificações totalmente completas e os insere no MongoDB. |
| `pnpm run seed:exams` | Cria exames e os insere no MongoDB. |
| `pnpm run seed:surveys` | Creates surveys for defaults users and inserts them into MongoDB. |
| `pnpm run develop` | Starts the freeCodeCamp API Server and Client Applications. |
| `pnpm run clean` | Uninstalls all dependencies and cleans up caches. |
| comando | descrição |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `pnpm install` | Instala/reinstala todas as dependências e inicializa os diferentes serviços. |
| `pnpm run seed` | Cria usuários de testes autorizados e os insere no MongoDB. Também executa `seed:exams` e `seed:surveys` abaixo. |
| `pnpm run seed:certified-user` | Cria usuários de testes autorizados com certificações totalmente completas e os insere no MongoDB. |
| `pnpm run seed:exams` | Cria exames e os insere no MongoDB. |
| `pnpm run seed:surveys` | Cria pesquisas para usuários padrão e as insere no MongoDB. |
| `pnpm run develop` | Inicia o servidor de API do freeCodeCamp e aplicações de client. |
| `pnpm run clean` | Desinstala todas as dependências e limpa os caches. |
@@ -232,17 +232,17 @@ As frases devem ser claras e resumidas com o mínimo de termos técnicos. Se usa
Mantenha os parágrafos curtos (em torno de 1-4 frases). É mais provável que as pessoas leiam vários parágrafos curtos do que um parágrafo enorme.
Use american english, e.g., use `labeled` instead of `labelled`.
Use inglês americano. Por exemplo, use `labeled` em vez de `labelled`.
Challenge text should use the second person ("you") to help to give it a conversational tone. This way the text and instructions seem to speak directly to the camper working through the challenge. Try to avoid using the first person ("I", "we", "let's", and "us").
O desafio de texto deve usar a segunda pessoa ("você") para ajudar a dar um tom coloquial. Dessa forma, o texto e as instruções parecem falar diretamente ao usuário freeCodeCamp que está resolvendo o desafio. Tente evitar usar a primeira pessoa ("eu", "nós", "vamos").
Don't use outbound links. These interrupt the flow. Campers should never have to google anything during these challenges. If there are resources you think campers would benefit from, add them to the challenge's Guide-related article.
Não use links externos. Eles interrompem o fluxo. Os usuários do freeCodeCamp nunca devem precisar pesquisar nada no Google durante esses desafios. Se há recursos que você acha que os usuários aproveitarão, adicione-os no artigo relacionado ao guia do desafio.
You can add diagrams if necessary.
Você pode adicionar diagramas se necessário.
Don't use emojis or emoticons in challenges. freeCodeCamp has a global community, and the cultural meaning of an emoji or emoticon may be different around the world. Also, emojis can render differently on different systems.
Não use emojis ou emoticons em desafios. O freeCodeCamp possui uma comunidade global, e o significado cultural de um emoji ou emoticon pode ser diferente ao redor do mundo. Além disso, emojis podem ser mostrados de maneiras diferentes em diferentes sistemas.
Proper nouns should use correct capitalization when possible. Below is a list of words as they should appear in the challenges.
Substantivos próprios devem começar com letra maiúscula quando possível. Abaixo está uma lista de palavras e como devem aparecem nos desafios.
- JavaScript (letras maiúsculas em "J" e "S" e sem abreviações)
- Node.js
@@ -250,28 +250,28 @@ Proper nouns should use correct capitalization when possible. Below is a list of
### A regra dos 2 minutos
Each challenge should be solvable within 120 seconds by a native English speaker who has completed the challenges leading up to it. This includes the amount of time it takes to read the directions/instructions understand the seeded code, write their code and get all the tests to pass.
Cada desafio deve ser resolvido em 120 segundos por um nativo da língua inglesa que tenha concluído os desafios anteriores. Isso inclui a quantidade de tempo que leva para ler as instruções, entender o código fornecido, escrever o código e passar nos testes.
If it takes longer than two minutes to complete the challenge, you have two options:
Se levar mais do que dois minutos para completar um desafio, você tem duas opções:
- Simplifique o desafio, ou
- Divida o desafio em dois desafios.
The 2-minute rule forces you, the challenge designer, to make your directions concise, your seed code clear, and your tests straightforward.
A regra dos 2 minutos força quem criou o desafio a deixar as instruções resumidas, o código fornecido limpo e seus testes diretos.
We track how long it takes for campers to solve challenges and use this information to identify challenges that need to be simplified or split.
Acompanhamos o tempo que leva para os usuários resolverem os desafios e usamos essa informação para identificar desafios que precisem ser simplificados ou divididos.
### Modularidade
Each challenge should teach exactly one concept, and that concept should be apparent from the challenge's name.
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.
### 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:
- 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:
@@ -284,9 +284,9 @@ Use `parseInt` para converter a variável `realNumber` em um número inteiro.
- 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**. Veja o exemplo abaixo:
- 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ódigo em YAML, use `yaml` ao invés de `yml` para a linguagem à direita das crases.
The following is an example of code:
Exemplo de código:
````md
```{language}
@@ -311,7 +311,7 @@ Desafios devem ter um número mínimo de testes necessários para verificar que
Nossa meta é comunicar o ponto que o desafio está tentando ensinar e testar se eles entenderam esse ponto.
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. The available functions are defined in the [curriculum-helpers](https://github.com/freeCodeCamp/curriculum-helpers/blob/main/lib/index.ts) repo.
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 no repositório [curriculum-helpers](https://github.com/freeCodeCamp/curriculum-helpers/blob/main/lib/index.ts).
## Formatação do código seed
@@ -333,13 +333,13 @@ Exemplo de um comentário de uma linha em JavaScript:
// 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;
@@ -352,7 +352,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 {
@@ -385,9 +385,9 @@ class MyComponent extends React.Component {
### Tradução de comentários de código seed
There are separate comment dictionaries for each language. The [English version of the comment dictionary](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/dictionaries/english/comments.json) 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.json`. 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](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/dictionaries/english/comments.json) é a base para as traduções encontradas nas versões correspondentes dos arquivos em outros idiomas. A versão do dicionário de comentários em chinês (não a versão em inglês) pode ser encontrada em `/curriculum/dictionaries/chinese/comments.json`. 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 a variável myGlobal abaixo desta linha
@@ -399,13 +399,13 @@ Declare a variável myGlobal abaixo desta linha
## 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.
### 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. Comece seguindo os mesmos passos para criar um novo tópico, mas revise o seguinte para criar o título.
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`".
@@ -414,7 +414,7 @@ Take the following steps when adding a new challenge hints/solutions-related top
### 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
# O nome do desafio fica aqui
@@ -501,35 +501,35 @@ Você também pode testar desafios por título utilizando as seguintes etapas:
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 no qual você fez alteraçõess (substituindo `challenge-title-goes-here` com o título completo do desafio):
```
pnpm run test -- -g challenge-title-goes-here
pnpm run test -- -g titulo-do-desafio-aqui
```
> [!TIP]
> You can set the environment variable `LOCALE` in the `.env` to the language of the challenge(s) you need to test.
> Você pode definir a váriavel de ambiente `LOCALE` no arquivo `.env` para o idioma do(s) desafio(s) que você precisa testar.
>
> The currently accepted values are `english` and `chinese`, with `english` being set by default.
> Os valores aceitos de momento são `english` e `chinese`, com `english` sendo o valor padrão.
## Proposing a Pull Request (PR)
## Propondo um Pull Request (PR)
After you've committed your changes, check here for [how to open a Pull Request](how-to-open-a-pull-request.md).
Depois de fazer o commit de suas alterações, confira aqui [como abrir um Pull Request](how-to-open-a-pull-request.md).
## Useful Links
## Links úteis
Creating and Editing Challenges:
Criação e edição de desafios:
1. [Challenge types](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challenge-types.js#L1-L13) - what the numeric challenge type values mean (enum).
1. [Tipos de desafio](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challenge-types.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 para desafios de ES6](https://www.youtube.com/watch?v=iOdD84OSfAE#t=2h49m55s) - um vídeo que acompanha [Ethan Arrowood](https://twitter.com/ArrowoodTech) durante sua contribuição para a versão antiga do currículo.
## Helper Scripts
## Scripts auxiliares
> [!NOTE]
> If you are working with the step-based challenges, refer to the [Work on Practice Projects](how-to-work-on-practice-projects.md) section.
> Se estiver trabalhando com os desafios baseados em passos, consulte a seção [Trabalho com projetos práticos](how-to-work-on-practice-projects.md).
There are a few helper scripts that can be used to manage the challenges in a block. Note that these commands should all be run in the block directory. For example:
Existem alguns scripts auxiliares que podem ser usados para gerenciar os desafios em um bloco. Observe que todos esses comandos devem ser executados no diretório do bloco. Por exemplo:
```bash
cd curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting
@@ -537,33 +537,33 @@ cd curriculum/challenges/english/02-javascript-algorithms-and-data-structures/ba
### Adicionar um novo desafio
To add a new challenge at the end of a block, call the script:
Para adicionar um novo desafio no final de um bloco, chame o script:
```bash
pnpm run create-next-challenge
```
This will prompt you for the challenge information and create the challenge file, updating the `meta.json` file with the new challenge information.
Ele solicitará a informação do desafio e criará o arquivo de desafio, atualizando o arquivo `meta.json` com as novas informações de desafio.
### Excluir um desafio
To delete a challenge, call the script:
Para excluir um desafio, chame o script:
```bash
pnpm run delete-challenge
```
This will prompt you to select which challenge should be deleted, then delete the file and update the `meta.json` file to remove the challenge from the order.
Ele solicitará que você selecione qual desafio deve ser excluído. Em seguida, excluirá o arquivo e atualizará o arquivo `meta.json` para remover o desafio da ordem.
### Inserir um desafio
To insert a challenge before an existing challenge, call the script:
Para inserir um desafio antes de um desafio existente, chame o script:
```bash
pnpm run insert-challenge
```
This will prompt you for the challenge information, then for the challenge to insert before. For example, if your choices are:
Ele solicitará a informação do desafio e, em seguida, o desafio será inserido antes do desafio informado. Por exemplo, se suas escolhas forem:
```bash
a
@@ -571,7 +571,7 @@ b
c
```
If you choose `b`, your new order will be:
Se você escolher `b`, a nova ordem será:
```bash
a
@@ -582,26 +582,26 @@ c
### Atualizar a ordem dos desafios
If you need to manually re-order the challenges, call the script:
Se você precisar reordenar manualmente os desafios, chame o script:
```bash
pnpm run update-challenge-order
```
This will take you through an interactive process to select the order of the challenges.
Ele vai orientá-lo através de um processo interativo para selecionar a ordem dos desafios.
## Solução de problemas
### Loop infinito detectado
If you see the following error in the console while previewing a challenge:
Se você ver o seguinte erro no console ao pré-visualizar um desafio:
```text
Potential infinite loop detected on line <number>...
```
This means that the loop-protect plugin has found a long-running loop or recursive function. If your challenge needs to do that (e.g. it contains an event loop that is supposed to run indefinitely), then you can prevent the plugin from being used in the preview. To do so, add `disableLoopProtectPreview: true` to the block's `meta.json` file.
Isso significa que o plug-in de proteção de loops encontrou um loop de longa duração ou uma função recursiva. Se o desafio precisar fazer isso (por exemplo, contém um loop de eventos que deve ser executado indefinidamente), então você pode impedir que o plug-in seja usado na visualização. Para fazer isso, adicione `disableLoopProtectPreview: true` ao arquivo `meta.json` do bloco.
If your tests are computationally intensive, then you may see this error when they run. If this happens then you can add `disableLoopProtectTests: true` to the block's `meta.json` file.
Se os testes demandam muitos cálculos, você poderá ver esse erro quando eles forem executados. Se isso acontecer, adicione `disableLoopProtectPreview: true` ao arquivo `meta.json` do bloco.
It's not typically necessary to have both set to true, so only set them as needed.
Normalmente, não é necessário ter os dois definidos como true, Defina-os, apenas, conforme necessário.
+7 -6
View File
@@ -16,18 +16,19 @@
- [Робота над мобільним застосунком](how-to-setup-freecodecamp-mobile-app-locally.md)
- [Робота над матеріалами з CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md)
- [Робота над локалізованим вебзастосунком](how-to-work-on-localized-client-webapp.md)
- [Робота над тестами Cypress](how-to-add-cypress-tests.md)
- [Work on Playwright Tests](how-to-add-playwright-tests.md)
- [Робота над відеозавданнями](how-to-help-with-video-challenges.md)
- [Робота над документацією](how-to-work-on-the-docs-theme.md)
- [Відкриття запиту на злиття](how-to-open-a-pull-request.md)
- **Додаткові інструкції**
- [Структура файлів навчальної програми](curriculum-file-structure.md)
- [Налагодження вихідних е-листів локально](how-to-catch-outgoing-emails-locally.md)
- [Налаштування freeCodeCamp на Windows (WSL)](how-to-setup-wsl.md)
- [Використання Docker на Windows Home](how-to-use-docker-on-windows-home.md)
- [Робочий процес токенів користувача](user-token-workflow.md)
- [Розв’язання проблем розробки](troubleshooting-development-issues.md)
- [Керівництво з аналітики](authors-analytics-manual.md)
- [Work on Cypress Tests](how-to-add-cypress-tests.md)
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
- [Use Docker on Windows Home](how-to-use-docker-on-windows-home.md)
- [User Token Workflow](user-token-workflow.md)
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
- [Authors Analytics Manual](authors-analytics-manual.md)
---
@@ -278,12 +278,12 @@ pnpm run develop
Короткий довідник команд, які знадобляться при локальній роботі.
| команда | опис |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `pnpm install` | Встановлює/перевстановлює всі залежності та запускає різні служби. |
| `pnpm run seed` | Creates authorized test users and inserts them into MongoDB. Also runs `seed:exams` and `seed:surveys` below. |
| `pnpm run seed:certified-user` | Створює автоматизованих тестових користувачів, які завершили сертифікації, і розміщує їх у MongoDB. |
| `pnpm run seed:exams` | Створює екзамени та вставляє їх в MongoDB. |
| `pnpm run seed:surveys` | Creates surveys for defaults users and inserts them into MongoDB. |
| `pnpm run develop` | Starts the freeCodeCamp API Server and Client Applications. |
| `pnpm run clean` | Uninstalls all dependencies and cleans up caches. |
| команда | опис |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `pnpm install` | Встановлює/перевстановлює всі залежності та запускає різні служби. |
| `pnpm run seed` | Створює авторизованих тестових користувачів і розміщує їх в MongoDB. Також виконує `seed:exams` та `seed:surveys` нижче. |
| `pnpm run seed:certified-user` | Створює автоматизованих тестових користувачів, які завершили сертифікації, і розміщує їх у MongoDB. |
| `pnpm run seed:exams` | Створює екзамени та вставляє їх в MongoDB. |
| `pnpm run seed:surveys` | Створює опитування для користувачів за замовчуванням та розміщує їх в MongoDB. |
| `pnpm run develop` | Запускає сервер API та клієнтські програми freeCodeCamp. |
| `pnpm run clean` | Видаляє всі залежності й очищає кеш. |
+38 -38
View File
@@ -10,7 +10,7 @@
## Активуйте WSL
Follow the instructions on the [official documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10) to install WSL2.
Дотримуйтесь інструкцій з [офіційної документації](https://docs.microsoft.com/en-us/windows/wsl/install-win10), щоб встановити WSL2.
## Встановіть Ubuntu
@@ -20,7 +20,7 @@ Follow the instructions on the [official documentation](https://docs.microsoft.c
>
> Ви можете використовувати інші дистрибутиви, основою яких не є Debian, але у них наявні певні недоліки та вони виходять за рамки цього посібника.
As of November 2023, Ubuntu and Debian are the only Linux distributions [officially supported by Playwright](https://playwright.dev/docs/intro#system-requirements), the end-to-end testing library used by freeCodeCamp.
Станом на листопад 2023 року, Ubuntu та Debian є єдиними дистрибутивами Linux, [офіційно підтримуваними Playwright](https://playwright.dev/docs/intro#system-requirements) — наскрізною тестовою бібліотекою, яку використовує freeCodeCamp.
2. Оновіть залежності ОС
@@ -72,9 +72,9 @@ git version 2.25.1
Як тільки ви налаштували Docker Desktop для роботи з WSL2, дотримуйтесь цих кроків, щоб запустити службу MongoDB:
1. Launch a new Ubuntu terminal
1. Запустіть новий термінал Ubuntu
2. Pull MongoDB from Docker Hub. Please refer to the [Prerequisites](how-to-setup-freecodecamp-locally.md#Prerequisites) table for the current version of MongoDB used by freeCodeCamp. For example, if the version number is `5.0.x`, replace `<x.y>` with `5.0` in the following two code snippets.
2. Витягніть MongoDB із Docker Hub. Будь ласка, зверніться до таблиці з [передумовами](how-to-setup-freecodecamp-locally.md#Prerequisites) поточної версії MongoDB, яку використовує freeCodeCamp. Наприклад, якщо номером версії є `5.0.x`, замініть `<x.y>` на `5.0` у двох наступних фрагментах коду.
```bash
docker pull mongo:<x.y>
@@ -97,15 +97,15 @@ git version 2.25.1
Ми рекомендуємо встановити випуск LTS для Node.js за допомогою Node Version Manager ([nvm](https://github.com/nvm-sh/nvm#installing-and-updating)).
Once installed use this command to install and use the latest Node.js LTS version:
Як тільки його буде встановлено, використайте цю команду, щоб встановити та використовувати найновішу версію LTS Node.js:
```bash
nvm install --lts
```
For instructions on installing and using a different version of Node.js, please refer to the [nvm docs](https://github.com/nvm-sh/nvm#usage).
Для інструкцій з встановлення та використання іншої версії Node.js, будь ласка, зверніться до [документації nvm](https://github.com/nvm-sh/nvm#usage).
Node.js comes bundled with `npm`, which you can use to install `pnpm`:
Node.js надходить разом з `npm`, який можна використати для встановлення `pnpm`:
```bash
npm install -g pnpm
@@ -113,110 +113,110 @@ npm install -g pnpm
## Налаштуйте freeCodeCamp локально
Now that you have installed the pre-requisites, follow [our local setup guide](how-to-setup-freecodecamp-locally.md) to clone, install and set up freeCodeCamp locally on your machine.
Ви встановили передумови, тому дотримуйтесь [нашого посібника з локального налаштування](how-to-setup-freecodecamp-locally.md), щоб клонувати, встановити та налаштувати freeCodeCamp локально на своїй машині.
> [!WARNING]
>
> Зауважте, що наразі налаштування тестів Cypress (та пов’язаних потреб GUI) знаходяться в стадії розробки. Ви повинні вміти працювати над більшою частиною кодової бази.
## Optimize Windows and WSL
## Оптимізуйте Windows та WSL
> [!NOTE]
>
> The following tips were collected from across the web and have not gone through vigorous testing. Your mileage may vary.
> Наступні поради були зібрані з різних джерел і не пройшли високоякісне тестування. Ваш результат може відрізнятися.
### Adjust processer scheduling for background services
### Налаштування розкладу процесора для фонових служб
This may reduce incidents of Docker containers crashing due to lack of resources.
Це може знизити випадки збоїв контейнерів Docker через брак ресурсів.
Open the System Properties control panel by pressing <kbd>Win + R</kbd> and entering `sysdm.cpl`
Відкрийте панель керування системними налаштуваннями, натиснувши <kbd>Win + R</kbd> та ввівши `sysdm.cpl`
<details>
<summary>
Enter <code>sysdm.cpl</code> in the Run dialog (screenshot)
Введіть <code>sysdm.cpl</code> у вікні діалогу (знімок екрану)
</summary>
<br>
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/run-sysdm.png" alt="Enter `sysdm.cpl` in the Run dialog" />
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/run-sysdm.png" alt="Введіть `sysdm.cpl` у вікні діалогу" />
</details>
<br>
Go to Advanced -> Performance -> Settings…
Перейдіть до Advanced -> Performance -> Settings…
<details>
<summary>
Performance Settings button under Advanced tab in System Properties (screenshot)
Кнопка Performance Settings розташована під вкладкою Advanced в System Properties (знімок екрану)
</summary>
<br>
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/advanced-performance-settings.png" alt="Performance Settings button under Advanced tab in System Properties" />
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/advanced-performance-settings.png" alt="Кнопка Performance Settings розташована під вкладкою Advanced в System Properties" />
</details>
<br>
Under Advanced -> Processor scheduling, choose "Background services". Do not close the window. Continue to the next tip.
Під Advanced -> Processor scheduling, виберіть Background services. Не закривайте вікно. Перейдіть до наступної поради.
<details>
<summary>
Background services radio button under Advanced tab in Performance Options (screenshot)
Радіокнопка Background services розташована під вкладкою Advanced в Performance Options (знімок екрана)
</summary>
<br>
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/background-services.png" alt="Background services radio button under Advanced tab in Performance Options" />
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/background-services.png" alt="Радіокнопка Background services розташована під вкладкою Advanced в Performance Options" />
</details>
### Increase the size of Windows paging file for the system drive
### Збільшення розміру файлу сторінки Windows для системного диска
Under Advanced -> Virtual memory, click "Change…"
Під Advanced -> Virtual memory, натисніть Change…
<details>
<summary>
Change virtual memory button under Advanced tab in Performance Options (screenshot)
Кнопка Change virtual memory розташована під вкладкою Advanced в Performance Options (знімок екрану)
</summary>
<br>
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/advanced-virtual-memory.png" alt="Change virtual memory button under Advanced tab in Performance Options" />
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/advanced-virtual-memory.png" alt="Кнопка Change virtual memory розташована під вкладкою Advanced в Performance Options" />
</details>
<br>
Choose "Custom size". Set the initial size to 1.5x and the maximum size to 3x of your physical memory. Then click "Set".
Виберіть Custom size. Встановіть початковий розмір на 1.5x та максимальний розмір на 3x від фізичної пам’яті. Потім натисніть Set.
<details>
<summary>
Set custom size button in Virtual Memory window (screenshot)
Налаштування кнопки розміру у вікні Virtual Memory (знімок екрану)
</summary>
<br>
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/set-custom-size.png" alt="Set custom size button in Virtual Memory window" />
<img src="https://raw.githubusercontent.com/freeCodeCamp/freeCodeCamp/main/docs/images/wsl/set-custom-size.png" alt="Налаштування кнопки розміру у вікні Virtual Memory" />
</details>
### Increase the size of memory allocated to WSL
### Збільшення обсягу пам’яті, виділеної для WSL
Create a [`.wslconfig` file](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig) in your [`%UserProfile%` directory](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig) (typically `C:\Users\<UserName>\.wslconfig`). Please read the [WSL documentation](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig) carefully and replace `x` with values that suit your own needs:
Створіть файл [`.wslconfig`](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig) у своєму каталозі [`%UserProfile%`](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig) (зазвичай `C:\Users\<UserName>\.wslconfig`). Будь ласка, уважно прочитайте [документацію WSL](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig) та замініть `x` на потрібні значення:
```ini
# Settings apply across all Linux distros running on WSL 2
# Налаштування застосовуються до всіх дистрибутивів Linux, які працюють на WSL 2
[wsl2]
# How much memory to assign to the WSL 2 VM. The default value might not be enough
# Кількість пам’яті, що призначається для віртуальної машини WSL 2. Значення за замовчуванням може бути недостатньо
memory=xGB
# How much swap space to add to the WSL 2 VM, default is 25% of available RAM
# На скільки збільшити swap-простір в WSL 2 VM; за замовчуванням це 25% від доступної оперативної пам’яті
swap=xGB
```
### Increase Node.js max old space size
### Збільшення максимального розміру старого простору Node.js
This fixes the ["JavaScript heap out of memory" error](https://stackoverflow.com/a/54456814) with ESLint. Add the following to your `~/.bashrc` or `~/.zshrc`:
Це виправляє помилку [«JavaScript heap out of memory»](https://stackoverflow.com/a/54456814) з ESLint. Додайте наступне до `~/.bashrc` або `~/.zshrc`:
```sh
export NODE_OPTIONS="--max-old-space-size=4096"
```
### Avoid `pnpm run test`
### Уникайте `pnpm run test`
Instead, use the script [appropriate to your PR](https://forum.freecodecamp.org/t/wsl-performance-issues-while-working-on-the-codebase/644215/2#:~:text=usually%2C%20you%20just%20want%20to%20test%20something%20specific%20to%20either%20the%20curriculum%20or%20the%20client%20or%20the%20api%20-%20almost%20never%20all%203.); either `pnpm run test:api`, `pnpm run test:curriculum`, or `pnpm run test-client`.
Натомість використайте скрипт, [який відповідає вашому PR](https://forum.freecodecamp.org/t/wsl-performance-issues-while-working-on-the-codebase/644215/2#:~:text=usually%2C%20you%20just%20want%20to%20test%20something%20specific%20to%20either%20the%20curriculum%20or%20the%20client%20or%20the%20api%20-%20almost%20never%20all%203.): `pnpm run test:api`, `pnpm run test:curriculum` або `pnpm run test-client`.
## Useful Links
## Корисні посилання
- [A WSL2 Dev Setup with Ubuntu 20.04, Node.js, MongoDB, VS Code, and Docker](https://hn.mrugesh.dev/wsl2-dev-setup-with-ubuntu-nodejs-mongodb-and-docker) — стаття Мругеша Мохапатри (штатний розробник freeCodeCamp.org)
- Часті питання:
@@ -232,17 +232,17 @@ title: Challenge Title
Надавайте перевагу коротким абзацам (1-4 речення). Найімовірніше, люди прочитають декілька коротких абзаців, а не суцільний текст.
Use american english, e.g., use `labeled` instead of `labelled`.
Використовуйте американську англійську. Наприклад, `labeled` замість `labelled`.
Challenge text should use the second person ("you") to help to give it a conversational tone. This way the text and instructions seem to speak directly to the camper working through the challenge. Try to avoid using the first person ("I", "we", "let's", and "us").
У тексті завдання потрібно використовувати 2-гу особу множини («ви»). У такий спосіб текст та інструкції будуть звернені напряму до учня, який виконує завдання. Намагайтеся уникати звертань у 1-й особі, як-от «я», «ми», «нам».
Don't use outbound links. These interrupt the flow. Campers should never have to google anything during these challenges. If there are resources you think campers would benefit from, add them to the challenge's Guide-related article.
Не використовуйте зовнішні посилання. Вони переривають робочий процес. Учні не повинні використовувати гугл під час виконання завдань. Якщо є ресурси, які, на вашу думку, допоможуть учням, додайте їх до статті, пов’язаної з керівництвом до завдання.
You can add diagrams if necessary.
В разі потреби можна додати діаграми.
Don't use emojis or emoticons in challenges. freeCodeCamp has a global community, and the cultural meaning of an emoji or emoticon may be different around the world. Also, emojis can render differently on different systems.
Не використовуйте емоджі в завданнях. freeCodeCamp — глобальна спільнота, а значення емоджі може відрізнятись в різних частинах світу. Крім цього, емоджі можуть по-різному зображатися у різних системах.
Proper nouns should use correct capitalization when possible. Below is a list of words as they should appear in the challenges.
Власні іменники потрібно писати з великої літери, коли це можливо. Нижче поданий список, у якому показано, як повинні писатись слова в завданнях.
- JavaScript (великі літери «J» і «S», без скорочень)
- Node.js
@@ -250,28 +250,28 @@ Proper nouns should use correct capitalization when possible. Below is a list of
### Правило двох хвилин
Each challenge should be solvable within 120 seconds by a native English speaker who has completed the challenges leading up to it. This includes the amount of time it takes to read the directions/instructions understand the seeded code, write their code and get all the tests to pass.
Кожне завдання повинне бути вирішене протягом 120 секунд носієм англійської мови, який виконав попередні завдання. У цей час входять прочитання вказівок/інструкцій для розуміння початкового коду, написання власного коду і проходження всіх тестів.
If it takes longer than two minutes to complete the challenge, you have two options:
Якщо виконання завдання займає більше двох хвилин, у вас є два шляхи:
- Спростіть завдання, або
- Розділіть завдання на два кроки.
The 2-minute rule forces you, the challenge designer, to make your directions concise, your seed code clear, and your tests straightforward.
Завдяки правилу двох хвилин ви зробите лаконічні вказівки, зрозумілий початковий код та прості тести.
We track how long it takes for campers to solve challenges and use this information to identify challenges that need to be simplified or split.
Ми відстежуємо скільки часу займає розв’язок завдань та використовуємо цю інформацію, щоб виявити завдання, які потрібно спростити чи розділити.
### Модульність
Each challenge should teach exactly one concept, and that concept should be apparent from the challenge's name.
Кожне завдання повинне навчати лише одному поняттю, і це поняття повинне бути очевидним з назви завдання.
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.
Ми можемо закріпити раніше вивчені поняття за допомогою повторення та варіацій. Наприклад, ознайомити користувача з елементами h1 в одному завданні, а пізніше з елементами h3.
Our goal is to have thousands of 2-minute challenges. These can flow together and reiterate previously-covered concepts.
Наша мета — розробити тисячі двохвилинних завдань. Вони можуть йти нарівні, а також нагадувати про раніше вивчені поняття.
### Форматування тексту завдання
Here are specific formatting guidelines for challenge text and examples:
Тут подано конкретні рекомендації щодо форматування тексту завдання та приклади:
- Ключові слова мови знаходяться у зворотних лапках `` \` ``. Наприклад, назви тегів HTML чи назви властивостей CSS.
- Посилання на частини коду (тобто назви функцій, методів чи змінних) потрібно брати у зворотні лапки `` \ ` ``. Розгляньте приклад нижче:
@@ -284,9 +284,9 @@ Here are specific formatting guidelines for challenge text and examples:
- Перед блоками багаторядкового коду **має бути порожній рядок**. Наступний рядок повинен починатись з трьох зворотних лапок, після яких йде одна з [підтримуваних мов](https://prismjs.com/#supported-languages). Щоб закінчити блок коду, потрібно почати новий рядок, який має лише три зворотні лапки та **ще один порожній рядок**. Розгляньте приклад нижче:
- Пробіл має значення у markdown, тому ми рекомендуємо зробити його видимим у редакторі.
**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.
**Примітка:** якщо ви збираєтесь використовувати код прикладу в YAML, використовуйте `yaml` замість `yml` для мови справа від зворотних лапок.
The following is an example of code:
Нижче поданий приклад коду:
````md
```{language}
@@ -308,7 +308,7 @@ The following is an example of code:
Наша мета — пояснити поняття, описане в завданні, та перевірити, що його зрозуміли.
Тести завдань можуть використовувати бібліотеки Node.js та Chai.js. Якщо необхідно, у змінній `code` можна отримати доступ до коду, створеного користувачами. Крім того, об’єкт `__helpers` надає декілька функцій, які полегшують процес написання тестів. The available functions are defined in the [curriculum-helpers](https://github.com/freeCodeCamp/curriculum-helpers/blob/main/lib/index.ts) repo.
Тести завдань можуть використовувати бібліотеки Node.js та Chai.js. Якщо необхідно, у змінній `code` можна отримати доступ до коду, створеного користувачами. Крім того, об’єкт `__helpers` надає декілька функцій, які полегшують процес написання тестів. Доступні функції визначені в [curriculum-helpers](https://github.com/freeCodeCamp/curriculum-helpers/blob/main/lib/index.ts).
## Форматування вихідного коду
@@ -330,13 +330,13 @@ The following is an example of code:
// Змініть код під цим рядком
````
Example of a valid CSS comment:
Приклад дійсного коментаря 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.
Якщо завдання має лише одне місце, де потрібно змінити код, будь ласка, використайте коментарі з наступного прикладу, щоб проінформувати користувача, де потрібно внести зміни.
```js
var a = 3;
@@ -349,7 +349,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)
Якщо завдання має декілька місць, де користувач повинен змінити код (наприклад, завдання з React)
```jsx
class MyComponent extends React.Component {
@@ -382,9 +382,9 @@ class MyComponent extends React.Component {
### Переклад коментарів початкового коду
There are separate comment dictionaries for each language. The [English version of the comment dictionary](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/dictionaries/english/comments.json) 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.json`. 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.
Існують окремі словники з коментарями для кожної мови. [Англійська версія словника з коментарями](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/dictionaries/english/comments.json) є основою для перекладів іншомовних версій файлів. Китайська версія словника з коментарями буде розташована на `/curriculum/dictionaries/chinese/comments.json`. Кожен словник складається з масиву об’єктів з унікальною властивістю `id` та властивістю `text`. Щоб охопити переклад англійського коментаря, потрібно змінювати лише `text`.
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.
Деякі коментарі можуть містити слова чи фрази, які не потрібно перекладати. Наприклад, назви змінних або власні назви бібліотек (як-от «React») не потрібно перекладати. Розгляньте приклад нижче. Слово `myGlobal` не потрібно перекладати.
```text
Оголосіть змінну myGlobal під цим рядком
@@ -396,13 +396,13 @@ Some comments may contain a word/phrase that should not be translated. For examp
## Підказки та розв’язки
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.
Кожне завдання має кнопку `Get a Hint` для того, щоб користувач отримав доступ до будь-яких підказок/розв’язків, які були створені для цього завдання. Підказки та розв’язки навчальної програми розташовані на [нашому форумі](https://forum.freecodecamp.org/c/guide) у категорії `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.
Якщо ви виявили помилку в наявних підказках чи розв’язках, повідомте про це на форумі [у розділі «Contributors»](https://forum.freecodecamp.org/c/contributors). Модератори й користувачі з 3-м рівнем довіри розглянуть коментарі та приймуть рішення щодо наданих вами змін.
### Додавання нових тем для підказок чи розв’язків завдань
Take the following steps when adding a new challenge hints/solutions-related topic.
Виконайте наступні кроки, щоб додати нову тему для підказок чи розв’язків завдань.
1. Розпочніть з тих самих кроків для створення нової теми, але зверніть увагу на наступні щодо заголовка.
2. Заголовок теми повинен починатись з `freeCodeCamp Challenge Guide:`, з’єднаного з назвою завдання навчальної програми. Наприклад, якщо завдання має назву `Chunky Monkey`, заголовком теми буде `freeCodeCamp Challenge Guide: Chunky Monkey`.
@@ -411,7 +411,7 @@ Take the following steps when adding a new challenge hints/solutions-related top
### Вказівки щодо змісту тем підказок і розв’язків
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:
Пропонуючи розв’язок до теми завдання навчальної програми, потрібно додати повний код. Сюди входить весь вихідний код та будь-які зміни, необхідні для проходження тестів. Використовуйте цей шаблон для створення нових тем підказок/розв’язків:
````md
# Тут назва завдання
@@ -498,35 +498,35 @@ FCC_SUPERBLOCK='responsive-web-design' pnpm run test: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. Виконайте цю команду для кожного файлу завдання, до якого ви внесли зміни (замінивши `challenge-title-goes-here` на повну назву завдання):
```
pnpm run test -- -g challenge-title-goes-here
```
> [!TIP]
> You can set the environment variable `LOCALE` in the `.env` to the language of the challenge(s) you need to test.
> Ви можете встановити змінну середовища `LOCALE` у `.env` на мову завдань, які потрібно протестувати.
>
> The currently accepted values are `english` and `chinese`, with `english` being set by default.
> Наразі прийнятними значеннями є `english` та `chinese` (`english` за замовчуванням).
## Proposing a Pull Request (PR)
## Відкриття запиту на злиття (PR)
After you've committed your changes, check here for [how to open a Pull Request](how-to-open-a-pull-request.md).
Як тільки ви затвердили свої зміни, див. [як відкрити запит на злиття](how-to-open-a-pull-request.md).
## Useful Links
## Корисні посилання
Creating and Editing Challenges:
Створення та редагування завдань:
1. [Challenge types](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challenge-types.js#L1-L13) - what the numeric challenge type values mean (enum).
1. [Види завдань](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/utils/challenge-types.js#L1-L13) — що означають числові значення завдань (перелік).
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. [Внесок до FreeCodeCamp: написання тестів до завдань ES6](https://www.youtube.com/watch?v=iOdD84OSfAE#t=2h49m55s) — відео [Ітана Арровуда](https://twitter.com/ArrowoodTech) про його внесок до старої версії навчальної програми.
## Helper Scripts
## Допоміжні скрипти
> [!NOTE]
> If you are working with the step-based challenges, refer to the [Work on Practice Projects](how-to-work-on-practice-projects.md) section.
> Якщо ви працюєте над покроковими завданнями, див. розділ щодо [роботи над практичними проєктами](how-to-work-on-practice-projects.md).
There are a few helper scripts that can be used to manage the challenges in a block. Note that these commands should all be run in the block directory. For example:
Існує декілька допоміжних скриптів, які можна використовувати для завдань у блоці. Зверніть увагу, що ці команди потрібно виконувати у каталозі блоків. Наприклад:
```bash
cd curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting
@@ -534,33 +534,33 @@ cd curriculum/challenges/english/02-javascript-algorithms-and-data-structures/ba
### Додати нове завдання
To add a new challenge at the end of a block, call the script:
Щоб додати нове завдання в кінці блоку, викличте скрипт:
```bash
pnpm run create-next-challenge
```
This will prompt you for the challenge information and create the challenge file, updating the `meta.json` file with the new challenge information.
Це допоможе отримати інформацію про завдання та створити файл з завданням, оновивши файл `meta.json` новою інформацією про завдання.
### Видалити завдання
To delete a challenge, call the script:
Щоб видалити завдання, викличте скрипт:
```bash
pnpm run delete-challenge
```
This will prompt you to select which challenge should be deleted, then delete the file and update the `meta.json` file to remove the challenge from the order.
Це допоможе обрати потрібне завдання, видалити файл та оновити файл `meta.json`, щоб видалити завдання з порядку.
### Вставити завдання
To insert a challenge before an existing challenge, call the script:
Щоб вставити завдання перед наявним завданням, викличте скрипт:
```bash
pnpm run insert-challenge
```
This will prompt you for the challenge information, then for the challenge to insert before. For example, if your choices are:
Це допоможе отримати інформацію про нове завдання, а також про наявне завдання. Наприклад, якщо варіанти такі:
```bash
a
@@ -568,7 +568,7 @@ b
c
```
If you choose `b`, your new order will be:
Якщо оберете `b`, то новим порядком буде:
```bash
a
@@ -579,26 +579,26 @@ c
### Оновити порядок завдань
If you need to manually re-order the challenges, call the script:
Якщо вам потрібно змінити порядок завдань вручну, викличте скрипт:
```bash
pnpm run update-challenge-order
```
This will take you through an interactive process to select the order of the challenges.
Він проведе вас через інтерактивний процес, який допоможе впорядкувати завдання.
## Розв’язання проблем розробки
### Виявлено нескінченний цикл
If you see the following error in the console while previewing a challenge:
Якщо ви бачите цю помилку в консолі під час попереднього перегляду завдання:
```text
Potential infinite loop detected on line <number>...
```
This means that the loop-protect plugin has found a long-running loop or recursive function. If your challenge needs to do that (e.g. it contains an event loop that is supposed to run indefinitely), then you can prevent the plugin from being used in the preview. To do so, add `disableLoopProtectPreview: true` to the block's `meta.json` file.
Це означає, що плагін для захисту циклу знайшов довгий цикл або рекурсивну функцію. Якщо ваше завдання передбачає їх (тобто містить нескінченний цикл), ви можете запобігти використанню плагіну в попередньому перегляді. Для цього додайте `disableLoopProtectPreview: true` до файлу блоку `meta.json`.
If your tests are computationally intensive, then you may see this error when they run. If this happens then you can add `disableLoopProtectTests: true` to the block's `meta.json` file.
Якщо ваші тести інтенсивно обчислюються, ви можете побачити цю помилку під час запуску. Якщо це відбувається, додайте `disableLoopProtectTests: true` до файлу блоку `meta.json`.
It's not typically necessary to have both set to true, so only set them as needed.
Значенням обох необов’язково має бути true, тому налаштовуйте їх лише за потреби.