diff --git a/tools/app_generator/README.md b/tools/app_generator/README.md new file mode 100644 index 0000000..c266769 --- /dev/null +++ b/tools/app_generator/README.md @@ -0,0 +1,42 @@ +# YunoHost app generator + +This is a Flask app generating a draft .zip of a YunoHost application after filling a form + +## Developement + +```bash +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: + +```bash +source venv/bin/activate +FLASK_APP=app.py FLASK_ENV=development flask --debug run +``` + +## Translation + +It's based on Flask-Babel : + +```bash +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//LC_MESSAGES/messages.po +# re-run the 'update' command to let Babel properly format the text +# then compile: +pybabel compile -d translations +``` diff --git a/tools/app_generator/translations/en/LC_MESSAGES/messages.mo b/tools/app_generator/translations/en/LC_MESSAGES/messages.mo index bb9daa4..a7421a9 100644 Binary files a/tools/app_generator/translations/en/LC_MESSAGES/messages.mo and b/tools/app_generator/translations/en/LC_MESSAGES/messages.mo differ diff --git a/tools/app_generator/translations/es/LC_MESSAGES/messages.mo b/tools/app_generator/translations/es/LC_MESSAGES/messages.mo index 3cfb569..3b5b53e 100644 Binary files a/tools/app_generator/translations/es/LC_MESSAGES/messages.mo and b/tools/app_generator/translations/es/LC_MESSAGES/messages.mo differ diff --git a/tools/app_generator/translations/fr/LC_MESSAGES/messages.mo b/tools/app_generator/translations/fr/LC_MESSAGES/messages.mo index 53f3470..def1881 100644 Binary files a/tools/app_generator/translations/fr/LC_MESSAGES/messages.mo and b/tools/app_generator/translations/fr/LC_MESSAGES/messages.mo differ