more docs, about development, translation and using the system

parent a41de17a
......@@ -15,11 +15,13 @@ Failmap Documentation 🤣
topics/scanners_scanning_and_ratings
topics/running_a_remote_worker
topics/deployment
topics/translation
topics/gis_and_map_information
topics/writing_a_scanner
topics/docker
topics/task_processing_system
topics/user_guide
topics/thanks
......
# Development
Please follow the quickstart to get failmap on your system.
Please follow the [quickstart](getting_started.md) to get failmap on your system.
Additionally the Docker page could be very helpful.
Additionally the [Docker](docker.md) page could be very helpful.
## A normal change to the software
This is an illustration to show a normal development practices.
We use git, which comes with many pitfalls. Just search your answer on stack exchange first and ask in the group later.
Make sure failmap is up and running, by following the [getting started](getting_started.md) instructions. Then make a
branch that describes what you are doing. For example:
```
git branch documentation_upgrade
```
Then make any changes to the source code. You'll see that the devserver automatically restarts after every save.
Once you're happy with your changes, and you've tested it on your environment using a meaningful dataset
(eg productiondata), then you can verify (and autofix) the code to our code standards:
```
tox -e autofix
```
Fix any of the remarks it gives, otherwise your changes will not be added to the master branch.
When you are happy, review your changes and remove any temporary files using the instructions given.
```
git status
```
If you like the files that are changed, add all changes to be merged:
```
git add -A
```
Then commit them:
```
git commit -m "a short description why you changed something"
```
Then push them to the server
```
git push
```
The push command will give you a link to file a merge request. Meanwhile the build servers are checking your code
before merging.
Follow the merge request link to create the actual merge request. Share it on the chat.failmap.org channel for review
and feedback.
Once the feedback is processed (if needed at all) you can merge the code. If you can't, other members of the project can.
So ask.
## FAQ
### The failmap command won't start and i get some weird errors...?
Make sure you've got an up to date development environment. You can do so by running the following commands:
Rebuild the environment:
```
tox -r
```
Get all requirements and development requirements:
```
pip install -r requirements.txt
pip install -r requirements.dev.txt
```
## Code quality / Testing
......
# Translation
Failmap uses the Django translation system.
We've tried to automate most of the quirks this system has to make translations straightforward.
This tutorial assumes you've got a working installation, follow the (quickstart)[getting_started.md]
## Adding a language
A list of languages is stored in /failmap/settings.py. You can modify the LANGUAGES variable to add your language. We
prefer that you use the 2-letter ISO country codes where possible, but we already break from that with some languages.
To change failmap to the language you're working on, set the LANGUAGE_CODE to your language and run failmap.
Once your language has been added and you've changed the default language, run:
```
failmap translate
```
This will create the language files for your languages here:
* /failmap/map/locale/'iso code'/django.po
* /failmap/map/locale/'iso code'/djangojs.po
You can edit the .po files.
After you're done, run:
```
failmap translate
```
......@@ -24,3 +24,6 @@ Lists of organizations, coordinates and internet adresses.
4. Scanners
Lists of endpoints and assorted scans on these endpoints.
All data in the scanners section of the admin interface is auto-generated. Changing data here makes no sense as it will
be overwritten by a scanner.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment