Skip to content

Commit d05b375

Browse files
committed
Fix some incorrect I18n.format()/tr() usage
1 parent c71004f commit d05b375

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/src/processing/app/Editor.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ public void handleSerial() {
25492549
if(serialPlotter.isClosed()) {
25502550
serialPlotter = null;
25512551
} else {
2552-
statusError(I18n.format("Serial monitor not available while plotter is open"));
2552+
statusError(tr("Serial monitor not available while plotter is open"));
25532553
return;
25542554
}
25552555
}
@@ -2578,7 +2578,7 @@ public void handleSerial() {
25782578
BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port"));
25792579

25802580
if (port == null) {
2581-
statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port")));
2581+
statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port")));
25822582
return;
25832583
}
25842584

@@ -2646,7 +2646,7 @@ public void handlePlotter() {
26462646
if(serialMonitor.isClosed()) {
26472647
serialMonitor = null;
26482648
} else {
2649-
statusError(I18n.format("Plotter not available while serial monitor is open"));
2649+
statusError(tr("Plotter not available while serial monitor is open"));
26502650
return;
26512651
}
26522652
}
@@ -2674,7 +2674,7 @@ public void handlePlotter() {
26742674
BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port"));
26752675

26762676
if (port == null) {
2677-
statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port")));
2677+
statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port")));
26782678
return;
26792679
}
26802680

arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
139139
return false;
140140
}
141141
if (e.getMessage().contains("Connection refused")) {
142-
throw new RunnerException(I18n.format("Unable to connect to {0}", port.getAddress()));
142+
throw new RunnerException(I18n.format(tr("Unable to connect to {0}"), port.getAddress()));
143143
}
144144
throw new RunnerException(e);
145145
} catch (Exception e) {

arduino-core/src/processing/app/SketchData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected void load() throws IOException {
136136
if (BaseNoGui.isSanitaryName(base)) {
137137
addCode(new SketchCode(new File(folder, filename)));
138138
} else {
139-
System.err.println(I18n.format("File name {0} is invalid: ignored", filename));
139+
System.err.println(I18n.format(tr("File name {0} is invalid: ignored"), filename));
140140
}
141141
}
142142
}

0 commit comments

Comments
 (0)