Révision 1287

tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/NormalizeKeys.java (revision 1287)
72 72
			String newKeyOrig = normalize(messages.get(key));
73 73
			if (newKeyOrig.length() == 0) newKeyOrig = "EMPTY";
74 74
			
75
			if (value.equals(messages.get(newKeyOrig))) { // the newKey Value == the value
76
				//A=hello world
77
				//B=hello world
78
				// rename A -> helloWorld
79
				//B -> helloWorld SAUF QUE helloWorld existe ET meme valeur que valeur(B) valeur(helloWorld)
80

  
81
				pmManager.removeKey(key); // remove the old key
82
			} else {
75
//			if (value.equals(messages.get(newKeyOrig))) { // the newKey Value == the value
76
//				//A=hello world
77
//				//B=hello world
78
//				// rename A -> helloWorld
79
//				//B -> helloWorld SAUF QUE helloWorld existe ET meme valeur que valeur(B) valeur(helloWorld)
80
//
81
//				pmManager.removeKey(key); // remove the old key
82
//			} else {
83 83
				// A=hello world
84 84
				// B=hello world!
85 85
				// A et B n'ont pas la meme clé
......
87 87
				String newKey = ""+newKeyOrig;
88 88
				int c = 2;
89 89
				while (pmManager.getMessageKeys().contains(newKey)) {
90
					newKey += newKeyOrig+"_"+(c++);
90
					newKey = newKeyOrig+"_"+(c++);
91 91
				}
92 92

  
93 93
				pmManager.renameKey(key, newKey);
94
			}
94
//			}
95 95
			n++;
96 96
		}
97 97

  
......
235 235
		for (PluginMessagesManager pm : wmm.getPluginMessages().values()) {
236 236
			keysNormalizer.normalize(pm);
237 237
			
238
			pm.saveChanges(true);
238
			//pm.saveChanges(true);
239 239
		}
240 240

  
241
		wmm.saveKeyModificationsInSources();
241
		//wmm.saveKeyModificationsInSources();
242 242
	}
243 243
}

Formats disponibles : Unified diff