From 0977b64fb9e37a52264e1944e5f75f9cff418bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 18 Sep 2002 08:29:43 +0000 Subject: [PATCH] sync_lang.sh now accepts parameters --iconv/--recode for forcing used convertor --- ChangeLog | 2 ++ lang/sync_lang.sh | 36 ++++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index a52bf324f..7f46acfdf 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * lang/*.php3, tbl_properties_export.php3: removed duplicate message with typo in name strCvsData (replaced by strStrucCSV) * lang/czech-*.inc.php3: Updates. + * lang/sync_lang.sh: accepts parameters --iconv/--recode to force + convertor 2002-09-17 Marc Delisle * lang/spanish: update, thanks to Daniel Hinostroza diff --git a/lang/sync_lang.sh b/lang/sync_lang.sh index eb911dd71..80750e354 100755 --- a/lang/sync_lang.sh +++ b/lang/sync_lang.sh @@ -3,14 +3,17 @@ ## # Shell script that synchronises all translations in phpMyAdmin ## -# Any parameters will be passed to grep to filter processed translation, for -# example: './sync_lang.sh czech' will process only czech translation, -# './sync_lang.sh -e czech -e english' will process czech and english -# translations. +# Any parameters (except --iconv/--recode) will be passed to grep to filter +# processed translation, for example: './sync_lang.sh czech' will process only +# czech translation, './sync_lang.sh -e czech -e english' will process czech +# and english translations. ## # Written by Michal Cihar ## # Changes: +# 2002-09-18 +# * now accepts parameters --iconv/--recode for specifying which convertor +# to use # 2002-08-13 # * support for synchronisation only for selected language(s) # 2002-07-18 @@ -25,12 +28,25 @@ # 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" +case "$1" in + --iconv) + echo Using iconv on user request + CONVERTOR=iconv + CONVERTOR_PARAMS="-f %s -t %s" + shift + ;; + --recode) + echo Using recode on user request + CONVERTOR=recode + CONVERTOR_PARAMS="%s..%s" + shift + ;; + *) + echo Using recode as default, force with --iconv/--recode + CONVERTOR=recode + CONVERTOR_PARAMS="%s..%s" + ;; +esac ##