Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some incorrect I18n.format()/tr() usage #4444

Merged
merged 1 commit into from
Jan 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/src/processing/app/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,7 @@ public void handleSerial() {
if(serialPlotter.isClosed()) {
serialPlotter = null;
} else {
statusError(I18n.format("Serial monitor not available while plotter is open"));
statusError(tr("Serial monitor not available while plotter is open"));
return;
}
}
Expand Down Expand Up @@ -2578,7 +2578,7 @@ public void handleSerial() {
BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port"));

if (port == null) {
statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port")));
statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port")));
return;
}

Expand Down Expand Up @@ -2646,7 +2646,7 @@ public void handlePlotter() {
if(serialMonitor.isClosed()) {
serialMonitor = null;
} else {
statusError(I18n.format("Plotter not available while serial monitor is open"));
statusError(tr("Plotter not available while serial monitor is open"));
return;
}
}
Expand Down Expand Up @@ -2674,7 +2674,7 @@ public void handlePlotter() {
BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port"));

if (port == null) {
statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port")));
statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port")));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
return false;
}
if (e.getMessage().contains("Connection refused")) {
throw new RunnerException(I18n.format("Unable to connect to {0}", port.getAddress()));
throw new RunnerException(I18n.format(tr("Unable to connect to {0}"), port.getAddress()));
}
throw new RunnerException(e);
} catch (Exception e) {
Expand Down
2 changes: 1 addition & 1 deletion arduino-core/src/processing/app/SketchData.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected void load() throws IOException {
if (BaseNoGui.isSanitaryName(base)) {
addCode(new SketchCode(new File(folder, filename)));
} else {
System.err.println(I18n.format("File name {0} is invalid: ignored", filename));
System.err.println(I18n.format(tr("File name {0} is invalid: ignored"), filename));
}
}
}
Expand Down