summaryrefslogtreecommitdiff
path: root/manpages/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-06-05 13:46:52 +0200
committerDaniel Baumann <daniel@debian.org>2012-06-05 13:46:52 +0200
commit52c602459d0a381b7a919fce8a18df7a807e5531 (patch)
tree6631f3b6c5ba55438e729679a955f28e89e230ab /manpages/bin
parent59ec07d99ae72ab9d9117bb4db7ae4d708b51706 (diff)
downloadvyos-live-build-52c602459d0a381b7a919fce8a18df7a807e5531.tar.gz
vyos-live-build-52c602459d0a381b7a919fce8a18df7a807e5531.zip
Automatically translate date formats in po files.
Diffstat (limited to 'manpages/bin')
-rwxr-xr-xmanpages/bin/update-version.sh36
1 files changed, 35 insertions, 1 deletions
diff --git a/manpages/bin/update-version.sh b/manpages/bin/update-version.sh
index d01949b1a..4b0820e20 100755
--- a/manpages/bin/update-version.sh
+++ b/manpages/bin/update-version.sh
@@ -1,11 +1,24 @@
#!/bin/sh
+## live-build(7) - System Build Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
+##
+## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
set -e
-DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
PROGRAM="LIVE\\\-BUILD"
VERSION="$(cat ../VERSION)"
+DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
+
+DAY="$(LC_ALL=C date +%d)"
+MONTH="$(LC_ALL=C date +%m)"
+YEAR="$(LC_ALL=C date +%Y)"
+
echo "Updating version headers..."
for MANPAGE in en/*
@@ -14,3 +27,24 @@ do
sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
done
+
+# European date format
+for _LANGUAGE in de es fr it
+do
+ if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1
+ then
+ for _FILE in po/${_LANGUAGE}/*.po
+ do
+ sed -i -e "s|^msgstr .*.2012\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" "${_FILE}"
+ done
+ fi
+done
+
+# Brazilian date format
+if ls po/pt_BR/*.po > /dev/null 2>&1
+then
+ for _FILE in po/pt_BR/*.po
+ do
+ sed -i -e "s|^msgstr .*-2012\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" "${_FILE}"
+ done
+fi