aboutsummaryrefslogtreecommitdiffstats
path: root/tools/po-compile.sh
diff options
context:
space:
mode:
authorSARL ENR-68 <david@david.david>2013-09-26 18:11:52 +0200
committerSARL ENR-68 <david@david.david>2013-09-26 18:11:52 +0200
commitdc1e3e443117f8643906cdb8792404377a809624 (patch)
tree334bc64cbfb5e0eaca1f91615f29d3dcdb14f640 /tools/po-compile.sh
parent47e0f26f2232403458fd3c16f69b126fae0c5927 (diff)
downloadisodumper-dc1e3e443117f8643906cdb8792404377a809624.tar
isodumper-dc1e3e443117f8643906cdb8792404377a809624.tar.gz
isodumper-dc1e3e443117f8643906cdb8792404377a809624.tar.bz2
isodumper-dc1e3e443117f8643906cdb8792404377a809624.tar.xz
isodumper-dc1e3e443117f8643906cdb8792404377a809624.zip
add po-update.sh and po-compile.sh for translations
Diffstat (limited to 'tools/po-compile.sh')
-rw-r--r--tools/po-compile.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/po-compile.sh b/tools/po-compile.sh
new file mode 100644
index 0000000..2b4d364
--- /dev/null
+++ b/tools/po-compile.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+cd "$(readlink -f "$(dirname "$0")/..")"
+
+find "$PWD/po" -type f -name '*.po' | \
+while read po_file; do
+ language="$(basename "$po_file")"
+ language="${language%.po}"
+ target="$PWD/po/$language/LC_MESSAGES/isodumper.mo"
+ /bin/mkdir --parents "$(dirname "$target")"
+ /usr/bin/msgfmt \
+ --check \
+ --output-file="$target" \
+ "$po_file"
+done