- Timestamp:
- 2008-09-14T13:53:07+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r776 r966 206 206 * early plugins are loaded (before constructor). 207 207 */ 208 public static void loadPlugins(boolean early ) {208 public static void loadPlugins(boolean early, String lang) { 209 209 List<String> plugins = new LinkedList<String>(); 210 210 if (Main.pref.hasKey("plugins")) … … 212 212 if (System.getProperty("josm.plugins") != null) 213 213 plugins.addAll(Arrays.asList(System.getProperty("josm.plugins").split(","))); 214 215 // we remove mappaint from the preferences on startup but this is just 216 // in case it crept in through the properties: 217 if (plugins.contains("mappaint")) { 218 plugins.remove("mappaint"); 219 System.out.println("Warning - loading of mappaint plugin was requested. This JOSM version has built-in mappaint support. The plugin is not required."); 214 215 String [] oldplugins = new String[]{"mappaint", "unglueplugin"}; 216 for(String p : oldplugins) 217 { 218 if(plugins.contains(p)) 219 { 220 plugins.remove(p); 221 System.out.println(tr("Warning - loading of {0} plugin was requested. This plugin is no longer required.", p)); 222 } 223 } 224 if(lang != null) 225 { 226 for(String p : plugins) 227 { 228 if(p.startsWith("lang-")) 229 { 230 plugins.remove(p); 231 break; 232 } 233 } 234 if(!lang.equals("en")) 235 plugins.add("lang-"+lang); 220 236 } 221 237 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r873 r966 119 119 Main.pref.save(); 120 120 } 121 String language = null; 122 if(args.containsKey("language")) 123 language = (String)(args.get("language").toArray()[0]); 121 124 122 125 if (!PluginDownloader.moveUpdatedPlugins()) { … … 127 130 128 131 // load the early plugins 129 Main.loadPlugins(true );132 Main.loadPlugins(true, language); 130 133 131 134 if (argList.contains("--help") || argList.contains("-?") || argList.contains("-h")) { … … 143 146 "\t--no-fullscreen "+tr("Don't launch in fullscreen mode")+"\n"+ 144 147 "\t--reset-preferences "+tr("Reset the preferences to default")+"\n\n"+ 145 "\t--language=<language> "+tr("Set the language. Example:")+"\n\n"+148 "\t--language=<language> "+tr("Set the language.")+"\n\n"+ 146 149 tr("examples")+":\n"+ 147 150 "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+ … … 160 163 Main.parent = mainFrame; 161 164 final Main main = new MainApplication(mainFrame); 162 Main.loadPlugins(false );165 Main.loadPlugins(false, null); 163 166 toolbar.refreshToolbarControl(); 164 167
Note:
See TracChangeset
for help on using the changeset viewer.