[Fusionforge-commits] r7897 - trunk/tools

Christian Bayle cbayle at libremir.placard.fr.eu.org
Mon Jun 22 00:18:13 CEST 2009


Author: cbayle
Date: 2009-06-22 00:18:13 +0200 (Mon, 22 Jun 2009)
New Revision: 7897

Modified:
   trunk/tools/tab2gettext.sh
Log:
Some verbosity and improvement


Modified: trunk/tools/tab2gettext.sh
===================================================================
--- trunk/tools/tab2gettext.sh	2009-06-21 21:08:22 UTC (rev 7896)
+++ trunk/tools/tab2gettext.sh	2009-06-21 22:18:13 UTC (rev 7897)
@@ -45,22 +45,30 @@
 			case $strn in
 				*\$*)
 					strns=`echo "$strn" | sed 's/\$./%s/g'` 
-					newstrn="gettext(\"$strns\","
+				#	newstrn="gettext(\"$strns\","
+					newstrn="gettext(\"$strns\""
 					#grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS.*('$1'.*'$2',\).*/\1/"| sort -u | while read oldstrn
-					grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\].[^(]*('$1'.*'$2',\).*/\1/"| sort -u | while read oldstrn
+					#grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\]->getText('$1'.[^']*'$2',\).*/\1/"| sort -u | while read oldstrn
+					#set -x
+					grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\]->getText('$1'.[^']*'$2'\).*/\1/"| sort -u | while read oldstrn
 					do
 						#echo "== \$$oldstrn ==> $newstrn =="
 						substitute "$oldstrn" "$newstrn" "$3"
 					done
+					#set +x
 					;;
 				*)
-					newstrn="gettext(\"$strn\")"
+				#	newstrn="gettext(\"$strn\")"
+					newstrn="gettext(\"$strn\""
 					#grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS.*('$1'.*'$2')\).*/\1/"| sort -u | while read oldstrn
-					grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\].[^(]*('$1'.*'$2')\).*/\1/"| sort -u | while read oldstrn
+					#grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\]->getText('$1'.[^']*'$2')\).*/\1/"| sort -u | while read oldstrn
+					#set -x
+					grep "'$1'.*'$2'" $file | sed "s/.*\(GLOBALS\['Language'\]->getText('$1'.[^']*'$2'\).*/\1/"| sort -u | while read oldstrn
 					do
 						#echo "== \$$oldstrn ==> $newstrn =="
 						substitute "$oldstrn" "$newstrn" "$3"
 					done
+					#set +x
 					;;
 				
 			esac
@@ -105,8 +113,8 @@
 			echo "======== $file ========"
 		fi
 		found="1"		
+		echo  "-- $key1 -- $key2 --"
 		decode $key1 $key2 $file
-		#echo  "$key1 $key2"
 	done
 	if [ "$found" = "1" ] 
 	then




More information about the Fusionforge-commits mailing list