--- trunk/installer/doc/manual/scripts/set_untranslated 2004/10/25 16:54:26 23464 +++ trunk/installer/doc/manual/scripts/set_untranslated 2004/10/25 16:56:18 23465 @@ -1,29 +1,39 @@ #!/bin/sh -TMP_FILE="/tmp/set_untranslated.$$" +# This script is used for translations using .po files. -if [ "$1" = "--help" ] ; then +# 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 " echo " where is or " +} + +if [ "$1" = "--help" ] ; then + print_usage exit 0 fi -if [ $# -ne 2 ] || [ ! -f $2 ] ; then - echo "Usage: $0 " - echo " where is or " +if [ $# -ne 2 ] || [ ! -f $POFILE ] ; then + print_usage exit 1 fi -awk -f mark_untranslated.awk -v RANGE="$1" $2 >$TMP_FILE +awk -f $basedir/mark_untranslated.awk -v RANGE="$1" $POFILE >$TEMPFILE if [ $? -eq 0 ] ; then - cp $2 $2.sv - cp $TMP_FILE $2 + 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 '$2.sv'." + echo "A copy of the original file was saved as '$POFILE.sv'." fi -rm $TMP_FILE +rm $TEMPFILE exit 0