mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore(i18n,docs): processed translations (#48946)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [User Token Workflow](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ To run tests against production builds, replace `dev` with `prd` below.
|
||||
- To run a single test:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- To create a development build, start the development server, and run all existing cypress end-to-end tests:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [User Token Workflow](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ To run tests against production builds, replace `dev` with `prd` below.
|
||||
- To run a single test:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- To create a development build, start the development server, and run all existing cypress end-to-end tests:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Configurar freeCodeCamp en Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [Flujo de trabajo del Token del usuario](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ Para ejecutar pruebas en las compilaciones de producción, reemplaza `dev` con `
|
||||
- Para ejecutar una sola prueba:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- Para crear una compilación de desarrollo, inicia el servidor de desarrollo y ejecuta todas las pruebas de cypress existentes de extremo a extremo:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [freeCodeCamp unter Windows einrichten (WSL)](how-to-setup-wsl.md)
|
||||
- [Benutzer-Token Workflow](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ Um Tests mit Produktions-Builds durchzuführen, ersetze unten `dev` durch `prd`.
|
||||
- Um einen einzelnen Test durchzuführen:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- Um einen Entwicklungs-Build zu erstellen, starte den Entwicklungsserver und führe alle vorhandenen Cypress-End-to-End-Tests aus:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Settare freeCodeCamp su Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [Workflow con il Token Utente](user-token-workflow.md)
|
||||
- [Risolvere i Problemi di Sviluppo](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -8,17 +8,17 @@ I colori sono definiti in [`variable.css`](/client/src/components/layouts/variab
|
||||
|
||||
Siamo estremamente categorici circa l'aggiunta di nuove variabili/token ai colori. Dopo un'attenta ricerca, i colori sono stati scelti per rispettare l'identità del marchio freeCodeCamp, l'esperienza dello sviluppatore e l'accessibilità.
|
||||
|
||||
The `!important` keyword may be used to override values in some cases (e.g. accessibility concerns). È necessario aggiungere un commento che descriva il problema, in modo che non venga rimosso in un futuro refactoring.
|
||||
La parola chiave `!important` può essere usata per sovrascrivere i valori in alcuni casi (per esempio: problemi di accessibilità). È necessario aggiungere un commento che descriva il problema, in modo che non venga rimosso in un futuro refactoring.
|
||||
|
||||
### Supporto RTL
|
||||
|
||||
Stiamo cercando di supportare il layout da destra a sinistra (right-to-left, RTL) nel codebase per le lingue che sono lette in questa direzione. Per questo è necessario essere consapevoli di come definire lo stile dei componenti. Ecco alcune rapide regole pratiche da seguire:
|
||||
|
||||
- Don't use `float` properties
|
||||
- Use Flexbox and Grid layouts instead, as they have RTL support already built-in, and those will be easier to maintain and review.
|
||||
- Don't define the direction while using `margin` and `padding`: it may seem harmless to use `padding-right` and `margin-left`, but these directions aren't mirrored when the layout changes to RTL, and adding counter values for them in the RTL file makes maintaining the codebase harder.
|
||||
- Use logical properties for them: You can add the same spacing by using `padding-inline-end` and `margin-inline-start`, and you won't need to worry about RTL layout, as they follow where the line starts and ends, and you won't need to add any extra values in the RTL files, so people won't need to remember to change the same values in two files.
|
||||
- Don't use `!important` in `font-family`: RTL layout uses different fonts compared to the LTR layout, when you add `!important` in the `font-family` property it affects the RTL layout too.
|
||||
- Non utilizzare le proprietà `float`
|
||||
- Invece, utilizza i layout Flexbox e Grid poiché hanno già integrato il supporto RTL e saranno più facili da gestire e revisionare.
|
||||
- Non definire la direzione usando `margin` e `padding`: potrebbe sembrare innocuo usare `padding-right` e `margin-left`, ma queste direzioni non sono rispecchiate quando il layout cambia in RTL e l'aggiunta di valori contatori per loro nel file RTL rende il mantenimento del codebase più difficile.
|
||||
- Usa le proprietà logiche per loro: puoi aggiungere la stessa spaziatura usando `padding-inline-end` e `margin-inline-start` e non dovrai preoccuparti del layout RTL, dato che segue l'inizio e la fine della riga e non è necessario aggiungere alcun valore aggiuntivo nei file RTL, così le persone non dovranno ricordarsi di cambiare gli stessi valori in due file.
|
||||
- Non usare `!important` in `font-family`: il layout RTL utilizza caratteri diversi rispetto al layout LTR, aggiungendo `!important` alla proprietà `font-family` si influisce anche sul layout RTL.
|
||||
|
||||
## JavaScript generale
|
||||
|
||||
|
||||
@@ -33,7 +33,13 @@ Per eseguire i test su build di produzione, sostituisci `dev` con `prd` nella pa
|
||||
- Per eseguire un singolo test:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- Per creare una build di sviluppo, avvia il server di sviluppo e esegui tutti i test cypress end-to-end esistenti:
|
||||
|
||||
@@ -4,7 +4,7 @@ I token utente sono utilizzati per identificare gli utenti con terze parti in mo
|
||||
|
||||
## Come vengono creati
|
||||
|
||||
Al momento, i token sono utilizzati solo per completare le sfide della certificazione Database Relazionale. A token gets created when a signed-in user clicks the "Click here to start the course" or "Click here to start the project" buttons to start one of the Relational Database courses or projects.
|
||||
Al momento, i token sono utilizzati solo per completare le sfide della certificazione Database Relazionale. Un token viene creato quando un utente loggato clicca sui pulsanti "Clicca qui per iniziare il corso" o "Clicca qui per iniziare il progetto" per iniziare uno dei corsi o progetti della certificazione Database Relazionali.
|
||||
|
||||
## Quando vengono cancellati
|
||||
|
||||
@@ -12,4 +12,4 @@ Un token utente viene cancellato quando un utente fa log out da freeCodeCamp, re
|
||||
|
||||
## Come funzionano
|
||||
|
||||
I token sono memorizzati in una raccolta `UserToken` nel database. Ogni record ha un `_id` unico, che è il token, e un `user_id` che collega all'account dell'utente dalla collezione `user`. Il token è codificato usando JWT e inviato al client quando viene creato. That encoded token is then given to third-party services that need it and sent to our API by them when a challenge is completed. Quando la nostra API lo riceve, è decodificato in modo da poter identificare l'utente che presenta una sfida e salvare la sfida completata nella lista delle sfide completate `completedChallenges` dell'utente.
|
||||
I token sono memorizzati in una raccolta `UserToken` nel database. Ogni record ha un `_id` unico, che è il token, e un `user_id` che collega all'account dell'utente dalla collezione `user`. Il token è codificato usando JWT e inviato al client quando viene creato. Questo token codificato viene quindi dato a servizi di terze parti che ne hanno bisogno e inviato alla nostra API da loro quando una sfida è completata. Quando la nostra API lo riceve, è decodificato in modo da poter identificare l'utente che presenta una sfida e salvare la sfida completata nella lista delle sfide completate `completedChallenges` dell'utente.
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [User Token Workflow](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ Cypress テストもしくは「specs」の書き方については、Cypress
|
||||
- 単一のテストを実行します。
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- 開発ビルドを作成するには、開発サーバーを起動し、既存の cypress エンドツーエンドテストをすべて実行します。
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Configurar freeCodeCamp no Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [Fluxo de trabalho do token de usuário](user-token-workflow.md)
|
||||
- [Solucionar problemas de desenvolvimento](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -33,7 +33,13 @@ Para executar testes usando compilações de produção, substitua `dev` por `pr
|
||||
- Para executar um único teste:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- Para criar uma versão de compilação, inicie o servidor de desenvolvimento e execute todos os testes cypress contínuos e funcionais existentes:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
- [Встановлення freeCodeCamp на Windows (WSL)](how-to-setup-wsl.md)
|
||||
- [Робочий процес токенів користувача](user-token-workflow.md)
|
||||
- [Troubleshooting Development Issues](troubleshooting-development-issues.md)
|
||||
- [Authors Analytics Manual](authors-analytics-manual.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Authors Analytics Manual
|
||||
|
||||
If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language.
|
||||
|
||||
## Search by Language
|
||||
|
||||
To search for engagement reports by a specific language:
|
||||
|
||||

|
||||
|
||||
1. From the top dropdown menu, select `News`.
|
||||
1. From the sidebar, click on `Reports`.
|
||||
1. From the secondary sidebar, select `Engagement`.
|
||||
1. Click on `Pages and Screens`.
|
||||
1. In the search bar, type the subpath for the desired language.
|
||||
1. From the dropdown under the search bar, choose `Page path and screen class`.
|
||||
|
||||
## Filter Reports by Author
|
||||
|
||||
After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors.
|
||||
|
||||

|
||||
|
||||
1. Click on the `Add filter` button.
|
||||
1. From the side navigation include `Author`.
|
||||
1. From the `Dimensions values` dropdown, choose an author's name.
|
||||
1. Click on the `Apply` button to apply changes.
|
||||
@@ -17,38 +17,38 @@
|
||||
- Не використовуйте властивості `float`
|
||||
- Натомість використовуйте макети Flexbox та Grid, оскільки вони мають вбудовану підтримку RTL, і їх буде простіше підтримувати та переглядати.
|
||||
- Не визначайте напрямок, використовуючи `margin` та `padding`: використання `padding-right` та `margin-left` може здаватись безобідним, але ці напрямки не відображаються, коли макет змінюється на RTL, а додавання протилежних значень ускладнює утримання кодової бази.
|
||||
- Використовуйте логічні властивості: ви можете додати однаковий інтервал, використовуючи `padding-inline-end` та `margin-inline-start`, і вам не доведеться переживати про макет RTL, оскільки вони відповідають тому, де починається на закінчується рядок. Крім того, вам не доведеться турбуватися про додавання додаткових значень до файлів RTL, і, відповідно, не доведеться пам’ятати про зміну однакових значень у двох файлах.
|
||||
- Використовуйте логічні властивості: ви можете додати однаковий інтервал, використовуючи `padding-inline-end` та `margin-inline-start`, і вам не доведеться переживати про макет RTL, оскільки вони відповідають тому, де починається та закінчується рядок. Крім того, вам не доведеться турбуватися про додавання додаткових значень до файлів RTL, і, відповідно, не доведеться пам’ятати про зміну однакових значень у двох файлах.
|
||||
- Не використовуйте `!important` у `font-family`: для макетів RTL та LTR використовуються різні шрифти; додавання `!important` до властивості `font-family` впливає й на макет RTL.
|
||||
|
||||
## General JavaScript
|
||||
## Загальний JavaScript
|
||||
|
||||
In most cases, our [linter](how-to-setup-freecodecamp-locally.md#follow-these-steps-to-get-your-development-environment-ready) will warn of any formatting which goes against this codebase's preferred practice.
|
||||
У більшості випадків наш [лінтер](how-to-setup-freecodecamp-locally.md#follow-these-steps-to-get-your-development-environment-ready) попереджатиме про будь-яке форматування, яке суперечить вподобанням нашої кодової бази.
|
||||
|
||||
It is encouraged to use functional components over class-based components.
|
||||
Рекомендовано використовувати функціональні компоненти, а не класові.
|
||||
|
||||
## Specific TypeScript
|
||||
## Особливий TypeScript
|
||||
|
||||
### Migrating a JavaScript File to TypeScript
|
||||
### Перенесення файлу JavaScript до TypeScript
|
||||
|
||||
#### Збереження історії файлів Git
|
||||
|
||||
Sometimes changing the file from `<filename>.js` to `<filename>.ts` (or `.tsx`) causes the original file to be deleted, and a new one created, and other times the filename just changes - in terms of Git. Ideally, we want the file history to be preserved.
|
||||
Іноді зміна файлу з `<filename>.js` на `<filename>.ts` (або `.tsx`) призводить до видалення вихідного файлу та створення нового, а в іншому випадку просто змінюється назва файлу, згідно з Git. В ідеалі ми хочемо, щоб історія файлів була збережена.
|
||||
|
||||
The best bet at achieving this is to:
|
||||
Для цього потрібно:
|
||||
|
||||
1. Перейменувати файл
|
||||
2. Затвердити прапорцем `--no-verify`, щоб запобігти скаргам Хаскі на помилки lint
|
||||
3. Провести реорганізацію коду в TypeScript, в окремому коміті
|
||||
2. Позначити прапорцем `--no-verify`, щоб Хаскі не скаржився на помилки лінтера
|
||||
3. Провести рефакторинг для перенесення у TypeScript в окремому коміті
|
||||
|
||||
> [!NOTE] Такі редактори, як VSCode, однаково показуватимуть, що файл видалено та створено новий. Якщо ви використовуєте CLI для `git add .`, то VSCode показуватиме файл як перейменований
|
||||
> [!NOTE] Редактори типу VSCode однаково показуватимуть, що файл видалено та створено новий. Якщо ви використаєте CLI для `git add .`, то VSCode показуватиме файл як перейменований
|
||||
|
||||
### Конвенції про іменування
|
||||
|
||||
#### Інтерфейси та типи
|
||||
|
||||
For the most part, it is encouraged to use interface declarations over type declarations.
|
||||
У більшості випадків рекомендовано використовувати оголошення інтерфейсу, а не оголошення типу.
|
||||
|
||||
React Component Props - suffix with `Props`
|
||||
Пропси компоненту React – суфікс `Props`
|
||||
|
||||
```typescript
|
||||
interface MyComponentProps {}
|
||||
@@ -56,7 +56,7 @@ interface MyComponentProps {}
|
||||
const MyComponent = (props: MyComponentProps) => {};
|
||||
```
|
||||
|
||||
React Stateful Components - suffix with `State`
|
||||
Stateful-компоненти React – суфікс `State`
|
||||
|
||||
```typescript
|
||||
interface MyComponentState {}
|
||||
@@ -64,7 +64,7 @@ interface MyComponentState {}
|
||||
class MyComponent extends Component<MyComponentProps, MyComponentState> {}
|
||||
```
|
||||
|
||||
Default - object name in PascalCase
|
||||
За замовчуванням – ім’я об’єкта ВерблюдячимРегістром
|
||||
|
||||
```typescript
|
||||
interface MyObject {}
|
||||
@@ -78,7 +78,7 @@ const myObject: MyObject = {};
|
||||
|
||||
## Redux
|
||||
|
||||
### Action Definitions
|
||||
### Визначення дій
|
||||
|
||||
```typescript
|
||||
enum AppActionTypes = {
|
||||
@@ -93,7 +93,7 @@ export const actionFunction = (
|
||||
});
|
||||
```
|
||||
|
||||
### How to Reduce
|
||||
### Як використовувати reduce
|
||||
|
||||
```typescript
|
||||
// Base reducer action without payload
|
||||
@@ -120,9 +120,9 @@ export const reducer = (
|
||||
};
|
||||
```
|
||||
|
||||
### How to Dispatch
|
||||
### Як використовувати dispatch
|
||||
|
||||
Within a component, import the actions and selectors needed.
|
||||
Імпортуйте необхідні дії та селектори всередині компонента.
|
||||
|
||||
```tsx
|
||||
// Add type definition
|
||||
|
||||
@@ -33,7 +33,13 @@
|
||||
- Для запуску одного тесту:
|
||||
|
||||
```console
|
||||
npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js
|
||||
npm run cypress -- run --spec=cypress/<path_to_test_file>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```console
|
||||
npm run cypress -- run --spec=cypress/e2e/default/landing.js
|
||||
```
|
||||
|
||||
- Щоб створити збірку розробки, запустіть сервер розробки і виконайте всі наявні тести cypress:
|
||||
|
||||
@@ -134,7 +134,7 @@ Follow these steps:
|
||||
git status
|
||||
```
|
||||
|
||||
Output:
|
||||
Вивід:
|
||||
|
||||
```console
|
||||
On branch feat/documentation
|
||||
@@ -155,7 +155,7 @@ Follow these steps:
|
||||
git commit -m "fix: my short commit message"
|
||||
```
|
||||
|
||||
Some examples:
|
||||
Декілька прикладів:
|
||||
|
||||
```md
|
||||
fix: add test for JavaScript - for loop step
|
||||
@@ -201,7 +201,7 @@ After you've committed your changes, check here for [how to open a Pull Request]
|
||||
|
||||
A quick reference to the commands that you will need when working.
|
||||
|
||||
| command | description |
|
||||
| команда | опис |
|
||||
| -------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `npm test` | Run all JS tests in the system, including client, server, lint and challenge tests. |
|
||||
| `npm run test-client` | Run the client test suite. |
|
||||
|
||||
Reference in New Issue
Block a user