lang. scripts replaced by files from r13129
This commit is contained in:
@@ -14,17 +14,19 @@ fi
|
||||
for file in *.inc.php
|
||||
do
|
||||
echo $file " "
|
||||
grep -v '?>' ${file} > ${file}.new
|
||||
case $file in
|
||||
english*)
|
||||
echo "$1 = '"$2"';" >> ${file}.new
|
||||
;;
|
||||
*)
|
||||
echo "$1 = '"$2"'; //to translate" >> ${file}.new
|
||||
;;
|
||||
esac
|
||||
echo "?>" >> ${file}.new
|
||||
rm $file
|
||||
mv ${file}.new $file
|
||||
done
|
||||
./sort_lang.sh english*
|
||||
echo " "
|
||||
echo "Message added to all message files (including english)"
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Shell script that adds a message file to all message files
|
||||
# adding "//to translate" on each line
|
||||
#
|
||||
# Example: add_message_file.sh xxx
|
||||
#
|
||||
@@ -13,6 +14,7 @@ fi
|
||||
for file in *.inc.php
|
||||
do
|
||||
echo $file " "
|
||||
grep -v '?>' ${file} > ${file}.new
|
||||
case $file in
|
||||
english*)
|
||||
sed -n 's/\(.*\);/\1;/p' $1 >> ${file}.new
|
||||
@@ -21,10 +23,10 @@ do
|
||||
sed -n 's/\(.*\);/\1; \/\/to translate/p' $1 >> ${file}.new
|
||||
;;
|
||||
esac
|
||||
echo "?>" >> ${file}.new
|
||||
rm $file
|
||||
mv ${file}.new $file
|
||||
done
|
||||
./sort_lang.sh english*
|
||||
echo " "
|
||||
echo "Messages added to add message files (including english)"
|
||||
|
||||
|
@@ -29,6 +29,7 @@ do
|
||||
awk "/$STRINGMATCH/ && ! /$IGNOREMATCH/ { print \$1 }" $f | sort > $TMPDIR/$f
|
||||
done
|
||||
|
||||
|
||||
# Build the diff files used for checking
|
||||
# And if there are no differences, delete the empty files
|
||||
echo "Comparing data"
|
||||
@@ -59,4 +60,3 @@ echo "Dupe = Duplicate Variables"
|
||||
echo "Miss = Missing Variables"
|
||||
echo "For exact problem listings, look in the $TMPDIR/ directory"
|
||||
echo "Please remember to remove '$TMPDIR/' once you are done"
|
||||
|
||||
|
@@ -21,4 +21,3 @@ do
|
||||
echo " lines after:" `wc -l $file`
|
||||
done
|
||||
echo " "
|
||||
|
||||
|
@@ -27,6 +27,7 @@ sortlang()
|
||||
targetdir=tmp-$f
|
||||
mkdir -p $targetdir
|
||||
|
||||
TRANSLATIONSTRING='//.*translate.*$'
|
||||
STRINGSTRING='^\$str[[:alnum:]_]+'
|
||||
WHITESPACE='^[[:blank:]]*$'
|
||||
CVSID='/\* \$Id$ \*/'
|
||||
@@ -34,6 +35,7 @@ sortlang()
|
||||
echo -n "Extracting:"
|
||||
echo -n " head"
|
||||
egrep -i -v $TRANSLATIONSTRING $f | \
|
||||
egrep -v "$STRINGSTRING|$CVSID|\?>|<\?php" >> $targetdir/head
|
||||
|
||||
echo -n " cvs"
|
||||
egrep "$CVSID" $f >>$targetdir/cvs
|
||||
@@ -52,6 +54,7 @@ sortlang()
|
||||
|
||||
echo -n " pending_translations"
|
||||
if [ -s $targetdir/tmp-translate ] ; then
|
||||
echo '// To translate:' > $targetdir/translate
|
||||
specialsort $targetdir/tmp-translate $targetdir/translate
|
||||
else
|
||||
echo -n > $targetdir/translate
|
||||
@@ -59,8 +62,10 @@ sortlang()
|
||||
echo
|
||||
|
||||
echo "Assembling final"
|
||||
echo "<?php" > $f
|
||||
cat $targetdir/cvs $targetdir/head $targetdir/sort $targetdir/translate \
|
||||
| uniq >> $f
|
||||
echo "?>" >> $f
|
||||
|
||||
rm -rf $targetdir
|
||||
}
|
||||
@@ -76,4 +81,3 @@ do
|
||||
fi
|
||||
echo "-------------------------------------------------------------------"
|
||||
done;
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
##
|
||||
srcfilelist=${@}
|
||||
destfilelist=""
|
||||
translationmatch='//to translate'
|
||||
suffixtoremove='.inc.php'
|
||||
added=0
|
||||
if [ -z "${srcfilelist}" ]; then
|
||||
@@ -28,4 +29,3 @@ destfilelist=`echo ${destfilelist} | xargs -n1 | egrep '.inc.php$'`
|
||||
if [ ! -z "${destfilelist}" ]; then
|
||||
grep -c -- "${translationmatch}" ${destfilelist} | sort -t':' -n +1 | sed -e "s/${suffixtoremove}//g" | xargs -n1 | egrep -v ':0$'
|
||||
fi;
|
||||
|
||||
|
Reference in New Issue
Block a user