#!/bin/sh MASTER_LANG=En MASTER_FILES=`find . -name "*$MASTER_LANG.rc"` list_translations() { MASTER_FILE=$1 TRANSLATIONS=`ls ${MASTER_FILE%$MASTER_LANG.rc}??.rc` for translation in $TRANSLATIONS; do LANG=`echo "$translation" | sed 's/.*\(..\)\.rc/\1/'` if [ "$LANG" != 'xx' ]; then echo "$LANG"; fi done } seconds_since_epoch() { FILE="$1" STATUS="`cvs status $FILE 2>/dev/null | grep 'Working revision:'`" if ! echo "$STATUS" | grep -q "No entry for"; then DATE="`echo "$STATUS" | sed 's/[^0-9]*[^ ]* *//'`" date -d "$DATE" '+%s' fi } echo "Legend:" echo " '.' -- translation appears to be uptodate" echo " 'x' -- translation needs updating" echo " '?' -- unknown status (file not under CVS control)" echo " ' ' -- translation missing" echo "Master language is $MASTER_LANG" echo ALL_LANGS=`(for file in $MASTER_FILES; do list_translations "$file"; done) | sort -u` echo " Module / Language " $ALL_LANGS for master in $MASTER_FILES; do MASTER_TIMESTAMP=`seconds_since_epoch "$master"` APP=`echo "${master%/*}" | sed 's/..//'` printf "%25s" "$APP" for lang in $ALL_LANGS; do LANG_FILE="${master%$MASTER_LANG.rc}$lang.rc" if [ -f "$LANG_FILE" ]; then if [ -z $MASTER_TIMESTAMP ]; then STATUS="?" else LANG_TIMESTAMP=`seconds_since_epoch "$LANG_FILE"` if [ "$LANG_TIMESTAMP" -lt "$MASTER_TIMESTAMP" ]; then STATUS="x" else STATUS="." fi fi else STATUS=" " fi echo -n " $STATUS " done echo done