#!/bin/sh # $Id$ ## # Shell script that synchronises all translations in phpMyAdmin ## # Written by Michal Cihar ## ## # convertor setup ## # CONVERTOR_PARAMS is used for printf and it also receives two params: source # and target charset # #for iconv #CONVERTOR=iconv #CONVERTOR_PARAMS="-f %s -t %s" #for recode: CONVERTOR=recode CONVERTOR_PARAMS="%s..%s" ## # names of translations to process ## # Here should be listed all translations for which conversion should be done. # The name is filename without inc.php3. # BASE_TRANSLATIONS=`cat < $file echo done elif [ $src_charset = 'utf-8' ] ; then # if we convert fomo utf-8, we should remove allow_recoding $CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| grep -v allow_recoding > $file echo done else # just convert $CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| sed "s/$src_charset/$charset/" > $file echo done fi done # now check whether we found utf-8 translation if [ $is_utf = no ] ; then if ( echo $IGNORE_UTF | grep -q $base ) ; then # utf-8 should not be created true else # we should create utf-8 translation echo " creating utf-8 translation" charset=utf-8 iconv -f $src_charset -t $charset $base.inc.php3| sed -e "s/$src_charset/$charset/" -e '/\$charset/a\ $allow_recoding = TRUE;' > $lang-$charset.inc.php3 fi fi echo "$lang processing finished." echo "-------------------------------------------------------------------" done