1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00
apps/tools/app_generator
dependabot[bot] 028507dc9b
Bump jinja2 from 3.1.3 to 3.1.4 in /tools/app_generator (#2299)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 00:12:13 +02:00
..
static appgenerator: rework css using tailwind + misc cleanup, wording (#2259) 2024-04-30 22:54:07 +02:00
templates appgenerator: rework css using tailwind + misc cleanup, wording (#2259) 2024-04-30 22:54:07 +02:00
translations appgenerator : Readme + compile .po/.mo (#2276) 2024-04-30 23:09:12 +02:00
app.py 🎨 Format Python code with Black (#2275) 2024-04-30 22:54:57 +02:00
babel.cfg v0.9.1 - add translations (babel) 2024-04-02 23:12:54 +02:00
gunicorn.py Yologen improvements for deployment (#2253) 2024-04-23 20:04:26 +02:00
README.md Update README.md 2024-05-04 04:39:52 +02:00
requirements.txt Bump jinja2 from 3.1.3 to 3.1.4 in /tools/app_generator (#2299) 2024-05-07 00:12:13 +02:00

YunoHost app generator

This is a Flask app generating a draft .zip of a YunoHost application after filling a form

Official instance: https://appgenerator.yunohost.org/

Developement

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

# you need to manually download the assets to have access to the css and the javascript files
(cd assets && bash fetch_assets)

And then start the dev server:

source venv/bin/activate
FLASK_APP=app.py FLASK_ENV=development flask --debug run

Translation

It's based on Flask-Babel : https://python-babel.github.io/flask-babel/

source venv/bin/activate

# Extract the english sentences from the code, needed if you modified it
pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot .

# If working on a new locale: initialize it (in this example: fr)
pybabel init -i messages.pot -d translations -l fr
# Otherwise, update the existing .po:
pybabel update -i messages.pot -d translations

# ... translate stuff in translations/<lang>/LC_MESSAGES/messages.po
# re-run the 'update' command to let Babel properly format the text
# then compile:
pybabel compile -d translations