Move translate documentation
This commit is contained in:
parent
41ef9fd49f
commit
31b92da6ce
@ -1,13 +1,13 @@
|
||||
# Contributing to WorkAdventure
|
||||
|
||||
Are you looking to help on WorkAdventure? Awesome, feel welcome and read the following sections in order to know how to
|
||||
Are you looking to help on WorkAdventure? Awesome, feel welcome and read the following sections in order to know how to
|
||||
ask questions and how to work on something.
|
||||
|
||||
## Contributions we are seeking
|
||||
|
||||
We love to receive contributions from our community — you!
|
||||
|
||||
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation,
|
||||
There are many ways to contribute, from writing tutorials or blog posts, improving the documentation,
|
||||
submitting bug reports and feature requests or writing code which can be incorporated into WorkAdventure itself.
|
||||
|
||||
## Contributing external resources
|
||||
@ -16,7 +16,7 @@ You can share your work on maps / articles / videos related to WorkAdventure on
|
||||
|
||||
## Developer documentation
|
||||
|
||||
Documentation targeted at developers can be found in the [`/docs/dev`](docs/dev/)
|
||||
Documentation targeted at developers can be found in the [`/docs/dev`](docs/dev/)
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
@ -34,11 +34,11 @@ Finally, you can come and talk to the WorkAdventure core team... on WorkAdventur
|
||||
|
||||
## Pull requests
|
||||
|
||||
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope
|
||||
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope
|
||||
and avoid containing unrelated commits.
|
||||
|
||||
Please ask first before embarking on any significant pull request (e.g. implementing features, refactoring code),
|
||||
otherwise you risk spending a lot of time working on something that the project's developers might not want to merge
|
||||
Please ask first before embarking on any significant pull request (e.g. implementing features, refactoring code),
|
||||
otherwise you risk spending a lot of time working on something that the project's developers might not want to merge
|
||||
into the project.
|
||||
|
||||
You can ask us on [Discord](https://discord.gg/YGtngdh9gt) or in the [GitHub issues](https://github.com/thecodingmachine/workadventure/issues).
|
||||
@ -54,7 +54,7 @@ $ yarn install
|
||||
$ yarn run prepare
|
||||
```
|
||||
|
||||
If you don't have the precommit hook installed (or if you committed code before installing the precommit hook), you will need
|
||||
If you don't have the precommit hook installed (or if you committed code before installing the precommit hook), you will need
|
||||
to run code linting manually:
|
||||
|
||||
```console
|
||||
@ -72,7 +72,7 @@ Nevertheless, if your code can be unit tested, please provide a unit test (we us
|
||||
If you are providing a new feature, you should setup a test map in the `maps/tests` directory. The test map should contain
|
||||
some description text describing how to test the feature.
|
||||
|
||||
* if the features is meant to be manually tested, you should modify the `maps/tests/index.html` file to add a reference
|
||||
* if the features is meant to be manually tested, you should modify the `maps/tests/index.html` file to add a reference
|
||||
to your newly created test map
|
||||
* if the features can be automatically tested, please provide a testcafe test
|
||||
|
||||
@ -90,8 +90,8 @@ $ npm run test
|
||||
```
|
||||
|
||||
Note: If your tests fail on a Javascript error in "sockjs", this is due to the
|
||||
Webpack live reload. The Webpack live reload feature is conflicting with testcafe. This is why we recommend starting
|
||||
WorkAdventure with the `LIVE_RELOAD=0` environment variable.
|
||||
Webpack live reload. The Webpack live reload feature is conflicting with testcafe. This is why we recommend starting
|
||||
WorkAdventure with the `LIVE_RELOAD=0` environment variable.
|
||||
|
||||
End-to-end tests can take a while to run. To run only one test, use:
|
||||
|
||||
@ -107,3 +107,7 @@ $ LIVE_RELOAD=0 docker-compose up -d
|
||||
# Wait 2-3 minutes for the environment to start, then:
|
||||
$ PROJECT_DIR=$(pwd) docker-compose -f docker-compose.testcafe.yml up
|
||||
```
|
||||
|
||||
### A bad wording or a missing language
|
||||
|
||||
If you notice a translation error or missing language you can help us by following the [how to translate](docs/dev/how-to-translate.md) documentation.
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
## How the translation files work
|
||||
|
||||
In the translations folder, all json files of the form [namespace].[language code].json are interpreted to create languages by the language code in the file name.
|
||||
In the `front/translations` folder, all json files of the form `[namespace].[language code].json` are interpreted to create languages by the language code in the file name.
|
||||
|
||||
The only mandatory file (the entry point) is the `index.[language code].json` which must contain the properties language, country and default so that the language can be taken into account.
|
||||
The only mandatory file (the entry point) is the `index.[language code].json` which must contain the properties `language`, `country` and `default` so that the language can be taken into account.
|
||||
|
||||
Example:
|
||||
```json
|
||||
@ -32,6 +32,8 @@ Example:
|
||||
- main-menu.fr-FR.json
|
||||
- chat.fr-FR.json
|
||||
|
||||
If a key isn't found then it will be searched in the fallback language and if it isn't found then the key will be returned. By default the fallback language is `en-US` but you can set another one with the `FALLBACK_LANGUAGE` environment variable.
|
||||
|
||||
## Add a new language
|
||||
|
||||
It is very easy to add a new language!
|
Loading…
Reference in New Issue
Block a user