summaryrefslogtreecommitdiff
path: root/homedecor/tools
diff options
context:
space:
mode:
Diffstat (limited to 'homedecor/tools')
-rwxr-xr-xhomedecor/tools/updatepo.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/homedecor/tools/updatepo.sh b/homedecor/tools/updatepo.sh
new file mode 100755
index 0000000..b0f82e5
--- /dev/null
+++ b/homedecor/tools/updatepo.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+
+# To create a new translation:
+# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot
+
+cd "$(dirname "${BASH_SOURCE[0]}")/..";
+
+# Extract translatable strings.
+xgettext --from-code=UTF-8 \
+ --keyword=S \
+ --keyword=NS:1,2 \
+ --keyword=N_ \
+ -o locale/template.pot \
+ $(find .. -name '*.lua')
+
+# Update translations.
+find locale -name '*.po' | while read -r file; do
+ echo $file
+ msgmerge --update $file locale/template.pot;
+done