From bcf8206ff47af491a2b55a88a5a0fef7f741fd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 13 Oct 2004 08:59:36 +0000 Subject: [PATCH] Do not overwrite utf-8 files in some cases. --- ChangeLog | 5 ++++- lang/sync_lang.sh | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index af72c417c..a3d6c01c1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-10-13 Michal Čihař + * lang/sync_lang.sh: Do not overwrite utf-8 files in some cases. + 2004-10-12 Alexander M. Turek * db_search.php, tbl_select.php, libraries/database_interface.lib.php: - bug #1033388 (Illegal mix of collations for converted strings), @@ -29,7 +32,7 @@ $Source$ * libraries/export/sql.php: bug #1039639: under mysqli, some field types were wrongly exported as binary * libraries/sqlparser.lib.php, /display_tbl.lib.php: bug #967610, double - column sort with JOIN + column sort with JOIN 2004-10-11 Michal Čihař * tbl_query_box.php: Don't try to replace %t and %f when table name is empty. diff --git a/lang/sync_lang.sh b/lang/sync_lang.sh index 6007bcee9..e73b4075f 100755 --- a/lang/sync_lang.sh +++ b/lang/sync_lang.sh @@ -184,7 +184,12 @@ for base in $BASE_TRANSLATIONS ; do fi echo "$base [charset $src_charset]" - is_utf=no + # do we already have utf-8 translation? + if [ $src_charset = 'utf-8' ] ; then + is_utf=yes + else + is_utf=no + fi # at first update existing translations for file in $create_files ; do @@ -196,11 +201,12 @@ for base in $BASE_TRANSLATIONS ; do charset=$(echo $file | sed -e 's/^[^-]*-//' -e 's/\.inc\.php\?$//') fi + if [ $charset = 'utf-8' ] ; then + is_utf=yes + fi + # check whether we need to update translation if [ ! "$base.inc.php" -nt "$file" -a "$FORCE" -eq 0 -a -s "$file" ] ; then - if [ $charset = 'utf-8' ] ; then - is_utf=yes - fi echo " $file is not needed to update" continue fi