Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--archinstall/locales/locales_generator.sh12
2 files changed, 13 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a67c3e09..a11ddc79 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ SAFETY_LOCK
**/**dist
**/**.egg*
**/**.sh
+!archinstall/locales/locales_generator.sh
**/**.egg-info/
**/**build/
**/**src/
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