diff --git a/docs/i18n/chinese/devops.md b/docs/i18n/chinese/devops.md index 193b67adba..782422a47d 100644 --- a/docs/i18n/chinese/devops.md +++ b/docs/i18n/chinese/devops.md @@ -432,7 +432,7 @@ Provisioning VMs with the Code 2. Update `npm` and install PM2 and setup `logrotate` and startup on boot ```console - npm i -g npm@6 + npm i -g npm@8 npm i -g pm2 pm2 install pm2-logrotate pm2 startup @@ -794,7 +794,7 @@ nvm ls Install the latest Node.js LTS, and reinstall any global packages ```console -nvm install 'lts/*' --reinstall-packages-from=default +nvm install --lts --reinstall-packages-from=default ``` Verify installed packages @@ -803,10 +803,10 @@ Verify installed packages npm ls -g --depth=0 ``` -Alias the `default` Node.js version to the current LTS +Alias the `default` Node.js version to the current LTS (pinned to latest major version) ```console -nvm alias default lts/* +nvm alias default 16 ``` (Optional) Uninstall old versions @@ -815,7 +815,21 @@ nvm alias default lts/* nvm uninstall ``` -> [!WARNING] If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. +> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. +> +> If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. + +Get the uninstall instructions/commands with the `unstartup` command and use the output to remove the systemctl services + +```console +pm2 unstartup +``` + +Get the install instructions/commands with the `startup` command and use the output to add the systemctl services + +```console +pm2 startup +``` Quick commands for PM2 to list, resurrect saved processes, etc. @@ -835,8 +849,6 @@ pm2 save pm2 logs ``` -> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. - ## Installing and Updating Azure Pipeline Agents See: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops and follow the instructions to stop, remove and reinstall agents. Broadly you can follow the steps listed here. diff --git a/docs/i18n/chinese/how-to-work-on-coding-challenges.md b/docs/i18n/chinese/how-to-work-on-coding-challenges.md index af2cc43bef..af03d7fd4b 100644 --- a/docs/i18n/chinese/how-to-work-on-coding-challenges.md +++ b/docs/i18n/chinese/how-to-work-on-coding-challenges.md @@ -64,10 +64,13 @@ Tests to run against user code, in pairs of markdown text and code block test co Code for test one ``` -More instructions in markdown syntax +If you want dynamic output based on the user's code, --fcc-expected-- and --fcc-actual-- will be replaced with the expected and actual values of the test's assertion. Take care if you have multiple assertions since the first failing assertion will determine the values of --fcc-expected-- and --fcc-actual--. ```js -More code +assert.equal( + 'this will replace --fcc-actual--', + 'this will replace --fcc-expected--' +); ``` # --seed-- diff --git a/docs/i18n/espanol/devops.md b/docs/i18n/espanol/devops.md index 519d619b2c..387375b6ed 100644 --- a/docs/i18n/espanol/devops.md +++ b/docs/i18n/espanol/devops.md @@ -432,7 +432,7 @@ Aprovisionamiento de MVs con el código 2. Actualiza `npm`, instala PM2 y configura `logrotate` e inicio en arranque ```console - npm i -g npm@6 + npm i -g npm@8 npm i -g pm2 pm2 install pm2-logrotate pm2 startup @@ -794,7 +794,7 @@ nvm ls Instala la última versión de Node.js LTS y reinstala los paquetes globales ```console -nvm install 'lts/*' --reinstall-packages-from=default +nvm install --lts --reinstall-packages-from=default ``` Verifica los paquetes instalados @@ -803,10 +803,10 @@ Verifica los paquetes instalados npm ls -g --depth=0 ``` -Alias ​​de la versión `default` de Node.js del LTS actual +Alias the `default` Node.js version to the current LTS (pinned to latest major version) ```console -nvm alias default lts/* +nvm alias default 16 ``` (Opcional) Desinstala las versiones antiguas @@ -815,9 +815,23 @@ nvm alias default lts/* nvm uninstall ``` -> [!WARNING] Si utilizas PM2 para procesos, también deberás abrir las aplicaciones y guardar la lista de procesos para la recuperación automática en los reinicios. +> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. +> +> If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. -Comandos rápidos para que PM2 enumere, reviva procesos guardados, etc. +Get the uninstall instructions/commands with the `unstartup` command and use the output to remove the systemctl services + +```console +pm2 unstartup +``` + +Get the install instructions/commands with the `startup` command and use the output to add the systemctl services + +```console +pm2 startup +``` + +Quick commands for PM2 to list, resurrect saved processes, etc. ```console pm2 ls @@ -835,23 +849,21 @@ pm2 save pm2 logs ``` -> [!ATTENTION] Para las aplicaciones cliente, el script de shell no se puede resucitar entre las versiones de Node.js con `pm2 resurrect`. En su lugar, implementa procesos desde cero. Esto será mejor cuando pasemos a una configuración basada en Docker. - ## Instalando y actualizando los agentes de canalización de Azure -Consulta a: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops y sigue las instrucciones para detener, eliminar y reinstalar agentes. En términos generales, puedes seguir los pasos que se enumeran aquí. +See: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops and follow the instructions to stop, remove and reinstall agents. Broadly you can follow the steps listed here. -Necesitarás una PAT, que puedes obtener desde aquí: https://dev.azure.com/freeCodeCamp-org/_usersSettings/tokens +You would need a PAT, that you can grab from here: https://dev.azure.com/freeCodeCamp-org/_usersSettings/tokens ### Instalando los agentes en destinos de implementación -Navega a [Azure Devops](https://dev.azure.com/freeCodeCamp-org) y registra el agente desde cero en el requisito [deployment groups](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_machinegroup). +Navigate to [Azure Devops](https://dev.azure.com/freeCodeCamp-org) and register the agent from scratch in the requisite [deployment groups](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_machinegroup). -> [!NOTE] Debes ejecutar los scripts en el directorio de inicio y asegurarte de que no exista ningún otro directorio `azagent`. +> [!NOTE] You should run the scripts in the home directory, and make sure no other `azagent` directory exists. ### Actualizando los Agentes -Actualmente, los agentes de actualización requieren que se eliminen y se reconfiguren. Esto es necesario para que puedan tomar correctamente los valores de `PATH` y otras variables de entorno del sistema. Necesitamos hacer esto, por ejemplo, actualizando Node.js en nuestras MVs de destino de despliegue. +Currently updating agents requires them to be removed and reconfigured. This is required for them to correctly pick up `PATH` values and other system environment variables. We need to do this for instance updating Node.js on our deployment target VMs. 1. Navega y revisa el estado del servicio @@ -885,11 +897,11 @@ Actualmente, los agentes de actualización requieren que se eliminen y se reconf rm -rf ~/azagent ``` -Una vez que hayas completado los pasos de arriba, puedes repetir los mismos pasos que para instalar el agente. +Once You have completed the steps above, you can repeat the same steps as installing the agent. # Manual de piloto - Correo masivo -Usamos [ una herramienta CLI ](https://github.com/freecodecamp/sendgrid-email-blast) para enviar el boletín semanal. Para actualizar y comenzar el proceso: +We use [a CLI tool](https://github.com/freecodecamp/sendgrid-email-blast) to send out the weekly newsletter. To spin this up and begin the process: 1. Inicia sesión en DigitalOcean, e inicia nuevas droplets bajo el proyecto `Sendgrid`. Usa el snapshot de Ubuntu Sendgrid con la fecha más reciente. Esto viene precargado con la herramienta CLI y el script para obtener correos electrónicos desde la base de datos. Con el volumen actual, tres droplets son suficientes para enviar los correos electrónicos de manera oportuna. diff --git a/docs/i18n/espanol/how-to-work-on-coding-challenges.md b/docs/i18n/espanol/how-to-work-on-coding-challenges.md index 5e4d84c976..6e3cf6c840 100644 --- a/docs/i18n/espanol/how-to-work-on-coding-challenges.md +++ b/docs/i18n/espanol/how-to-work-on-coding-challenges.md @@ -68,10 +68,13 @@ Pruebas para ejecutar en el código del usuario, en pares de lenguaje de marcado Código para prueba uno ``` -Más instrucciones en la sintaxis de lenguaje de marcado +If you want dynamic output based on the user's code, --fcc-expected-- and --fcc-actual-- will be replaced with the expected and actual values of the test's assertion. Take care if you have multiple assertions since the first failing assertion will determine the values of --fcc-expected-- and --fcc-actual--. ```js -Más código +assert.equal( + 'this will replace --fcc-actual--', + 'this will replace --fcc-expected--' +); ``` # --seed-- diff --git a/docs/i18n/italian/devops.md b/docs/i18n/italian/devops.md index b4e686069d..0a4f1c65af 100644 --- a/docs/i18n/italian/devops.md +++ b/docs/i18n/italian/devops.md @@ -432,7 +432,7 @@ Fare il provisioning delle VM con il codice 2. Aggiorna `npm` e installa PM2 e fai il setup di `logrotate` e avvio all'accensione ```console - npm i -g npm@6 + npm i -g npm@8 npm i -g pm2 pm2 install pm2-logrotate pm2 startup @@ -794,7 +794,7 @@ nvm ls Installa l'ultima versione di Node.js LTC, e reinstalla i pacchetti globali ```console -nvm install 'lts/*' --reinstall-packages-from=default +nvm install --lts --reinstall-packages-from=default ``` Verifica i pacchetti installati @@ -803,10 +803,10 @@ Verifica i pacchetti installati npm ls -g --depth=0 ``` -Usa l'alias `default` della versione di Node.js all'attuale LTS +Alias the `default` Node.js version to the current LTS (pinned to latest major version) ```console -nvm alias default lts/* +nvm alias default 16 ``` (Facoltativo) Disinstalla vecchie versioni @@ -815,9 +815,23 @@ nvm alias default lts/* nvm uninstall ``` -> [!WARNING] Se usi PM2 per i processi avrai anche bisogno di vedere le applicazioni e salvare la lista dei processi per il recovery automatico al riavvio. +> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. +> +> If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. -Comandi veloci per PM2 per elencare, far ripartire processi salvati, ecc. +Get the uninstall instructions/commands with the `unstartup` command and use the output to remove the systemctl services + +```console +pm2 unstartup +``` + +Get the install instructions/commands with the `startup` command and use the output to add the systemctl services + +```console +pm2 startup +``` + +Quick commands for PM2 to list, resurrect saved processes, etc. ```console pm2 ls @@ -835,23 +849,21 @@ pm2 save pm2 logs ``` -> [!ATTENTION] Per applicazioni client, lo script della shell non può essere fatto risorgere tra versioni di Node.js con `pm2 resurrect`. Fai il deploy dei processi da zero. Questo dovrebbe migliorare quando useremo un setup basato su docker. - ## Installare e aggiornare Azure Pipeline Agent -Vedi: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops e segui le istruzioni per arrestare, rimuovere e reinstallare gli agenti. Approssimativamente puoi seguire gli step elencati qui. +See: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops and follow the instructions to stop, remove and reinstall agents. Broadly you can follow the steps listed here. -Avrai bisogno di un PAT, che puoi ottenere da: https://dev.azure.com/freeCodeCamp-org/_usersSettings/tokens +You would need a PAT, that you can grab from here: https://dev.azure.com/freeCodeCamp-org/_usersSettings/tokens ### Installare agenti su target di deployment -Vai su [Azure Devops](https://dev.azure.com/freeCodeCamp-org) e registra l'agente dall'inizio nei requisiti [deployment groups](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_machinegroup). +Navigate to [Azure Devops](https://dev.azure.com/freeCodeCamp-org) and register the agent from scratch in the requisite [deployment groups](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_machinegroup). -> [!NOTE] Dovresti eseguire gli script nella home directory, e assicurati che nessun'altra directory `azagent` esista. +> [!NOTE] You should run the scripts in the home directory, and make sure no other `azagent` directory exists. ### Aggiornare gli agent -Attualmente aggiornare gli agent richiede che siano rimossi e riconfigurati. Questo è richiesto perché possano ottenere valori `PATH` e altre variabili d'ambiente di sistema. Dobbiame farlo per aggiornare Node.js sulle VM target di deployment. +Currently updating agents requires them to be removed and reconfigured. This is required for them to correctly pick up `PATH` values and other system environment variables. We need to do this for instance updating Node.js on our deployment target VMs. 1. Naviga e controlla lo status del servizio @@ -885,11 +897,11 @@ Attualmente aggiornare gli agent richiede che siano rimossi e riconfigurati. Que rm -rf ~/azagent ``` -Una volta completati gli step precedenti potrai ripetere gli stesi passi per installare l'agente. +Once You have completed the steps above, you can repeat the same steps as installing the agent. # Manuale di volo - Email Blast -Usiamo uno [strumento CLI](https://github.com/freecodecamp/sendgrid-email-blast) per inviare la nostra newsletter settimanale. Per avviare e iniziare il processo: +We use [a CLI tool](https://github.com/freecodecamp/sendgrid-email-blast) to send out the weekly newsletter. To spin this up and begin the process: 1. Entra in DigitalOcean e avvia nuovi droplet sotto il progetto `Sendgrid`. Usa lo snapshot di Ubuntu Sendgrid con la data più recente. Questo viene pre-caricato con lo strumento CLI e lo script per ottenere le email dal database. Con il volume corrente, tre droplet sono sufficienti per mandare le email in un tempo decente. @@ -922,7 +934,7 @@ Usiamo uno [strumento CLI](https://github.com/freecodecamp/sendgrid-email-blast) ### Modifiche al tema -Utilizziamo un [tema](https://github.com/freeCodeCamp/news-theme) personalizzato per la nostra pubblicazione. L'aggiunta delle seguenti modifiche al tema consente l'aggiunta di nuove lingue. +We use a custom [theme](https://github.com/freeCodeCamp/news-theme) for our news publication. Adding the following changes to the theme enables the addition of new languages. 1. Include an `else if` statement for the new [ISO language code](https://www.loc.gov/standards/iso639-2/php/code_list.php) in [`setup-locale.js`](https://github.com/freeCodeCamp/news-theme/blob/main/assets/config/setup-locale.js) 2. Create an initial config folder by duplicating the [`assets/config/en`](https://github.com/freeCodeCamp/news-theme/tree/main/assets/config/en) folder and changing its name to the new language code. (`en` —> `es` for Spanish) diff --git a/docs/i18n/italian/how-to-work-on-coding-challenges.md b/docs/i18n/italian/how-to-work-on-coding-challenges.md index 4201e81cf6..c90988f549 100644 --- a/docs/i18n/italian/how-to-work-on-coding-challenges.md +++ b/docs/i18n/italian/how-to-work-on-coding-challenges.md @@ -64,10 +64,13 @@ I test da eseguire sul codice scritto dall'utente, in coppie di testo markdown e Codice per test uno ``` -Altre istruzioni in sintassi markdown +If you want dynamic output based on the user's code, --fcc-expected-- and --fcc-actual-- will be replaced with the expected and actual values of the test's assertion. Take care if you have multiple assertions since the first failing assertion will determine the values of --fcc-expected-- and --fcc-actual--. ```js -Altro codice +assert.equal( + 'this will replace --fcc-actual--', + 'this will replace --fcc-expected--' +); ``` # --seed-- diff --git a/docs/i18n/japanese/devops.md b/docs/i18n/japanese/devops.md index 193b67adba..782422a47d 100644 --- a/docs/i18n/japanese/devops.md +++ b/docs/i18n/japanese/devops.md @@ -432,7 +432,7 @@ Provisioning VMs with the Code 2. Update `npm` and install PM2 and setup `logrotate` and startup on boot ```console - npm i -g npm@6 + npm i -g npm@8 npm i -g pm2 pm2 install pm2-logrotate pm2 startup @@ -794,7 +794,7 @@ nvm ls Install the latest Node.js LTS, and reinstall any global packages ```console -nvm install 'lts/*' --reinstall-packages-from=default +nvm install --lts --reinstall-packages-from=default ``` Verify installed packages @@ -803,10 +803,10 @@ Verify installed packages npm ls -g --depth=0 ``` -Alias the `default` Node.js version to the current LTS +Alias the `default` Node.js version to the current LTS (pinned to latest major version) ```console -nvm alias default lts/* +nvm alias default 16 ``` (Optional) Uninstall old versions @@ -815,7 +815,21 @@ nvm alias default lts/* nvm uninstall ``` -> [!WARNING] If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. +> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. +> +> If using PM2 for processes you would also need to bring up the applications and save the process list for automatic recovery on restarts. + +Get the uninstall instructions/commands with the `unstartup` command and use the output to remove the systemctl services + +```console +pm2 unstartup +``` + +Get the install instructions/commands with the `startup` command and use the output to add the systemctl services + +```console +pm2 startup +``` Quick commands for PM2 to list, resurrect saved processes, etc. @@ -835,8 +849,6 @@ pm2 save pm2 logs ``` -> [!ATTENTION] For client applications, the shell script can't be resurrected between Node.js versions with `pm2 resurrect`. Deploy processes from scratch instead. This should become nicer when we move to a docker based setup. - ## Installing and Updating Azure Pipeline Agents See: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops and follow the instructions to stop, remove and reinstall agents. Broadly you can follow the steps listed here. diff --git a/docs/i18n/japanese/how-to-work-on-coding-challenges.md b/docs/i18n/japanese/how-to-work-on-coding-challenges.md index af2cc43bef..af03d7fd4b 100644 --- a/docs/i18n/japanese/how-to-work-on-coding-challenges.md +++ b/docs/i18n/japanese/how-to-work-on-coding-challenges.md @@ -64,10 +64,13 @@ Tests to run against user code, in pairs of markdown text and code block test co Code for test one ``` -More instructions in markdown syntax +If you want dynamic output based on the user's code, --fcc-expected-- and --fcc-actual-- will be replaced with the expected and actual values of the test's assertion. Take care if you have multiple assertions since the first failing assertion will determine the values of --fcc-expected-- and --fcc-actual--. ```js -More code +assert.equal( + 'this will replace --fcc-actual--', + 'this will replace --fcc-expected--' +); ``` # --seed-- diff --git a/docs/i18n/portuguese/devops.md b/docs/i18n/portuguese/devops.md index 3223b6125d..009dc74dda 100644 --- a/docs/i18n/portuguese/devops.md +++ b/docs/i18n/portuguese/devops.md @@ -432,7 +432,7 @@ Provisionando MVs com o código 2. Atualize o `npm` instale o PM2 e a configuração `logrotate` e inicie no boot ```console - npm i -g npm@6 + npm i -g npm@8 npm i -g pm2 pm2 install pm2-logrotate pm2 startup @@ -794,7 +794,7 @@ nvm ls Instale a versão LTS Node.js mais recente e reinstale qualquer pacote global ```console -nvm install 'lts/*' --reinstall-packages-from=default +nvm install --lts --reinstall-packages-from=default ``` Verifique os pacotes instalados @@ -803,10 +803,10 @@ Verifique os pacotes instalados npm ls -g --depth=0 ``` -Crie um alias da versão `default` do Node.js para a versão current LTS +Coloque um alias na versão `default` do Node.js para que seja a LTS atual (marcada como a versão major mais recente) ```console -nvm alias default lts/* +nvm alias default 16 ``` (Opcional) Desinstale versões antigas @@ -815,9 +815,23 @@ nvm alias default lts/* nvm uninstall ``` -> [!WARNING] Se estiver usando PM2 para os processos você também vai precisar executar as aplicações e salvar a lista de processos para restaurações automáticas quando reiniciar. +> [!ATTENTION] Para aplicações de client, o shell script não pode ser revivido entre versões do Node.js com `pm2 resurrect`. Implante processos de zero ao invés disso. Isso deve melhorar quando mudarmos para uma configuração baseada em docker. +> +> Se estiver usando PM2 para os processos você também vai precisar executar as aplicações e salvar a lista de processos para restaurações automáticas quando reiniciar. -Comandos rápidos PM2 para listar, reviver processos salvos, etc. +Obtenha as instruções/comandos de desinstalação com o comando `unstartup` e use a saída para remover os serviços systemctl + +```console +pm2 unstartup +``` + +Obtenha as instruções/comandos de instalação com o comando `startup` e use a saída para adicionar os serviços systemctl + +```console +pm2 startup +``` + +Comandos rápidos para PM2 para listar, reviver processos salvos etc. ```console pm2 ls @@ -835,11 +849,9 @@ pm2 save pm2 logs ``` -> [!ATTENTION] Para aplicações de client, o script de shell não pode ser revivido entre as versões do Node.js com `pm2 resurrect`. Implante processos de zero ao invés disso. Isso deve melhorar quando mudarmos para uma configuração baseada em docker. - ## Instalando e atualizando agentes do Azure Pipeline -Veja: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops e siga as instruções para parar, remover e reinstalar os agentes. Em resumo, você pode seguir as etapas listadas aqui. +Veja: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops e siga as instruções para parar, remover e reinstalar agentes. Em resumo, você pode seguir as etapas listadas aqui. Você vai precisar de um PAT, que você pode pegar nesse link: https://dev.azure.com/freeCodeCamp-org/_usersSettings/tokens @@ -847,7 +859,7 @@ Você vai precisar de um PAT, que você pode pegar nesse link: https://dev.azure Vá para [Azure Devops](https://dev.azure.com/freeCodeCamp-org) e registre o agente do zero nos [grupos de implantação](https://dev.azure.com/freeCodeCamp-org/freeCodeCamp/_machinegroup) necessários. -> [!NOTE] Você deve executar os scripts no diretório principal e garantir que nenhum outro diretório `azagent` existe. +> [!NOTE] Você deve executar os scripts no diretório raiz e certificar-se de que nenhum outro diretório `azagent` existe. ### Atualizando agentes @@ -918,19 +930,19 @@ Nós usamos [uma ferramenta de linha de comando](https://github.com/freecodecamp 7. Quando o disparo de email estiver completo, verifique se nenhum e-mail falhou antes de destruir os droplets. -# Flight Manual - Adding news instances for new languages +# Manual de Voo - adicionando instâncias de notícias aos novos idiomas ### Alterações nos temas Usamos um [tema personalizado](https://github.com/freeCodeCamp/news-theme) para nossa publicação de notícias. Adicionar as seguintes alterações ao tema permite a inserção de novos idiomas. -1. Include an `else if` statement for the new [ISO language code](https://www.loc.gov/standards/iso639-2/php/code_list.php) in [`setup-locale.js`](https://github.com/freeCodeCamp/news-theme/blob/main/assets/config/setup-locale.js) -2. Create an initial config folder by duplicating the [`assets/config/en`](https://github.com/freeCodeCamp/news-theme/tree/main/assets/config/en) folder and changing its name to the new language code. (`en` —> `es` for Spanish) -3. Inside the new language folder, change the variable names in `main.js` and `footer.js` to the relevant language short code (`enMain` —> `esMain` for Spanish) -4. Duplicate the [`locales/en.json`](https://github.com/freeCodeCamp/news-theme/blob/main/locales/en.json) and rename it to the new language code. -5. In [`partials/i18n.hbs`](https://github.com/freeCodeCamp/news-theme/blob/main/partials/i18n.hbs), add scripts for the newly created config files. -6. Add the related language `day.js` script from [cdnjs](https://cdnjs.com/libraries/dayjs/1.10.4) to the [freeCodeCamp CDN](https://github.com/freeCodeCamp/cdn/tree/main/build/news-assets/dayjs/1.10.4/locale) +1. Inclua a instrução `else if` para o novo [código de idioma ISO](https://www.loc.gov/standards/iso639-2/php/code_list.php) em [`setup-local.js`](https://github.com/freeCodeCamp/news-theme/blob/main/assets/config/setup-locale.js) +2. Crie uma pasta inicial de configuração duplicando a pasta [`assets/config/en`](https://github.com/freeCodeCamp/news-theme/tree/main/assets/config/en) e alterando seu nome para o novo código de idioma. (`en` —> `es` para espanhol) +3. Dentro da pasta do novo idioma, altere os nomes das variáveis no `main.js` e no `footer.js` para o código curto de idioma relevante (`enMain` —> `esMain` para o espanhol) +4. Duplique o [`locales/en.json`](https://github.com/freeCodeCamp/news-theme/blob/main/locales/en.json) e renomeie-o para o código do novo idioma. +5. Em [`partials/i18n.hbs`](https://github.com/freeCodeCamp/news-theme/blob/main/partials/i18n.hbs), adicione scripts para arquivos de configuração recém-criados. +6. Adicionar o script `day.js` do idioma relacionado [cdnjs](https://cdnjs.com/libraries/dayjs/1.10.4) ao [CDN do freeCodeCamp](https://github.com/freeCodeCamp/cdn/tree/main/build/news-assets/dayjs/1.10.4/locale) ### Alterações do painel do Ghost -Update the publication assets by going to the Ghost dashboard > settings > general and uploading the publications's [icon](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc-puck-500-favicon.png), [logo](https://github.com/freeCodeCamp/design-style-guide/blob/master/downloads/fcc_primary_large.png), and [cover](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc_ghost_publication_cover.png). +Atualize os itens de publicação indo no painel do Ghost > Settings > General e atualizando o [ícone](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc-puck-500-favicon.png), [logotipo](https://github.com/freeCodeCamp/design-style-guide/blob/master/downloads/fcc_primary_large.png) e a [capa](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc_ghost_publication_cover.png). diff --git a/docs/i18n/portuguese/how-to-work-on-coding-challenges.md b/docs/i18n/portuguese/how-to-work-on-coding-challenges.md index 229fdb42f6..841cd4893e 100644 --- a/docs/i18n/portuguese/how-to-work-on-coding-challenges.md +++ b/docs/i18n/portuguese/how-to-work-on-coding-challenges.md @@ -64,10 +64,13 @@ Testes para executar o código do usuário, em par com o markdown e bloco de có Código para o teste um ``` -Mais instruções em sintaxe markdown +If you want dynamic output based on the user's code, --fcc-expected-- and --fcc-actual-- will be replaced with the expected and actual values of the test's assertion. Take care if you have multiple assertions since the first failing assertion will determine the values of --fcc-expected-- and --fcc-actual--. ```js -Mais código +assert.equal( + 'isso substituirá --fcc-actual--', + 'isso substituirá --fcc-expected--' +); ``` # --seed--