aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpapoteur-mga <yves.brungard_git@gadz.org>2013-10-03 20:52:22 +0200
committerpapoteur-mga <yves.brungard_git@gadz.org>2013-10-03 20:52:22 +0200
commit06a5d652491166ff04f44a46e0f330be82233287 (patch)
tree51945db75be8afe2f5165a75ecb0f8aafd24b304
parentcc9279ca0c6c71e7e451d977265b6b4b77457460 (diff)
downloadisodumper-06a5d652491166ff04f44a46e0f330be82233287.tar
isodumper-06a5d652491166ff04f44a46e0f330be82233287.tar.gz
isodumper-06a5d652491166ff04f44a46e0f330be82233287.tar.bz2
isodumper-06a5d652491166ff04f44a46e0f330be82233287.tar.xz
isodumper-06a5d652491166ff04f44a46e0f330be82233287.zip
Add function to specify a language on the command line.
-rw-r--r--tools/po-compile.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/tools/po-compile.sh b/tools/po-compile.sh
index 3581fdf..0a470c1 100644
--- a/tools/po-compile.sh
+++ b/tools/po-compile.sh
@@ -3,15 +3,26 @@
set -e
cd "$(readlink -f "$(dirname "$0")/..")"
-
-find "$PWD/po" -type f -name '*.po' | \
-while read po_file; do
- language="$(basename "$po_file")"
+update_mo(){
+ echo $1
+ language="$(basename "$1")"
language="${language%.po}"
target="$PWD/share/locale/$language/LC_MESSAGES/isodumper.mo"
+ echo $target
/bin/mkdir --parents "$(dirname "$target")"
/usr/bin/msgfmt \
--check \
--output-file="$target" \
- "$po_file"
-done
+ "$1"
+}
+
+if test "$1"; then
+ for l in $(find "$PWD/po" -type f -name "$1.po"); do
+ echo $l
+ update_mo "$l"
+ done
+else
+ for l in $(find "$PWD/po" -type f -name '*.po'); do
+ update_mo "$l"
+ done
+fi \ No newline at end of file