summaryrefslogtreecommitdiff
path: root/scripts/set_untranslated
diff options
context:
space:
mode:
authorJoey Hess <joeyh@debian.org>2005-10-07 19:51:38 +0000
committerJoey Hess <joeyh@debian.org>2005-10-07 19:51:38 +0000
commit1ea73eea5ecc6a8ed901316049259aee737ee554 (patch)
tree03a077f0b1b1548f3c806bd1c5795964fba0fb52 /scripts/set_untranslated
downloadinstallation-guide-1ea73eea5ecc6a8ed901316049259aee737ee554.zip
move manual to top-level directory, split out of debian-installer package
Diffstat (limited to 'scripts/set_untranslated')
-rwxr-xr-xscripts/set_untranslated39
1 files changed, 39 insertions, 0 deletions
diff --git a/scripts/set_untranslated b/scripts/set_untranslated
new file mode 100755
index 000000000..44a6ebf7f
--- /dev/null
+++ b/scripts/set_untranslated
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# This script is used for translations using .po files.
+
+# This script is meant to be used only once for the transition
+# from translating the .xml files to using .po files.
+
+basedir="$(cd "$(dirname $0)"; pwd)"
+POFILE=$2
+TEMPFILE="/tmp/set_untranslated.$$"
+
+print_usage () {
+ echo "Usage: $0 <range> <filename>"
+ echo " where <range> is <number> or <start:end>"
+}
+
+if [ "$1" = "--help" ] ; then
+ print_usage
+ exit 0
+fi
+if [ $# -ne 2 ] || [ ! -f $POFILE ] ; then
+ print_usage
+ exit 1
+fi
+
+
+gawk -f $basedir/mark_untranslated.awk -v RANGE="$1" $POFILE >$TEMPFILE
+if [ $? -eq 0 ] ; then
+ cp $POFILE $POFILE.sv
+ cp $TEMPFILE $POFILE
+
+ echo ""
+ echo "NOTE"
+ echo "The original file has been replaced!"
+ echo "A copy of the original file was saved as '$POFILE.sv'."
+fi
+
+rm $TEMPFILE
+exit 0