1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-21 09:50:13 -07:00

Merge branch 'master' of https://github.com/pavlobu/deskreen into master_zh_CN

This commit is contained in:
taotieren 2021-02-13 03:16:01 +08:00
commit 1879509a95
3 changed files with 31 additions and 14 deletions

View File

@ -161,6 +161,21 @@ globally on your machine.
`yarn coverage` -- when run from project root, generates a coverage report for `host` and `app/client` `yarn coverage` -- when run from project root, generates a coverage report for `host` and `app/client`
### How to regenerate snapshots if you have tests failing when running `yarn test`?
in root `./` folder of project run this:
```
yarn test --updateSnapshot
```
in Deskreen Viewer `./app/client` folder of project run this:
```
cd app/client
SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u
```
## Instruction for running a local Sonar Qube, community edition ## Instruction for running a local Sonar Qube, community edition
### Prerequisites ### Prerequisites

View File

@ -115,21 +115,21 @@ Docs coming soon. Stay tuned.
### When the Deskreen App edits done, then please fix tests if they are broken. And regenerate snapshots if needed. ### When the Deskreen App edits done, then please fix tests if they are broken. And regenerate snapshots if needed.
Example to regenerate snapshots: ### How to regenerate snapshots if you have tests failing when running `yarn test`?
in root `./` folder of project
in root `./` folder of project run this:
``` ```
yarn test -- -u (or yarn jest -- -u) yarn test --updateSnapshot
``` ```
in root `./app/client` folder of project in Deskreen Viewer `./app/client` folder of project run this:
``` ```
yarn test -- -u (or yarn jest -- -u) cd app/client
SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u
``` ```
If that doesn't work for you to regenerate snaphosts, please google search how to do it.
### IMPORTANT: Please make sure your PR is 1 or maximum 2 commits length. If it is longer than that, you will be asked to squash your PR commits. If you don't know how to squash, refer [this guide](#dont-know-code) ### IMPORTANT: Please make sure your PR is 1 or maximum 2 commits length. If it is longer than that, you will be asked to squash your PR commits. If you don't know how to squash, refer [this guide](#dont-know-code)
### After you done fixing, please submit your PR, it will be reviewed and if everything is ok it will be merged and you fix will be included in next release. Thank you! ### After you done fixing, please submit your PR, it will be reviewed and if everything is ok it will be merged and you fix will be included in next release. Thank you!

View File

@ -134,6 +134,8 @@ You need to add it in two places: 1. host app, that runs on a computer and 2. cl
"es": "Espagnol", "es": "Espagnol",
.... ....
``` ```
- In `getShuffledArrayOfHello`(search for arrow function) add a Hello word in your language to `res` list like this: `res.push(translationES.Hello);`. You will first need to import `translationES` on a top of file where this arrow function is. Example: `import translationES from '../locales/es/translation.json'`
- Done with the host app! - Done with the host app!
- Now proceed with client viewer. Create a directory `es` in `app/client/public/locales` - Now proceed with client viewer. Create a directory `es` in `app/client/public/locales`
- create `app/client/public/locales/es/translation.json` - create `app/client/public/locales/es/translation.json`
@ -146,21 +148,21 @@ You need to add it in two places: 1. host app, that runs on a computer and 2. cl
### When the Deskreen App translations done, then please fix tests if they are broken. And regenerate snapshots if needed. ### When the Deskreen App translations done, then please fix tests if they are broken. And regenerate snapshots if needed.
Example to regenerate snapshots: ### How to regenerate snapshots if you have tests failing when running `yarn test`?
in root `./` folder of project
in root `./` folder of project run this:
``` ```
yarn test -- -u (or yarn jest -- -u) yarn test --updateSnapshot
``` ```
in root `./app/client` folder of project in Deskreen Viewer `./app/client` folder of project run this:
``` ```
yarn test -- -u (or yarn jest -- -u) cd app/client
SKIP_PREFLIGHT_CHECK=true yarn test:nowatch -- -u
``` ```
If that doesn't work for you to regenerate snaphosts, please google search how to do it.
### By this time you should be done with adding a translation. ### By this time you should be done with adding a translation.
### Add new language for Deskreen Website. Step By Step Guide for coders and people who know how to use git ### Add new language for Deskreen Website. Step By Step Guide for coders and people who know how to use git