~ubuntu-branches/debian/experimental/arduino/experimental

« back to all changes in this revision

Viewing changes to app/src/processing/app/debug/Uploader.java

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2012-03-11 18:19:42 UTC
  • mfrom: (1.1.5) (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120311181942-be2clnbz1gcehixb
Tags: 1:1.0.1~rc1+dfsg-1
New upstream release, experimental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import processing.app.Serial;
32
32
import processing.app.SerialException;
33
33
import processing.app.SerialNotFoundException;
 
34
import processing.app.I18n;
 
35
import static processing.app.I18n._;
34
36
 
35
37
import java.io.*;
36
38
import java.util.*;
47
49
 
48
50
public abstract class Uploader implements MessageConsumer  {
49
51
  static final String BUGS_URL =
50
 
    "https://developer.berlios.de/bugs/?group_id=3590";
 
52
    _("https://developer.berlios.de/bugs/?group_id=3590");
51
53
  static final String SUPER_BADNESS =
52
 
    "Compiler error, please submit this code to " + BUGS_URL;
 
54
    I18n.format(_("Compiler error, please submit this code to {0}"), BUGS_URL);
53
55
 
54
56
  RunnerException exception;
55
57
  //PdePreferences preferences;
114
116
      String[] commandArray = new String[commandDownloader.size()];
115
117
      commandDownloader.toArray(commandArray);
116
118
      
117
 
      String avrBasePath;
118
 
      
119
 
      if(Base.isLinux()) {
120
 
        avrBasePath = new String(Base.getHardwarePath() + "/tools/"); 
121
 
      }
122
 
      else {
123
 
        avrBasePath = new String(Base.getHardwarePath() + "/tools/avr/bin/"); 
124
 
      }
125
 
      
126
 
      commandArray[0] = avrBasePath + commandArray[0];
127
 
      
128
119
      if (verbose || Preferences.getBoolean("upload.verbose")) {
129
120
        for(int i = 0; i < commandArray.length; i++) {
130
121
          System.out.print(commandArray[i] + " ");
205
196
    }
206
197
    if(notFoundError) {
207
198
      //System.out.println("throwing something");
208
 
      exception = new RunnerException("the selected serial port "+s+" does not exist or your board is not connected");
 
199
      exception = new RunnerException(I18n.format(_("the selected serial port {0} does not exist or your board is not connected"), s));
209
200
      return;
210
201
    }
211
202
    if (s.indexOf("Device is not responding") != -1 ) {
212
 
      exception =  new RunnerException("Device is not responding, check the right serial port is selected or RESET the board right before exporting");
 
203
      exception =  new RunnerException(_("Device is not responding, check the right serial port is selected or RESET the board right before exporting"));
213
204
      return;
214
205
    }
215
206
    if (s.indexOf("Programmer is not responding") != -1 ||
216
207
        s.indexOf("programmer is not responding") != -1 ||
217
208
        s.indexOf("protocol error") != -1) {
218
 
      exception = new RunnerException("Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.");
 
209
      exception = new RunnerException(_("Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions."));
219
210
      return;
220
211
    }
221
212
    if (s.indexOf("Expected signature") != -1) {
222
 
      exception = new RunnerException("Wrong microcontroller found.  Did you select the right board from the Tools > Board menu?");
 
213
      exception = new RunnerException(_("Wrong microcontroller found.  Did you select the right board from the Tools > Board menu?"));
223
214
      return;
224
215
    }
225
216
  }