mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-31 20:00:38 -05:00
docs run on master, update contrib. docs
This commit is contained in:
1
.github/workflows/docs.yml
vendored
1
.github/workflows/docs.yml
vendored
@@ -3,7 +3,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
@@ -15,13 +15,13 @@ Code contributions are always welcome. There is no special rules for what you ne
|
||||
just do your best and we will work together to get your idea and code merged into the project.
|
||||
|
||||
!!! info
|
||||
The dev setup is a little messy as this application combines the best (at least in my opinion) of django and Vue.js.
|
||||
The dev setup is a little messy as this application combines the best (at least in my opinion) of both Django and Vue.js.
|
||||
|
||||
### Django
|
||||
This application is developed using the Django framework for Python. They have excellent
|
||||
[documentation](https://www.djangoproject.com/start/) on how to get started, so I will only give you the basics here.
|
||||
|
||||
1. Clone this repository wherever you like and install the Python language for your OS (at least version 3.8)
|
||||
1. Clone this repository wherever you like and install the Python language for your OS (I recommend using version 3.10 or above)
|
||||
2. Open it in your favorite editor/IDE (e.g. PyCharm)
|
||||
1. If you want, create a virtual environment for all your packages.
|
||||
3. Install all required packages: `pip install -r requirements.txt`
|
||||
@@ -32,12 +32,13 @@ There is **no** need to set any environment variables. By default, a simple sqli
|
||||
populated from default values.
|
||||
|
||||
### Vue.js
|
||||
Some of the more complex pages use [Vue.js](https://vuejs.org/) to enhance the frontend.
|
||||
Most new frontend pages are build using [Vue.js](https://vuejs.org/).
|
||||
|
||||
In order to work on these pages you will have to install a Javascript package manager of your choice. The following examples use yarn.
|
||||
|
||||
Run `yarn install` to install the dependencies. After that you can use `yarn serve` to start the development server
|
||||
and go ahead and test your changes. Before committing please make sure to pack the source using `yarn build`.
|
||||
and go ahead and test your changes. If you do not want to work on those pages but want the application to work properly during
|
||||
development run `yarn build` to build the frontend pages once.
|
||||
|
||||
#### API Client
|
||||
The API Client is generated automatically from the openapi interface provided by the django rest framework.
|
||||
@@ -53,10 +54,6 @@ Generate the schema using `openapi-generator-cli generate -g typescript-axios -i
|
||||
The documentation is build from the markdown files in the [docs](https://github.com/vabene1111/recipes/tree/develop/docs)
|
||||
folder of the GitHub repository.
|
||||
|
||||
!!! warning "Deployment Branch"
|
||||
The documentation is currently build from the `develop` branch of the GitHub repository as it is evolving rapidly.
|
||||
This will likely change in the future to prevent issues with documentation being released before the features.
|
||||
|
||||
In order to contribute to the documentation you can fork the repository and edit the markdown files in the browser.
|
||||
|
||||
Now install mkdocs and dependencies: `pip install mkdocs-material mkdocs-include-markdown-plugin`.
|
||||
@@ -69,10 +66,6 @@ If you know any foreign languages that is not yet translated feel free to contri
|
||||
|
||||
Translations are managed on [translate.tandoor.dev](https://translate.tandoor.dev/), a self hosted instance of [Weblate](https://weblate.org/de/).
|
||||
|
||||
!!! info "Weblate functionality"
|
||||
Translations have only recently been migrated to weblate so I do not 100% understand each feature.
|
||||
Please feel free to contact me if you need any help getting started.
|
||||
|
||||
You can simply register an account and then follow these steps to add translations:
|
||||
|
||||
1. After registering you are asked to select your languages. This is optional but allows weblate to only show you relevant translations
|
||||
@@ -80,13 +73,15 @@ You can simply register an account and then follow these steps to add translatio
|
||||
3. Select Tandoor and on the top right hand corner select `Watch project Tandoor` (click on `Not watching`)
|
||||
4. Go back to the dashboard. It now shows you the relevant translations for your languages. Click the pencil icon to get started.
|
||||
|
||||
!!!! info "Creating a new languagte"
|
||||
!!! info "Creating a new language"
|
||||
To create a new language you must first select Tandoor (the project) and then a component.
|
||||
Here you will have the option to add the language. Afterwards you can also simply add it to the other components as well.
|
||||
Once a new language is (partially) finished let me know on GitHub so I can add it to the language switcher in Tandoor itself.
|
||||
|
||||
There is also [a lot of documentation](https://docs.weblate.org/en/latest/user/translating.html) available from Weblate directly.
|
||||
|
||||

|
||||
|
||||
It is also possible to provide the translations directly by creating a new language
|
||||
using `manage.py makemessages -l <language_code> -i venv`. Once finished, simply open a PR with the changed files.
|
||||
using `manage.py makemessages -l <language_code> -i venv`. Once finished, simply open a PR with the changed files. This sometimes causes issues merging
|
||||
with weblate so I would prefer the use of weblate.
|
||||
|
||||
Reference in New Issue
Block a user