aboutsummaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rw-r--r--justfile19
1 files changed, 18 insertions, 1 deletions
diff --git a/justfile b/justfile
index e5625fc..fc29e00 100644
--- a/justfile
+++ b/justfile
@@ -1,4 +1,4 @@
-default:
+_default:
@just --list
# Create a new language pack
@@ -41,3 +41,20 @@ update-language-pack locale:
FB_PATH="$PWD"
cd "language-packs/fietsboek-i18n-{{ locale }}"
pybabel update -d "fietsboek_i18n_{{ locale }}/locale" -l {{ locale }} -i "$FB_PATH/fietsboek/locale/fietslog.pot"
+
+# Initializes a new built-in language
+init-language locale:
+ pybabel init -d fietsboek/locale -l {{ locale }} -i fietsboek/locale/fietslog.pot
+ cp -r fietsboek/locale/en/html fietsboek/locale/{{ locale }}/
+
+# Update the built-in message catalogue
+update-language locale:
+ pybabel update -d fietsboek/locale -l {{ locale }} -i fietsboek/locale/fietslog.pot
+
+# Compile the given built-in language
+compile-language locale:
+ pybabel compile -d fietsboek/locale -l {{ locale }} -i fietsboek/locale/{{ locale }}/LC_MESSAGES/messages.po
+
+# Extract new messages from the source files
+extract-messages:
+ pybabel extract -F babel.cfg -o fietsboek/locale/fietslog.pot --input-dirs=fietsboek