summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 40 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d40e2f4..0cea1c3 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ install_global=false
.PHONY: all
all:
- @echo "This is a python project, no compilation required"
+ @echo "This is a python project, no compilation required\nSCSS/SASS Initial Setup: make sass-setup\nSCSS/SASS Build (for static files): make sass-build"
.PHONY: install
@@ -38,3 +38,42 @@ dist:
.PHONY: pretty
pretty:
yapf -r -i talerblog/
+
+# i18n
+extract:
+# Note: Flask-BabelEx expects 'translations/' for the dirname,
+# even though GNU gettext typically uses 'locale/'
+ mkdir -p translations/
+ pybabel extract -F babel.cfg -o translations/messages.pot .
+# Add new language as follows:
+# pybabel init -i locale/messages.pot -d locale/ -l de
+
+compile:
+ pybabel compile -d translations/
+
+update: extract
+ pybabel update -i translations/messages.pot -d translations/
+
+# SASS/SCSS
+
+sass-setup:
+ @echo "This is the initial sass-installation/setup script."
+ @echo "This setup must run as root, on a machine that has NPM installed!"
+ @echo "If your password is requested (for escalation), please enter it."
+ sudo npm install -g sass
+
+scss-setup: sass-setup
+
+sass-build:
+ @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!"
+ @echo "This script will only convert files inside /static"
+ sass talermerchantdemos/static:talermerchantdemos/static
+
+scss-build: sass-build
+
+sass-autobuild:
+ @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!"
+ @echo "This script will automatically build sass/scss files in the static directory!"
+ sass --watch talermerchantdemos/static:talermerchantdemos/static
+
+scss-autobuild: sass-autobuild