Révision 1317
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/PluginMessagesManager.java (revision 1317) | ||
---|---|---|
801 | 801 |
} |
802 | 802 |
} |
803 | 803 |
|
804 |
//System.out.println("M+ "+oldName+" -> "+newName); |
|
804 | 805 |
keyModifications.put(oldName, newName); |
805 | 806 |
} |
806 | 807 |
|
tmp/org.txm.translate.rcp/src/org/txm/rcp/translate/i18n/WorkspaceMessagesManager.java (revision 1317) | ||
---|---|---|
179 | 179 |
Collections.sort(plugins, new Comparator<PluginMessagesManager>() { |
180 | 180 |
@Override |
181 | 181 |
public int compare(PluginMessagesManager arg0, PluginMessagesManager arg1) { |
182 |
return arg0.getMessageName().length() - arg1.getMessageName().length();
|
|
182 |
return arg1.getMessageName().length() - arg0.getMessageName().length();
|
|
183 | 183 |
} |
184 | 184 |
|
185 | 185 |
}); |
... | ... | |
190 | 190 |
String name = pm.getMessageClassName(); |
191 | 191 |
|
192 | 192 |
for (String old : modifs.keySet()) { |
193 |
modifications.put(pm.getKeyFullName(old), name+"."+modifs.get(old)); // prefix the key with class name: Key -> XXXMessages.Key used in sources
|
|
193 |
modifications.put(pm.getKeyFullName(old), pm.getKeyFullName(modifs.get(old))); // prefix the key with class name: Key -> XXXMessages.Key used in sources
|
|
194 | 194 |
} |
195 | 195 |
} |
196 | 196 |
|
... | ... | |
201 | 201 |
Collections.sort(keys, new Comparator<String>() { |
202 | 202 |
@Override |
203 | 203 |
public int compare(String arg0, String arg1) { |
204 |
return arg0.length() - arg1.length();
|
|
204 |
return arg1.length() - arg0.length();
|
|
205 | 205 |
} |
206 | 206 |
}); |
207 | 207 |
|
... | ... | |
214 | 214 |
if (index.containsKey(oldKey)) { |
215 | 215 |
TreeSet<File> files = index.get(oldKey); |
216 | 216 |
if (files.size() > 0) { |
217 |
System.out.println("REPLACE IN SOURCE FILES THE KEY="+oldKey+" BY KEY="+modifications.get(oldKey));
|
|
217 |
System.out.println("Replace KEY="+oldKey+" BY KEY="+modifications.get(oldKey));
|
|
218 | 218 |
for (File srcFile : files) { |
219 | 219 |
System.out.println(" "+srcFile+" "+oldKey+" -> "+modifications.get(oldKey)); |
220 | 220 |
IOUtils.replaceAll(srcFile, oldKey, modifications.get(oldKey)); |
Formats disponibles : Unified diff