From 20e23dcecd2bb4eeb72d324c33a29685c0241035 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 7 Feb 2022 01:17:43 +1100 Subject: Add locale script (#945) * Add locales script * Add gitignore exception Co-authored-by: Daniel Girtler --- archinstall/locales/locales_generator.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 archinstall/locales/locales_generator.sh (limited to 'archinstall/locales/locales_generator.sh') diff --git a/archinstall/locales/locales_generator.sh b/archinstall/locales/locales_generator.sh new file mode 100644 index 00000000..43e004d4 --- /dev/null +++ b/archinstall/locales/locales_generator.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd $(dirname "$0")/.. + +find . -type f -iname "*.py" | xargs xgettext -j --omit-header -d base -o locales/base.pot + +for file in $(find locales/ -name "base.po"); do + echo "Updating: $file" + path=$(dirname $file) + msgmerge --quiet --width 512 --update $file locales/base.pot + msgfmt -o $path/base.mo $file +done -- cgit v1.2.3-70-g09d2