From 8c88adcb194ede94b9ffac06e802cdbd90be2496 Mon Sep 17 00:00:00 2001 From: Simon Schneegans Date: Sat, 21 Jan 2023 13:34:39 +0100 Subject: [PATCH] :wrench: Compile translations with kwin build script --- kwin/build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kwin/build.sh b/kwin/build.sh index 8adb113..7dba2b4 100755 --- a/kwin/build.sh +++ b/kwin/build.sh @@ -30,6 +30,14 @@ BUILD_DIR="_build" # Create it if it's not there yet. mkdir -p "$BUILD_DIR" +# Compile the translations. +for file in ../po/*.po; do + echo "Compiling $file" + lang=$(basename "$file" .po) + mkdir -p "$BUILD_DIR/locale/$lang/LC_MESSAGES" + msgfmt "$file" -o "$BUILD_DIR/locale/$lang/LC_MESSAGES/burn-my-windows.mo" +done + # This method is called one for each effect. The parameters are as follows: # $1: The nick of the effect (e.g. "energize-a") # $2: The name of the effect (e.g. "Energize A") @@ -49,7 +57,7 @@ generate() { mkdir -p "$BUILD_DIR/$DIR_NAME/contents/ui" # Copy the translations. - cp -r "../locale" "$BUILD_DIR/$DIR_NAME/contents" + cp -r "$BUILD_DIR/locale" "$BUILD_DIR/$DIR_NAME/contents" # Copy the config file if it exists. if [ -f "$1/main.xml" ]; then