From a133af314cb934ceba00075191df75ad05ab84c9 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 16 Jun 2002 10:48:19 +0000 Subject: [PATCH] new script --- lang/sync_lang.sh | 124 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100755 lang/sync_lang.sh diff --git a/lang/sync_lang.sh b/lang/sync_lang.sh new file mode 100755 index 000000000..f18ca06a4 --- /dev/null +++ b/lang/sync_lang.sh @@ -0,0 +1,124 @@ +#!/bin/sh +## +# Shell script that synchronises all translations in phpMyAdmin +## +# Written by Michal Cihar +## + + +## +# 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 + iconv -f $src_charset -t $charset $base.inc.php3| grep -v allow_recoding > $file + echo done + else + # just convert + iconv -f $src_charset -t $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 +