From acce7c38d3833b59c4eb2e99dbe7f0393b6a9cbd Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 3 Dec 2022 18:56:32 +0100 Subject: replace Makefile targets with justfile We might re-introduce Makefiles, but for different purposes (SASS or TypeScript compilation). --- justfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'justfile') 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 -- cgit v1.2.3