Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizerUI.groovy	(revision 3447)
@@ -21,7 +21,7 @@
 	ExternalizeUI() {
 		super(new FlowLayout());
 		File userDir = new File(System.getProperty("user.home"))
-		File srcDir = new File(userDir, "workspace47/org.txm.rcp/src/main/java")
+		File srcDir = new File(userDir, "workspace047/org.txm.rcp/src/main/java")
 		File propFile = new File(srcDir, "org/txm/rcp/messages.properties")
 		File messageFile = new File(srcDir, "org/txm/rcp/Messages.java")
 
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FindUntranslatedMessages.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FindUntranslatedMessages.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/FindUntranslatedMessages.groovy	(revision 3447)
@@ -3,7 +3,7 @@
 import org.txm.scripts.scripts.i18n.ExternalizationFilesUpdater
 
 def userdir = System.getProperty("user.home")
-def workspace = new File(userdir, "workspace47")
+def workspace = new File(userdir, "workspace047")
 def langs = ["fr", "ru"]
 
 		scanner = new ExternalizationFilesUpdater();
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/Merge2PropertiesFile.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/Merge2PropertiesFile.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/Merge2PropertiesFile.groovy	(revision 3447)
@@ -1,7 +1,7 @@
 package org.txm.scripts.scripts.i18n
 
-File propFile1 = new File("/home/mdecorde/workspace43/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
-File propFile2 = new File("/home/mdecorde/workspace43/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
+File propFile1 = new File("/home/mdecorde/workspace047/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
+File propFile2 = new File("/home/mdecorde/workspace047/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
 
 Properties props1 = new Properties()
 props1.load(propFile1.newReader("iso-8859-1"))
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ReverseI18nDict.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ReverseI18nDict.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ReverseI18nDict.groovy	(revision 3447)
@@ -114,8 +114,8 @@
 	}
 	
 	public static void main(String[] args) {
-		File propFile = new File("/home/mdecorde/workspace43/org.txm.core/src/java/org/txm/messages.properties")
-		File messageFile = new File("/home/mdecorde/workspace43/org.txm.core/src/java/org/txm/Messages.java")
+		File propFile = new File("/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/messages.properties")
+		File messageFile = new File("/home/mdecorde/workspace047/org.txm.core/src/java/org/txm/Messages.java")
 		ReverseI18nDict dict = new ReverseI18nDict(propFile, messageFile);
 		println dict.getMissingsMessageKeys()
 		println dict.getMissingPropKeys();
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringMissingInPlugin.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringMissingInPlugin.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringMissingInPlugin.groovy	(revision 3447)
@@ -10,9 +10,9 @@
 	
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home")
-		File propertyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties");
-		File copyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_copy.properties");
-		File pluginFile = new File(userhome, "workspace43/org.txm.rcp/plugin.xml");
+		File propertyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties");
+		File copyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_copy.properties");
+		File pluginFile = new File(userhome, "workspace047/org.txm.rcp/plugin.xml");
 		if (!(propertyFile.exists() && propertyFile.canRead() && propertyFile.canWrite() && propertyFile.isFile()))
 		{
 			println "error file : "+propertyFile
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizationFilesUpdater.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizationFilesUpdater.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/ExternalizationFilesUpdater.groovy	(revision 3447)
@@ -304,7 +304,7 @@
 		println "\nTOOLBOX\n";
 		
 		scanner = new ExternalizationFilesUpdater();
-		scanner.scanDirectory(new File(userdir, "workspace43/org.txm.rcp/src/main/java"));
+		scanner.scanDirectory(new File(userdir, "workspace047/org.txm.rcp/src/main/java"));
 		scanner.createMissingFiles("fr");
 		scanner.createMissingFiles("ru");
 		scanner.processFoundDirectories();
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/I18nDiff.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/I18nDiff.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/I18nDiff.groovy	(revision 3447)
@@ -75,8 +75,8 @@
 
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home");
-		File f1 = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle.properties")
-		File f2 = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties")
+		File f1 = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle.properties")
+		File f2 = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties")
 		
 		I18nDiff diff = new I18nDiff(f1, f2);
 		diff.synchronizeFromF1toF2()
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringUsedInPlugin.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringUsedInPlugin.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/i18n/IsStringUsedInPlugin.groovy	(revision 3447)
@@ -52,8 +52,8 @@
 
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home")
-		File propertyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle.properties");
-		File pluginFile = new File(userhome, "workspace43/org.txm.rcp/plugin.xml");
+		File propertyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle.properties");
+		File pluginFile = new File(userhome, "workspace047/org.txm.rcp/plugin.xml");
 		IsStringUsedInPlugin fixer = new IsStringUsedInPlugin();
 		//uncomment to remove unused Strings
 		if (fixer.scan(propertyFile, pluginFile)) {
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/setup/BuildFeatureFromProduct.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/setup/BuildFeatureFromProduct.groovy	(revision 3446)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/setup/BuildFeatureFromProduct.groovy	(revision 3447)
@@ -3,8 +3,8 @@
 import groovy.xml.*
 
 String home = System.getProperty("user.home")
-File rcpSrc = new File(home, "workspace43/org.txm.rcp")
-File rcpFeatureSrc = new File(home, "workspace43/org.txm.rcp.feature")
+File rcpSrc = new File(home, "workspace047/org.txm.rcp")
+File rcpFeatureSrc = new File(home, "workspace047/org.txm.rcp.feature")
 File productFile = new File(rcpSrc, "rcp.product")
 File featureFile = new File(rcpFeatureSrc, "feature.xml")
 //File featureFileBackUp = new File(rcpFeatureSrc, "feature_back.xml")
Index: TXM/trunk/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties
===================================================================
--- TXM/trunk/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties	(revision 3446)
+++ TXM/trunk/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties	(revision 3447)
@@ -1,4 +1,4 @@
-#/home/mdecorde/workspace43/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties + /home/mdecorde/workspace43/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties
+#/home/mdecorde/workspace047/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties + /home/mdecorde/workspace047/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties
 #Tue Apr 15 11:45:28 CEST 2014
 QueryableMetadataRepositoryManager_LoadRepositoryProgress=Prise de contact avec {0}
 RevertIUCommandTooltip=Revenir � une pr�c�dente configuration install�e
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.groovy	(revision 3447)
@@ -1,315 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-
-//
-// This file is part of the TXM platform.
-//
-// The TXM platform is free software: you can redistribute it and/or modif y
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The TXM platform is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
-// 
-// 
-// 
-// $LastChangedDate: 2013-07-25 16:24:13 +0200 (jeu. 25 juil. 2013) $
-// $LastChangedRevision: 2490 $
-// $LastChangedBy: mdecorde $ 
-//
-package org.txm.rcp.translate.i18n;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.util.LinkedList;
-
-import org.txm.utils.io.IOUtils
-
-// TODO: Auto-generated Javadoc
-/**
- * Tool to update the key of externalization files xxxx_fr.properties
- * adds _NA to missing keys
- * 
- * @author mdecorde
- * 
- */
-public class ExternalizationFilesUpdater {
-
-	/** The dirfiles. */
-	LinkedList<File> dirfiles = new LinkedList<File>();
-	
-	/** The propertyfiles. */
-	HashMap<String, File> propertyfiles = new HashMap<String, File>();
-	
-	/** The fileentries. */
-	HashMap<File, List<String>> fileentries = new HashMap<String, List<String>>();
-	
-	/** The fileentriesvalues. */
-	HashMap<File, HashMap<String, String>> fileentriesvalues = new HashMap<String, HashMap<String, String>>();
-
-	/**
-	 * Gets the entries.
-	 *
-	 * @param file the file
-	 * @return the entries
-	 */
-	public List<String> getEntries(File file)
-	{
-		List<String> entries = [];
-		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file) , "iso-8859-1"));
-		String line = reader.readLine();
-		while (line != null) {
-			String[] split = line.split("=", 2);
-			if (split.length > 0) {
-				String key = split[0];
-				entries.add(key);
-			}
-			line = reader.readLine();
-		}
-		return entries;
-	}
-
-	/**
-	 * Gets the values.
-	 *
-	 * @param file the file
-	 * @return the values
-	 */
-	public HashMap<String, String> getValues(File file) {
-		HashMap<String, String> values = new HashMap<String, String>();
-		BufferedReader reader = new BufferedReader(new InputStreamReader(
-				new FileInputStream(file), "iso-8859-1"));
-		String line = reader.readLine();
-		while (line != null) {
-			String[] split = line.split("=");
-			if (split.length > 0) {
-				String key = split[0];
-				String concat = "";
-				for (int i = 1; i < split.length; i++)
-					concat += split[i];
-				values.put(key, concat);
-			}
-			line = reader.readLine();
-		}
-		return values;
-	}
-
-	/**
-	 * Process found directories.
-	 */
-	public void processFoundDirectories()
-	{
-		for (String dirfile : dirfiles) {
-			println "DIRECTORY : "+dirfile
-			List<File> files = propertyfiles.get(dirfile)
-			for (File f : files) {
-				this.fileentries.put(f, getEntries(f));
-				this.fileentriesvalues.put(f, getValues(f));
-			}
-			File reference = null;
-			if (files.get(0).getName().startsWith("m")) {
-				reference = new File(dirfile,"messages.properties");
-			}
-			else if (files.get(0).getName().startsWith("b"))
-				reference = new File(dirfile,"bundle.properties");
-			
-			if (reference != null && reference.exists()) {
-				for (File f : files) {
-					if (f != reference) {
-						List<String> refentries = this.fileentries.get(reference).clone();
-						List<String> tmp1 = this.fileentries.get(f).clone();
-						tmp1.removeAll(refentries);
-						
-						refentries = this.fileentries.get(reference).clone();
-						List<String> tmp = this.fileentries.get(f);
-						refentries.removeAll(tmp);
-						for (String missing : refentries) {
-							this.fileentriesvalues.get(f).put(missing,"N/A_"+this.fileentriesvalues.get(reference).get(missing)); // put entry's value
-						}
-						
-						this.fileentries.put(f, this.fileentries.get(reference)); // update file entries
-						
-						if (tmp1.size() > 0 || refentries.size() > 0)
-							println " "+f.getName()
-						if (tmp1.size() > 0)
-							println "  Removed keys : "+tmp1;
-						if (refentries.size() > 0)
-							println "  Added keys : "+refentries;
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Update files.
-	 */
-	public void updateFiles()
-	{
-		for(String dirfile : dirfiles)
-		{
-			List<File> files = propertyfiles.get(dirfile);
-			for(File f : files)
-			{
-				List<String> entries =  this.fileentries.get(f);
-				HashMap<String, String> values = this.fileentriesvalues.get(f);
-				
-				Writer writer = new OutputStreamWriter(new FileOutputStream(f) , "iso-8859-1");
-				for(String entry : entries)
-				{
-					writer.write(entry+"="+values.get(entry)+"\n");
-				}
-				writer.close()
-			}
-		}
-	}
-
-	/**
-	 * Creates the missing files.
-	 *
-	 * @param suffix the suffix
-	 */
-	public void createMissingFiles(String suffix)
-	{
-		println "Looking for missing messages files "+ suffix;
-		for(String dirfile : dirfiles)
-		{
-			//println "DIRECTORY : "+dirfile
-			File reference = null;
-			String lookingname = "";
-			List<File> files = propertyfiles.get(dirfile)
-			if(files.get(0).getName().startsWith("m"))
-			{
-				reference = new File(dirfile,"messages.properties");
-				lookingname = "messages_"+suffix+".properties"
-			}
-			else if (files.get(0).getName().startsWith("b"))
-			{
-				reference = new File(dirfile,"bundle.properties");
-				lookingname = "bundle_"+suffix+".properties"
-			}
-			
-			boolean create = true;
-			if(reference != null && reference.exists())
-			{
-				for(File f : files)
-				{
-					if(f.getName() == lookingname)
-						create = false;
-				}
-			}
-			if(create)
-			{
-				new File(dirfile,lookingname).createNewFile();
-				println "Create file " +new File(dirfile,lookingname)
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString()
-	{
-		String rez = "";
-		for(String dirfile : dirfiles)
-		{
-			rez += dirfile+"\n";
-			for(File f : propertyfiles.get(dirfile))
-				rez += "  "+f.getName()+"\n"
-		}
-		return rez;
-	}
-
-	/**
-	 * Scan directory.
-	 *
-	 * @param directory the directory
-	 */
-	public void scanDirectory(File directory)
-	{
-		if(!directory.exists())
-		{
-			println "directory '$directory' does not exists"
-			return;
-		}
-		
-		println "scan directory : "+directory.getAbsolutePath();
-		LinkedList<File> files = new LinkedList<File>();
-		files.add(directory);
-		
-		while(!files.isEmpty())
-		{
-			File current = files.removeFirst();
-			if(current.isDirectory())
-			{
-				List<String> currentpfiles = [];
-				for(File sfile : current.listFiles(IOUtils.HIDDENFILE_FILTER))
-				{
-					if(sfile.isDirectory())
-						files.add(sfile);
-					else if(sfile.getName().endsWith(".properties") && ( sfile.getName().startsWith("messages") || sfile.getName().startsWith("bundle")) )
-						currentpfiles.add(sfile)
-				}
-				if(currentpfiles.size() > 0)
-				{
-					dirfiles.add(current.getAbsolutePath());
-					propertyfiles.put(current.getAbsolutePath(), currentpfiles);
-				}
-			}
-		}
-	}
-
-	/**
-	 * The main method.
-	 *
-	 * @param args the arguments
-	 */
-	public static void main(String[] args)
-	{
-		String userdir = System.getProperty("user.home");
-
-		println "\nRCP\n";
-		
-		ExternalizationFilesUpdater scanner = new ExternalizationFilesUpdater();
-//		scanner.scanDirectory(new File(userdir, "workspace37/org.txm.rcp")); // find directories with a messages.properties file
-//		scanner.createMissingFiles("fr"); // create messages_fr.properties files when a messages.properties is found
-//		scanner.processFoundDirectories(); // find missing and obsolets keys
-//		scanner.updateFiles(); // update messages files content
-		
-		println "\nTOOLBOX\n";
-		
-		scanner = new ExternalizationFilesUpdater();
-		scanner.scanDirectory(new File(userdir, "workspace43/org.txm.rcp/src/main/java"));
-		scanner.createMissingFiles("fr");
-		scanner.createMissingFiles("ru");
-		scanner.processFoundDirectories();
-		scanner.updateFiles();
-	}
-}
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.groovy	(revision 3447)
@@ -1,15 +0,0 @@
-package org.txm.rcp.translate.i18n
-
-import org.txm.rcp.translate.i18n.ExternalizationFilesUpdater
-
-def userdir = System.getProperty("user.home")
-def workspace = new File(userdir, "workspace47")
-def langs = ["fr", "ru"]
-
-		scanner = new ExternalizationFilesUpdater();
-		scanner.scanDirectory(new File(workspace, "org.txm.rcp"));
-		for (def lang : langs) {
-			scanner.createMissingFiles(lang);
-		}
-		scanner.processFoundDirectories();
-		scanner.updateFiles();
\ No newline at end of file
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringMissingInPlugin.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringMissingInPlugin.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringMissingInPlugin.groovy	(revision 3447)
@@ -10,9 +10,9 @@
 	
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home")
-		File propertyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties");
-		File copyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_copy.properties");
-		File pluginFile = new File(userhome, "workspace43/org.txm.rcp/plugin.xml");
+		File propertyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties");
+		File copyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_copy.properties");
+		File pluginFile = new File(userhome, "workspace047/org.txm.rcp/plugin.xml");
 		if (!(propertyFile.exists() && propertyFile.canRead() && propertyFile.canWrite() && propertyFile.isFile()))
 		{
 			println "error file : "+propertyFile
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.java
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.java	(revision 0)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizationFilesUpdater.java	(revision 3447)
@@ -0,0 +1,323 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+
+//
+// This file is part of the TXM platform.
+//
+// The TXM platform is free software: you can redistribute it and/or modif y
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// The TXM platform is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
+// 
+// 
+// 
+// $LastChangedDate: 2013-07-25 16:24:13 +0200 (jeu. 25 juil. 2013) $
+// $LastChangedRevision: 2490 $
+// $LastChangedBy: mdecorde $ 
+//
+package org.txm.rcp.translate.i18n;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.txm.utils.io.IOUtils;
+
+// TODO: Auto-generated Javadoc
+/**
+ * Tool to update the key of externalization files xxxx_fr.properties
+ * adds _NA to missing keys
+ * 
+ * @author mdecorde
+ * 
+ */
+public class ExternalizationFilesUpdater {
+
+	/** The dirfiles. */
+	LinkedList<File> dirfiles = new LinkedList<File>();
+	
+	/** The propertyfiles. */
+	HashMap<File, List<File>> propertyfiles = new HashMap<File, List<File>>();
+	
+	/** The fileentries. */
+	HashMap<File, List<String>> fileentries = new HashMap<File, List<String>>();
+	
+	/** The fileentriesvalues. */
+	HashMap<File, HashMap<String, String>> fileentriesvalues = new HashMap<File, HashMap<String, String>>();
+
+	/**
+	 * Gets the entries.
+	 *
+	 * @param file the file
+	 * @return the entries
+	 * @throws IOException 
+	 */
+	public List<String> getEntries(File file) throws IOException
+	{
+		List<String> entries = new ArrayList<>();
+		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file) , "iso-8859-1"));
+		String line = reader.readLine();
+		while (line != null) {
+			String[] split = line.split("=", 2);
+			if (split.length > 0) {
+				String key = split[0];
+				entries.add(key);
+			}
+			line = reader.readLine();
+		}
+		reader.close();
+		return entries;
+	}
+
+	/**
+	 * Gets the values.
+	 *
+	 * @param file the file
+	 * @return the values
+	 * @throws IOException 
+	 */
+	public HashMap<String, String> getValues(File file) throws IOException {
+		HashMap<String, String> values = new HashMap<String, String>();
+		BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "iso-8859-1"));
+		String line = reader.readLine();
+		while (line != null) {
+			String[] split = line.split("=");
+			if (split.length > 0) {
+				String key = split[0];
+				String concat = "";
+				for (int i = 1; i < split.length; i++)
+					concat += split[i];
+				values.put(key, concat);
+			}
+			line = reader.readLine();
+		}
+		return values;
+	}
+
+	/**
+	 * Process found directories.
+	 * @throws IOException 
+	 */
+	public void processFoundDirectories() throws IOException
+	{
+		for (File dirfile : dirfiles) {
+			System.out.println("DIRECTORY : "+dirfile);
+			List<File> files = propertyfiles.get(dirfile);
+			for (File f : files) {
+				this.fileentries.put(f, getEntries(f));
+				this.fileentriesvalues.put(f, getValues(f));
+			}
+			File reference = null;
+			if (files.get(0).getName().startsWith("m")) {
+				reference = new File(dirfile,"messages.properties");
+			}
+			else if (files.get(0).getName().startsWith("b"))
+				reference = new File(dirfile,"bundle.properties");
+			
+			if (reference != null && reference.exists()) {
+				for (File f : files) {
+					if (f != reference) {
+						List<String> refentries = new ArrayList<>(fileentries.get(reference));
+						List<String> tmp1 = new ArrayList<>(this.fileentries.get(f));
+						tmp1.removeAll(refentries);
+						
+						refentries = new ArrayList<>(this.fileentries.get(reference));
+						List<String> tmp = this.fileentries.get(f);
+						refentries.removeAll(tmp);
+						for (String missing : refentries) {
+							this.fileentriesvalues.get(f).put(missing,"N/A_"+this.fileentriesvalues.get(reference).get(missing)); // put entry's value
+						}
+						
+						this.fileentries.put(f, this.fileentries.get(reference)); // update file entries
+						
+						if (tmp1.size() > 0 || refentries.size() > 0)
+							System.out.println( " "+f.getName());
+						if (tmp1.size() > 0)
+							System.out.println("  Removed keys : "+tmp1);
+						if (refentries.size() > 0)
+							System.out.println("  Added keys : "+refentries);
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Update files.
+	 * @throws IOException 
+	 */
+	public void updateFiles() throws IOException
+	{
+		for(File dirfile : dirfiles)
+		{
+			List<File> files = propertyfiles.get(dirfile);
+			for(File f : files)
+			{
+				List<String> entries =  this.fileentries.get(f);
+				HashMap<String, String> values = this.fileentriesvalues.get(f);
+				
+				Writer writer = new OutputStreamWriter(new FileOutputStream(f) , "iso-8859-1");
+				for(String entry : entries)
+				{
+					writer.write(entry+"="+values.get(entry)+"\n");
+				}
+				writer.close();
+			}
+		}
+	}
+
+	/**
+	 * Creates the missing files.
+	 *
+	 * @param suffix the suffix
+	 * @throws IOException 
+	 */
+	public void createMissingFiles(String suffix) throws IOException
+	{
+		System.out.println("Looking for missing messages files "+ suffix);
+		for(File dirfile : dirfiles) {
+			//println "DIRECTORY : "+dirfile
+			File reference = null;
+			String lookingname = "";
+			List<File> files = propertyfiles.get(dirfile);
+			if (files.get(0).getName().startsWith("m")) {
+				reference = new File(dirfile,"messages.properties");
+				lookingname = "messages_"+suffix+".properties";
+			}
+			else if (files.get(0).getName().startsWith("b"))
+			{
+				reference = new File(dirfile,"bundle.properties");
+				lookingname = "bundle_"+suffix+".properties";
+			}
+			
+			boolean create = true;
+			if (reference != null && reference.exists()) {
+				for(File f : files)
+				{
+					if(f.getName() == lookingname)
+						create = false;
+				}
+			}
+			if (create) {
+				new File(dirfile,lookingname).createNewFile();
+				System.out.println("Create file " +new File(dirfile,lookingname));
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		
+		String rez = "";
+		for(File dirfile : dirfiles) {
+			rez += dirfile+"\n";
+			for(File f : propertyfiles.get(dirfile))
+				rez += "  "+f.getName()+"\n";
+		}
+		return rez;
+	}
+
+	/**
+	 * Scan directory.
+	 *
+	 * @param directory the directory
+	 */
+	public void scanDirectory(File directory)
+	{
+		if (!directory.exists()) {
+			System.out.println("directory '$directory' does not exists");
+			return;
+		}
+		
+		System.out.println("scan directory : "+directory.getAbsolutePath());
+		LinkedList<File> files = new LinkedList<File>();
+		files.add(directory);
+		
+		while(!files.isEmpty()) {
+			
+			File current = files.removeFirst();
+			if (current.isDirectory()) {
+				List<File> currentpfiles = new ArrayList<>();
+				for(File sfile : current.listFiles(IOUtils.HIDDENFILE_FILTER))
+				{
+					if(sfile.isDirectory()) {
+						files.add(sfile);
+					} else if(sfile.getName().endsWith(".properties") && ( sfile.getName().startsWith("messages") || sfile.getName().startsWith("bundle")) ) {
+						currentpfiles.add(sfile);
+					}
+				}
+				if (currentpfiles.size() > 0) {
+					dirfiles.add(current);
+					propertyfiles.put(current, currentpfiles);
+				}
+			}
+		}
+	}
+
+	/**
+	 * The main method.
+	 *
+	 * @param args the arguments
+	 * @throws IOException 
+	 */
+	public static void main(String[] args) throws IOException
+	{
+		String userdir = System.getProperty("user.home");
+
+		System.out.println("\nRCP\n");
+		
+		ExternalizationFilesUpdater scanner = new ExternalizationFilesUpdater();
+//		scanner.scanDirectory(new File(userdir, "workspace37/org.txm.rcp")); // find directories with a messages.properties file
+//		scanner.createMissingFiles("fr"); // create messages_fr.properties files when a messages.properties is found
+//		scanner.processFoundDirectories(); // find missing and obsolets keys
+//		scanner.updateFiles(); // update messages files content
+		
+		System.out.println("\nTOOLBOX\n");
+		
+		scanner = new ExternalizationFilesUpdater();
+		scanner.scanDirectory(new File(userdir, "workspace047/org.txm.rcp/src/main/java"));
+		scanner.createMissingFiles("fr");
+		scanner.createMissingFiles("ru");
+		scanner.processFoundDirectories();
+		scanner.updateFiles();
+	}
+}
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/I18nDiff.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/I18nDiff.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/I18nDiff.groovy	(revision 3447)
@@ -75,8 +75,8 @@
 
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home");
-		File f1 = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle.properties")
-		File f2 = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties")
+		File f1 = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle.properties")
+		File f2 = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties")
 		
 		I18nDiff diff = new I18nDiff(f1, f2);
 		diff.synchronizeFromF1toF2()
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.java
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.java	(revision 0)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/FindUntranslatedMessages.java	(revision 3447)
@@ -0,0 +1,22 @@
+package org.txm.rcp.translate.i18n;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+public class FindUntranslatedMessages {
+	public static void main(String[] args) throws IOException {
+		String userdir = System.getProperty("user.home");
+		File workspace = new File(userdir, "workspace047");
+		List<String> langs = Arrays.asList("fr", "ru");
+
+		ExternalizationFilesUpdater scanner = new ExternalizationFilesUpdater();
+		scanner.scanDirectory(new File(workspace, "org.txm.rcp"));
+		for (String lang : langs) {
+			scanner.createMissingFiles(lang);
+		}
+		scanner.processFoundDirectories();
+		scanner.updateFiles();
+	}
+}
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringUsedInPlugin.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringUsedInPlugin.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/IsStringUsedInPlugin.groovy	(revision 3447)
@@ -52,8 +52,8 @@
 
 	public static void main(String[] args) {
 		String userhome = System.getProperty("user.home")
-		File propertyFile = new File(userhome, "workspace43/org.txm.rcp/OSGI-INF/l10n/bundle.properties");
-		File pluginFile = new File(userhome, "workspace43/org.txm.rcp/plugin.xml");
+		File propertyFile = new File(userhome, "workspace047/org.txm.rcp/OSGI-INF/l10n/bundle.properties");
+		File pluginFile = new File(userhome, "workspace047/org.txm.rcp/plugin.xml");
 		IsStringUsedInPlugin fixer = new IsStringUsedInPlugin();
 		//uncomment to remove unused Strings
 		if (fixer.scan(propertyFile, pluginFile)) {
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizerUI.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizerUI.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/ExternalizerUI.groovy	(revision 3447)
@@ -21,9 +21,9 @@
 	ExternalizeUI() {
 		super(new FlowLayout());
 		File userDir = new File(System.getProperty("user.home"))
-		File srcDir = new File(userDir, "workspace47/org.txm.rcp/src/main/java")
-		File propFile = new File(srcDir, "org/txm/rcp/messages.properties")
-		File messageFile = new File(srcDir, "org/txm/rcp/Messages.java")
+		File srcDir = new File(userDir, "workspace047/org.txm.rcp/src/main/java")
+		File propFile = new File(srcDir, "org/txm/rcp/messages/messages.properties")
+		File messageFile = new File(srcDir, "org/txm/rcp/messages/TXMUIMessages.java")
 
 		println userDir
 		println srcDir
Index: TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/Merge2PropertiesFile.groovy
===================================================================
--- TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/Merge2PropertiesFile.groovy	(revision 3446)
+++ TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/Merge2PropertiesFile.groovy	(revision 3447)
@@ -1,7 +1,7 @@
 package org.txm.rcp.translate.i18n
 
-File propFile1 = new File("/home/mdecorde/workspace43/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
-File propFile2 = new File("/home/mdecorde/workspace43/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
+File propFile1 = new File("/home/mdecorde/workspace047/org.eclipse.equinox.p2.ui.nl_fr/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
+File propFile2 = new File("/home/mdecorde/workspace047/org.txm.rcp.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages_fr.properties")
 
 Properties props1 = new Properties()
 props1.load(propFile1.newReader("iso-8859-1"))
