Changeset 13793 in josm for trunk/scripts
- Timestamp:
- 2018-05-20T21:19:27+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/I18nSimilarStrings.java
r13761 r13793 3 3 import java.util.List; 4 4 5 import org.openstreetmap.josm.Main; 6 import org.openstreetmap.josm.data.Preferences; 7 import org.openstreetmap.josm.data.UndoRedoHandler; 8 import org.openstreetmap.josm.data.preferences.JosmBaseDirectories; 5 9 import org.openstreetmap.josm.data.validation.tests.SimilarNamedWays; 10 import org.openstreetmap.josm.gui.MainApplication; 11 import org.openstreetmap.josm.gui.MainApplicationTest; 12 import org.openstreetmap.josm.plugins.PluginHandlerTestIT; 13 import org.openstreetmap.josm.spi.preferences.Config; 6 14 import org.openstreetmap.josm.tools.I18n; 7 15 … … 19 27 public static void main(String[] args) { 20 28 I18n.init(); 29 Main.determinePlatformHook(); 30 Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance()); 31 Preferences pref = new Preferences(); 32 Config.setPreferencesInstance(pref); 33 pref.init(false); 34 MainApplication.undoRedo = new UndoRedoHandler(); 35 MainApplicationTest.initContentPane(); 36 MainApplicationTest.initToolbar(); 37 MainApplicationTest.initMainMenu(); 38 PluginHandlerTestIT.loadAllPlugins(); 21 39 List<String> strings = new ArrayList<>(); 22 40 strings.addAll(I18n.getSingularTranslations().keySet()); 23 41 strings.addAll(I18n.getPluralTranslations().keySet()); 24 System.out.println("Loaded " + strings.size() + " corestrings");42 System.out.println("Loaded " + strings.size() + " strings"); 25 43 strings.removeIf(s -> s.length() <= 5); 26 System.out.println("Kept " + strings.size() + " corestrings longer than 5 characters");44 System.out.println("Kept " + strings.size() + " strings longer than 5 characters"); 27 45 Collections.sort(strings); 28 46 for (int i = 0; i < strings.size(); i++) {
Note:
See TracChangeset
for help on using the changeset viewer.