[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-395-g4862806

Michal Čihař nijel at users.sourceforge.net
Fri Mar 12 14:00:41 CET 2010


The branch, gettext has been updated
       via  486280626a298d3126e97f32b130b0e8895177a6 (commit)
       via  ba106a107a958f19003c2e83dfc72f297279e460 (commit)
       via  2efb431b5ce2b80f77db7b3ee4b714f5b9de0f65 (commit)
       via  c4bdb187033c908982e814af1b254d28ab3b1d3e (commit)
       via  105c33fe34136245ba47e36660000c882adc4052 (commit)
      from  4606ddf16f1c7c6247134e3b1ceafe4204b7d335 (commit)


- Log -----------------------------------------------------------------
commit 486280626a298d3126e97f32b130b0e8895177a6
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Mar 12 14:00:11 2010 +0100

    Adjus languages cleanup for gettext.

commit ba106a107a958f19003c2e83dfc72f297279e460
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Mar 12 13:50:07 2010 +0100

    Message for generating mo files.

commit 2efb431b5ce2b80f77db7b3ee4b714f5b9de0f65
Merge: 4606ddf16f1c7c6247134e3b1ceafe4204b7d335 c4bdb187033c908982e814af1b254d28ab3b1d3e
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Mar 12 13:49:50 2010 +0100

    Merge branch 'master' into gettext

-----------------------------------------------------------------------

Summary of changes:
 scripts/create-release.sh |   22 +++++++++++----
 scripts/lang-cleanup.sh   |   64 ++++++++++----------------------------------
 2 files changed, 31 insertions(+), 55 deletions(-)

diff --git a/scripts/create-release.sh b/scripts/create-release.sh
index 51ff185..8c321be 100755
--- a/scripts/create-release.sh
+++ b/scripts/create-release.sh
@@ -93,6 +93,7 @@ fi
 LC_ALL=C date -u > RELEASE-DATE-${version}
 
 # Building Documentation.txt
+echo "* Generating Documentation.txt"
 LC_ALL=C w3m -dump Documentation.html > Documentation.txt
 
 # Check for gettext support
@@ -104,6 +105,7 @@ fi
 
 # Generate mo files
 if [ $GETTEXT -eq 1 ] ; then
+    echo "* Generating mo files"
     ./scripts/generate-mo
 fi
 
@@ -131,28 +133,28 @@ for kit in $KITS ; do
     for comp in $COMPRESSIONS ; do
         case $comp in
             tbz|tgz)
-                echo "Creating $name.tar"
+                echo "* Creating $name.tar"
                 tar cf $name.tar $name
                 if [ $comp = tbz ] ; then
-                    echo "Creating $name.tar.bz2"
+                    echo "* Creating $name.tar.bz2"
                     bzip2 -9k $name.tar
                 fi
                 if [ $comp = tgz ] ; then
-                    echo "Creating $name.tar.gz"
+                    echo "* Creating $name.tar.gz"
                     gzip -9c $name.tar > $name.tar.gz
                 fi
                 rm $name.tar
                 ;;
             zip)
-                echo "Creating $name.zip"
+                echo "* Creating $name.zip"
                 zip -q -9 -r $name.zip $name
                 ;;
             zip-7z)
-                echo "Creating $name.zip"
+                echo "* Creating $name.zip"
                 7za a -bd -tzip $name.zip $name > /dev/null
                 ;;
             7z)
-                echo "Creating $name.7z"
+                echo "* Creating $name.7z"
                 7za a -bd $name.7z $name > /dev/null
                 ;;
             *)
@@ -190,6 +192,14 @@ if [ $# -gt 0 ] ; then
                 tagname=RELEASE_`echo $version | tr . _ | tr '[:lower:]' '[:upper:]' | tr -d -`
                 echo "* Tagging release as $tagname"
                 git tag -a -m "Released $version" $tagname $branch
+                if echo $version | grep '[a-z_-]' ; then
+                    echo "* Tagging release as TESTING"
+                    git tag -a -f -m "Released $version" TESTING $branch
+                else
+                    echo "* Tagging release as STABLE"
+                    git tag -a -f -m "Released $version" STABLE $branch
+                fi
+                echo "   Dont forget to push tags using: git push --tags"
                 ;;
             *)
                 echo "Unknown parameter: $1!"
diff --git a/scripts/lang-cleanup.sh b/scripts/lang-cleanup.sh
index d8688e9..b09674f 100755
--- a/scripts/lang-cleanup.sh
+++ b/scripts/lang-cleanup.sh
@@ -6,71 +6,37 @@
 # Script for removing language selection from phpMyAdmin
 
 if [ $# -lt 1 ] ; then
-    echo "Usage: lang-cleanup.sh type ..."
+    echo "Usage: lang-cleanup.sh type"
     echo "Type can be one of:"
     echo "  all-languages - nothing will be done"
-    echo "  all-languages-utf-8-only - non utf-8 languages will be deleted"
-    echo "  language - keeps utf-8 version of language"
-    echo "  language-charset - keeps this exact language"
+    echo "  english - no translations will be kept"
+    echo "  langcode - keeps language"
     echo
-    echo "Types can be entered multiple times, all matched languages will be kept"
+    echo "Languages can be scpecified multiple times"
     exit 1
 fi
 
-# Construct expressions for find
+# Expression for find
 match=""
 for type in "$@" ; do
     case $type in
         all-languages)
-            match="$match -and -false"
+            exit 0
             ;;
-        all-languages-utf-8-only)
-            match="$match -and -not -name *-utf-8.inc.php"
+        english)
+            rm -rf po
+            rm -rf locale
+            exit 0
             ;;
         *)
-            if [ -f lang/$type-utf-8.inc.php ] ; then
-                match="$match -and -not -name $type-utf-8.inc.php"
-            elif [ -f lang/$type.inc.php ] ; then
-                match="$match -and -not -name $type.inc.php"
-            else
-                echo "ERROR: $type seems to be wrong!"
-                exit 2
-            fi
+            match="$match -and -not -name $type.po -and -not -path locale/$type/LC_MESSAGES/phpmyadmin.mo"
             ;;
     esac
 done
 
 # Delete unvanted languages
-find lang -name \*.inc.php $match -print0 | xargs -0r rm
-
-# Cleanup libraries/select_lang.lib.php
-
-# Find languages we have
-langmatch="$(awk -F, \
-    'BEGIN { pr = 1 } ; 
-    /^\);/ { pr = 1 } ; 
-    {if(!pr) print $2;}; 
-    /^\$available_languages/ { pr = 0 };' \
-    libraries/select_lang.lib.php \
-    | tr -d \' \
-    | while read lng ; do if [ -f lang/$lng.inc.php ] ; then echo $lng ; fi ; done \
-    | tr '\n' '|' \
-    | sed 's/|$//' \
-    )"
-
-# Prepare working copy
-tmp=`mktemp libraries/select_lang.lib.php.XXXX`
-cat libraries/select_lang.lib.php > $tmp
-
-# Remove languages we don't have
-awk -F, \
-    'BEGIN { pr = 1 } ; 
-    /^\);/ { pr = 1 } ; 
-    {if(pr) print $0;}; 
-    /'$langmatch'/ {if (!pr) print $0;};
-    /^\$available_languages/ { pr = 0 };' \
-    $tmp > libraries/select_lang.lib.php
-
-# Final cleanup
-rm -f $tmp
+find po locale -type f $match -print0 | xargs -0r rm
 
+# Delete empty directories
+rmdir --ignore-fail-on-non-empty locale/*/*
+rmdir --ignore-fail-on-non-empty locale/*


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list