Revision 1305

tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/NormalizeKeys.java (revision 1305)
8 8
import java.util.HashMap;
9 9

  
10 10
import org.txm.rcp.translate.i18n.PluginMessagesManager;
11
import org.txm.rcp.translate.i18n.WorkspaceMessagesManager;
11 12

  
12 13
/**
13 14
 * Normalizes the keys using the words of the message sentence.
......
277 278
//			System.out.println("Done: no change.");
278 279
//		}		
279 280

  
280
		//File projectFile = new File(new File(System.getProperty("user.dir")).getParentFile().getAbsolutePath() + "/org.txm.core");
281
		File projectFile = new File(new File(System.getProperty("user.dir")).getParentFile().getAbsolutePath() + "/org.txm.ahc.core");
282
		PluginMessagesManager pmManager = new PluginMessagesManager(projectFile, true);
283
		keysNormalizer.normalize(pmManager);
281
		WorkspaceMessagesManager wmm = new WorkspaceMessagesManager(false);
282
		
283
		for (PluginMessagesManager pmManager : wmm.getPluginMessages().values()) {
284
			File projectFile = pmManager.getProjectDirectory();
285
			if (!projectFile.getName().equals("org.txm.ahc.core")) continue;
284 286
			
285
		//pm.saveChanges(true); // mode homme
286
		//pmManager.saveChanges(false);
287

  
287
			keysNormalizer.normalize(pmManager);
288
				
289
			pmManager.saveChanges(true); // mode homme
290
			//pmManager.saveChanges(false);
291
		}
288 292
		
293
		wmm.saveKeyModificationsInSources();
294
		
289 295
	}
290 296
}

Also available in: Unified diff