diff --git a/ChangeLog b/ChangeLog index 51110893e..6e4ae67cd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-07-17 Marc Delisle + * lang/sync_lang.sh: support for multiple convertors (recode added), + thanks to Michal Cihar + 2002-07-17 Alexander M. Turek * libraries/common.lib.php3, libraries/config_import.lib.php3: Added $cfg['PmaNoRelation_DisableWarning'] to the backwards compatibility code. diff --git a/lang/sync_lang.sh b/lang/sync_lang.sh index 4e7f54185..941d7ddb4 100755 --- a/lang/sync_lang.sh +++ b/lang/sync_lang.sh @@ -5,6 +5,19 @@ # 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 @@ -89,16 +102,16 @@ for base in $BASE_TRANSLATIONS ; do if [ $charset = 'utf-8' ] ; then # if we convert to utf-8, we should add allow_recoding is_utf=yes - iconv -f $src_charset -t $charset $base.inc.php3| sed -e "s/$src_charset/$charset/" -e '/\$charset/a\ + $CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| sed -e "s/$src_charset/$charset/" -e '/\$charset/a\ $allow_recoding = TRUE;' > $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 + $CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $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 + $CONVERTOR $(printf -- "$CONVERTOR_PARAMS" $src_charset $charset) < $base.inc.php3| sed "s/$src_charset/$charset/" > $file echo done fi done