Delete empty localization templates + update the script to avoid generating them 14/4114/2
Sylvestre Ledru [Tue, 24 May 2011 16:08:21 +0000 (18:08 +0200)]
Change-Id: Ic7d82703a211e9e6036e50845b503508df4c2e23

scilab/modules/call_scilab/locales/call_scilab.pot [deleted file]
scilab/modules/commons/locales/commons.pot [deleted file]
scilab/modules/double/locales/double.pot [deleted file]
scilab/modules/texmacs/locales/texmacs.pot [deleted file]
scilab/modules/types/locales/types.pot [deleted file]
scilab/tools/localization/updateLocalizationModule.sh

diff --git a/scilab/modules/call_scilab/locales/call_scilab.pot b/scilab/modules/call_scilab/locales/call_scilab.pot
deleted file mode 100644 (file)
index a048222..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Localization of the module call_scilab
-# Please see in SCI/tools/localization for localization management
-# Copyright (C) 2007-2008 - INRIA
-# Copyright (C) 2008-2011 - DIGITEO
-# This file is distributed under the same license as the Scilab package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Scilab\n"
-"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
-"POT-Creation-Date: 2011-03-09 11:37+0100\n"
-"Last-Translator: Sylvestre Ledru <sylvestre.ledru@scilab.org>\n"
-"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Revision-Date: 2011-05-10 11:48+0100\n"
-
diff --git a/scilab/modules/commons/locales/commons.pot b/scilab/modules/commons/locales/commons.pot
deleted file mode 100644 (file)
index 3bf50da..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Localization of the module commons
-# Please see in SCI/tools/localization for localization management
-# Copyright (C) 2007-2008 - INRIA
-# Copyright (C) 2008-2011 - DIGITEO
-# This file is distributed under the same license as the Scilab package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Scilab\n"
-"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
-"POT-Creation-Date: 2011-03-09 11:38+0100\n"
-"Last-Translator: Sylvestre Ledru <sylvestre.ledru@scilab.org>\n"
-"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Revision-Date: 2011-05-10 11:48+0100\n"
-
diff --git a/scilab/modules/double/locales/double.pot b/scilab/modules/double/locales/double.pot
deleted file mode 100644 (file)
index d9a5d34..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Localization of the module double
-# Please see in SCI/tools/localization for localization management
-# Copyright (C) 2007-2008 - INRIA
-# Copyright (C) 2008-2011 - DIGITEO
-# This file is distributed under the same license as the Scilab package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Scilab\n"
-"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
-"POT-Creation-Date: 2011-03-09 11:38+0100\n"
-"Last-Translator: Sylvestre Ledru <sylvestre.ledru@scilab.org>\n"
-"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Revision-Date: 2011-05-10 11:48+0100\n"
-
diff --git a/scilab/modules/texmacs/locales/texmacs.pot b/scilab/modules/texmacs/locales/texmacs.pot
deleted file mode 100644 (file)
index f0ffd4f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Localization of the module texmacs
-# Please see in SCI/tools/localization for localization management
-# Copyright (C) 2007-2008 - INRIA
-# Copyright (C) 2008-2011 - DIGITEO
-# This file is distributed under the same license as the Scilab package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Scilab\n"
-"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
-"POT-Creation-Date: 2011-03-09 11:38+0100\n"
-"Last-Translator: Sylvestre Ledru <sylvestre.ledru@scilab.org>\n"
-"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Revision-Date: 2011-05-10 11:48+0100\n"
-
diff --git a/scilab/modules/types/locales/types.pot b/scilab/modules/types/locales/types.pot
deleted file mode 100644 (file)
index ae953f0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# Localization of the module types
-# Please see in SCI/tools/localization for localization management
-# Copyright (C) 2007-2008 - INRIA
-# Copyright (C) 2008-2011 - DIGITEO
-# This file is distributed under the same license as the Scilab package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Scilab\n"
-"Report-Msgid-Bugs-To: <localization@lists.scilab.org>\n"
-"POT-Creation-Date: 2011-03-09 11:38+0100\n"
-"Last-Translator: Sylvestre Ledru <sylvestre.ledru@scilab.org>\n"
-"Language-Team: Scilab Localization <localization@lists.scilab.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Revision-Date: 2011-05-10 11:48+0100\n"
-
index e9b8d30..2825e8e 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) INRIA - 2007-2008 - Sylvestre Ledru
 # Copyright (C) DIGITEO - 2009-2011 - Sylvestre Ledru
@@ -24,12 +24,12 @@ if test $# -ne 1; then
     echo "Syntax : $0 <module>"
     echo "If <module> is equal to 'process_all', it will parse all Scilab module"
     echo "per module"
-    exit -1
+    exit 42
 fi
 
 if test -z "$SCI"; then
     echo "Please define the variable SCI" 
-    exit -1
+    exit 42
 fi
 
 MODULES=$1
@@ -164,21 +164,12 @@ function process_module {
     else
         sed -e "s/MODULE/$MODULE_NAME/" -e "s/CREATION-DATE/$CreationDate/" -e "s/REVISION-DATE/`date +'%Y-%m-%d %H:%M'`$TIMEZONE/" $HEADER_TEMPLATE > $LOCALIZATION_FILE_US
     fi
-
-    if test -f $LOCALIZATION_FILE_US.tmp; then
-        cat $LOCALIZATION_FILE_US.tmp >> $LOCALIZATION_FILE_US
-        rm $LOCALIZATION_FILE_US.tmp 2> /dev/null
-    else
-        echo "$LOCALIZATION_FILE_US.tmp is empty (no string found)"
-    fi
-    
+    cat $LOCALIZATION_FILE_US.tmp >> $LOCALIZATION_FILE_US
+    rm $LOCALIZATION_FILE_US.tmp 2> /dev/null
     if test -z "$(msgcat $LOCALIZATION_FILE_US)"; then
-        echo "Empty localization template. Deleting $LOCALIZATION_FILE_US";
-
+        # empty template. Kill it!
         rm $LOCALIZATION_FILE_US
-        rmdir $TARGETDIR/
     fi
-    
 
     # Remove fake file used to extract string from XML
     rm $FAKE_C_FILE 2> /dev/null